Data corruption with msdosfs (rev. 1.172 of msdosfs_vnops.c)

From: William Grzybowski <william88_at_gmail.com>
Date: Mon, 6 Aug 2007 11:37:41 -0300
On 8/4/07, Philipp Mergenthaler <philipp.mergenthaler_at_stud.uni-karlsruhe.de>
wrote:
>
>
> Hi,
>
> with rev. 1.172 of msdosfs_vnops.c I see data corruption when reading
> files
> on a FAT 32 file system. (I didn't try write accesses apart from deleting
> some files, which worked ok).  The file system is on a IDE disk in an
> external USB enclosure and has been created with "newfs_msdos -F 32",
> IIRC.
> I can use it without problems under FreeBSD-current (prior to July 20th),
> Windows XP and Linux.
>
> The first 0x2000  (usually, but sometimes it's the first 0x3000) bytes of
> a file are ok, but then there are some 4kb-blocks from somewhere else.
>
> Example (hexdump -C of a html file):
> 00001fb0  3c 64 69 76 20 63 6c 61  73 73 3d 22 66 6c 6f 61  |<div
> class="floa|
> 00001fc0  74 62 72 6b 22 3e 26 6e  62 73 70 3b 3c 2f 64
> 69  |tbrk">&nbsp;</di|
> 00001fd0  76 3e 0a 3c 2f 64 69 76  3e 0a 0a 3c 2f 64 69
> 76  |v>.</div>..</div|
> 00001fe0  3e 3c 2f 64 69 76 3e 0a  0a 3c 64 69 76 20 69 64  |></div>..<div
> id|
> 00001ff0  3d 22 72 77 66 6f 6f 74  22 20 63 6c 61 73 73 3d  |="rwfoot"
> class=|
> 00002000  fe fe fe fe fe fe fe fe  fe fe fe fe fe fe fe
> fe  |þþþþþþþþþþþþþþþþ|
> *
> 00002120  52 fe fe fe fe fe fe fe  fe fe fe fe fe fe fe
> fe  |Rþþþþþþþþþþþþþþþ|
> 00002130  fe fe fe fe fe fe fe fe  fe fe fe fe fe fe fe
> fe  |þþþþþþþþþþþþþþþþ|
> *
> 00002fd0  fe fe fe fe fe fe fe fe  fe fe fe fe fe fe fe
> 52  |þþþþþþþþþþþþþþþR|
>
>
> Another example:
> 00002fd0  6d 65 68 72 22 20 74 69  74 6c 65 3d 22 6b 6c 69  |mehr"
> title="kli|
> 00002fe0  63 6b 20 66 26 75 75 6d  6c 3b 72 20 6d 65 68 72  |ck f&uuml;r
> mehr|
> 00002ff0  22 2f 3e 3c 2f 61 3e 3c  2f 70 3e 0d 0a 09 09
> 09  |"/></a></p>.....|
> 00003000  00 00 00 00 00 00 00 00  70 67 5f 73 74 6f 70
> 00  |........pg_stop.|
> 00003010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
> 00  |................|
> 00003020  00 00 00 00 00 00 00 00  6d 78 74 61 72 00 00
> 00  |........mxtar...|
> 00003030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
> 00  |................|
> 00003040  65 73 64 63 74 6c 00 00  00 00 00 00 00 00 00
> 00  |esdctl..........|
> [...]
> 00007fd0  00 00 00 00 00 00 00 00  68 61 73 68 00 00 00
> 00  |........hash....|
> 00007fe0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
> 00  |................|
> 00007ff0  63 6f 6d 70 73 65 74 00  00 00 00 00 00 00 00
> 00  |compset.........|
> 00008000  6f 74 65 72 5f 31 22 20  63 6c 61 73 73 3d 22 73  |oter_1"
> class="s|
> 00008010  69 74 65 6d 61 70 5f 66  6f 6f 74 65 72 22 3e
> 3c  |itemap_footer"><|
> 00008020  75 6c 3e 3c 6c 69 3e 3c  61 20 68 72 65 66 3d 22  |ul><li><a
> href="|
>
> (From byte 03x000 on there is a list of executables from different
> directories, including $HOME/bin. I don't think I have a file where these
> names occur so close together, so I suspect this is a block from the zsh
> process's heap. The content from byte 0x8000 on to the end was correct.)
>
>
> This is the disk's partition table:
> ~#fdisk /dev/da1
> ******* Working on device /dev/da1 *******
> parameters extracted from in-core disklabel are:
> cylinders=4865 heads=255 sectors/track=63 (16065 blks/cyl)
>
> Figures below won't work with BIOS for partitions not in cyl 1
> parameters to be used for BIOS calculations are:
> cylinders=4865 heads=255 sectors/track=63 (16065 blks/cyl)
>
> Media sector size is 512
> Warning: BIOS sector numbering starts with sector 1
> Information from DOS bootblock is:
> The data for partition 1 is:
> sysid 11 (0x0b),(DOS or Windows 95 with 32 bit FAT)
>     start 63, size 78156162 (38162 Meg), flag 80 (active)
>         beg: cyl 0/ head 1/ sector 1;
>         end: cyl 768/ head 254/ sector 63
> The data for partition 2 is:
> <UNUSED>
> The data for partition 3 is:
> <UNUSED>
> The data for partition 4 is:
> <UNUSED>
>
>
>
> Is there any other information I should provide?


I am with the same problem. -CURRENT from today.
Let me know if i can help providing any information...

Bye

Bye
> Philipp
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to " freebsd-current-unsubscribe_at_freebsd.org
> "
>



-- 
William Grzybowski
------------------------------------------
Jabber: william88 at gmail dot com
Msn: william.grz at hotmail dot com
Curitiba/PR
Received on Mon Aug 06 2007 - 12:37:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:15 UTC