vfat write cache error or fs corruption in 2.1.131?

Oskar Liljeblad (osk@hem.passagen.se)
Sun, 20 Dec 1998 13:51:08 +0100


I'm running an unpatched 2.1.131 kernel on a dual P2 400MHz system with U2W
Adaptec 7890 SCSI controller. The snipped lines below show how moved files
on a FAT32 fs get filled with zeroes, and after a short while the contents
is written. (If this is acceptable or not I don't know.) However, if you
manage to move the file another time before its contents has been written,
you'll end up with a file whose contents is only null-bytes and forever
lost...

This example should illustrate:
oskar:/mnt/E/t$ mount
...
/dev/hda5 on /mnt/E type vfat
(rw,noexec,nosuid,nodev,quiet,umask=7007,conv=b,gid=35)
...
oskar:/mnt/E/t$ ls -l
total 1072
-rw-rw---- 1 root dos 145348 Dec 20 13:17 gnumeric_0.3-1.deb
-rw-rw---- 1 root dos 949716 Dec 20 13:17
gnuplot_3.5beta6.340-6.deb
# the sum of the files above are definitely not 0, but we can't check that
# now because then the files would be cached in memory
oskar:/mnt/E/t$ mkdir t2 ; cd t2
# all the following commands have to be performed without delays!
oskar:/mnt/E/t/t2$ mv ../gnu* .
oskar:/mnt/E/t/t2$ sum *
00000 142 gnumeric_0.3-1.deb
00000 928 gnuplot_3.5beta6.340-6.deb
# data wasn't written out yet?
oskar:/mnt/E/t/t2$ less gnumeric_0.3-1.deb
# hard drive is busy, and the non-zero contents is found in the gnumeric
# file.
...
oskar:/mnt/E/t/t2$ sum gnumeric_0.3-1.deb
37391 142
# sum of gnumeric_0.3-1.deb is not 0. sum of gnuplot should still be 0
# though, but once again we can't check that.
oskar:/mnt/E/t/t2$ mkdir t3 ; cd t3
oskar:/mnt/E/t/t2/t3$ mv ../gnuplot_3.5beta6.340-6.deb .
oskar:/mnt/E/t/t2/t3$ sum gnuplot_3.5beta6.340-6.deb
00000 928
# like before - data wasn't written out (yet?).
oskar:/mnt/E/t/t2$ less gnuplot_3.5beta6.340-6.deb
# gnuplot is now only zeroes, no data is written. sorry, file contents is
# lost.

Also, when I shut down the system after doing this, I got "VFS: Busy inodes
blah blah. Self destruction in 5 seconds. Have a nice day"-like errors.

I have only experienced this with vfat (fat32 and non-fat32 filesystems),
not ext2. Please let me know if there's any other information about this
that I can provide.

Oskar Liljeblad (osk@hem.passagen.se)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/