public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Q] FAT driver enhancement
@ 2002-03-28 13:25 Jos Hulzink
  2002-03-28 19:48 ` OGAWA Hirofumi
  2002-03-29 23:11 ` Pavel Machek
  0 siblings, 2 replies; 12+ messages in thread
From: Jos Hulzink @ 2002-03-28 13:25 UTC (permalink / raw)
  To: Linux Kernel Development

Hi,

A while ago I initiated a thread about mounting a NTFS partition as FAT
partition. The problem is that FAT partitions do not have a real
fingerprint, so the FAT driver mounts almost anything.

The current 2.5 driver only tests if some values in the bootsector are
non-zero. IMHO, this is not strict enough. For example, the number of FATs
is always 1 or 2 (anyone ever seen more ?). Besides, when there are two
FATs, all entries in those FATs should be equal. If they are not, we deal
with a non-FAT or broken FAT partition, and we should not mount.

It's not a real fingerprint, but what are the chances all sectors of what
we think is the FAT are equal on non-FAT filesystems ? Yes, when you just
did a

dd if=/dev/zero of=/dev/partition; mkfs.somefs /dev/partition

there is a chance, but that's an empty filesystem. Data corruption isn't
that bad on an empty disk. We know that a FAT is at the beginning of a
partition and I assume that any other filesystem will fill up those first
sectors very soon.

Questions:

1) How do you think about the checking of the FAT tables ? It definitely
   will slow down the mount.
2) If I implement it, where shoud it go ? At the moment, I hacked
   fat_read_super, for there the FAT fs is validated, but I got the
   feeling this is not the place to be.
3) Anyone seen more than two FATs on a filesystem ? Can I assume there is
   a limit ?
4) Comments, anyone ?

Jos


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2002-04-04  0:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-28 13:25 [Q] FAT driver enhancement Jos Hulzink
2002-03-28 19:48 ` OGAWA Hirofumi
2002-04-02  9:34   ` Helge Hafting
2002-04-02 13:27     ` OGAWA Hirofumi
2002-04-02 22:13       ` Mike Fedyk
2002-04-03  7:07         ` Jens Axboe
2002-04-03 11:54         ` OGAWA Hirofumi
2002-04-03 12:21           ` Jos Hulzink
2002-04-03 12:45             ` OGAWA Hirofumi
2002-04-03 12:48             ` David D. Hagood
2002-04-04  0:06               ` Thunder from the hill
2002-03-29 23:11 ` Pavel Machek

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