public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] VFAT eats directory entries on read errors?
@ 2003-07-01 18:56 Xuân Baldauf
  0 siblings, 0 replies; only message in thread
From: Xuân Baldauf @ 2003-07-01 18:56 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: chaffee

Hello,

I accidently mounted the wrong partition (which was a VFAT32 partition) 
of a 2.5" IDE hard drive which was attached to the IDE bus of a desktop 
box for diagnostics.

  ls -la /mount/point

showed only parts of the root directory of the filesystem, some error 
messages were printed onto the console indicating read errors. For some 
seconds, there was some calm but strange sound created by the computer. 
It seemed that (due to the lousy adapter between IDE bus cable and the 
HD) there was a cable error and thus some blocks could not be read. Some 
seconds later (when there was no strange sound to be listened anymore) I 
tried to verify that communication between HD and host worked fine using 
dd. There were no read erros.

Because I did not want to access that partition, I unmounted the FAT32 
partition and continued to work on another partition.


Unfortunately, booting Windows from this FAT32 partition did not work 
anymore. There were files missing which belong to the root directory. 
Repair tools like "dosfsck" or "chkdsk" did not report any problem or 
possibility to save the contents of the root directory. (Maybe "dosfsck" 
is too destructive...) The only directory entries which were not missing 
were the directory entries which were displayed by the former "ls -la".

The Linux vfat code (2.4.21-pre5) actually cut the directory! (And 
destroyed data.) The partition had been mounted with no special options 
(thus, it was mounted read-write). But there was no write access by some 
user. It seems that the vfat module interpreted non-readable blocks 
belonging to the root directory as non-existent blocks and that the vfat 
module rewrited that cut directory to disk.

Maybe someone enlightened could try to reproduce such a scenario where 
some blocks of the root directory cannot be read. (Error simulation is 
does not seems to be possible without a specially modified kernel.)

Xuân.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-07-01 18:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-01 18:56 [BUG] VFAT eats directory entries on read errors? Xuân Baldauf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox