Ok, I did some debug work. Here are the results:
Writing to the MO doesn't cause an "Oops", but the file will contain trash.
'cat "test" > file' results in a file that contains 0x1a 0xf7 0xa3 0xdb 0x86
The lines
printk("fat debug: *i_sb: %u\n", inode->i_sb);
printk("fat debug: *cvf_file_read: %u\n",
MSDOS_SB(inode->i_sb)->cvf_format->cvf_file_read);
in fs/fat/file.c:fat_file_read() shows this:
fat debug: *cvf_format: 3365518688
fat debug: *cvf_file_read: 0
In fs/fat/cvf.c I found this:
struct cvf_format bigblock_cvf = {
0, /* version - who cares? */
"big_blocks",
0, /* flags - who cares? */
NULL,
NULL,
NULL,
bigblock_fat_bread,
bigblock_fat_bread,
bigblock_fat_brelse,
bigblock_fat_mark_buffer_dirty,
bigblock_fat_set_uptodate,
bigblock_fat_is_uptodate,
bigblock_fat_ll_rw_block,
default_fat_access,
NULL,
default_fat_bmap,
NULL,
^^^^^
default_fat_file_write,
NULL,
NULL
};
cvf_file_read is set to zero and will be never changed, but cvf_file_write is
set to default_fat_file_write.
Tino
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/