Re: VFS issues (was: Re: 2.5.5-pre1: mounting NTFS partitions -t VFAT)

From: Jos Hulzink (josh@stack.nl)
Date: Tue Feb 19 2002 - 07:48:49 EST


On Tuesday 19 February 2002 12:52, Richard Russon wrote:

> Whatever you throw at mount, you want it to fail_safe_. i.e. in the
> worst case, do nothing.

Agreed.

> Without any help, mount (userspace) tries to determine the partition
> type. It understands the magics of a LOT of filesystems.
>
> It looks for the NTFS magic before the DOS magic (or any of its variants).

Well, the story: I reinstalled Win2k and updated from FAT32 to NTFS, the day
before I tested 2.5.5pre-1. I forgot to update /etc/fstab. So mount was
called with the -t vfat option.

> Which is passed to the VFS, and the to the driver which performs some
> more rigid tests (hopefully :-)

Working on those tests, though it is hard to tell what limits are valid. I
never saw more than 2 FATs, but can I assume there never will be more ? FAT
has no real fingerprint, unfortunately. There are some bytes that can be
checked, but they depend very much on the FAT version. FAT v 4.0 and higher
have the fingerprint 'FAT' somewhere in the bootsector, but this doesn't hold
anymore for some Win98/ME formatted partitions.

A test I'm thinking about is trying to match the FATs if there is more than
one. You want to bail out if the FATs aren't the same anyway. The chance that
the FAT-sectors are the same on non-FAT partitions is very small. Though this
test can be rather slow, maybe we should only test the first sector(s).

Jos

-
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/



This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:19 EST