can not mount a large FAT32 filesystem

Peter Edwards peadar.edwards at gmail.com
Thu Sep 29 06:37:38 PDT 2005


On 9/29/05, Bruce Evans <bde at zeta.org.au> wrote:
> On Wed, 28 Sep 2005, Peter Edwards wrote:
>
> > On 9/28/05, Jim Rees <rees at umich.edu> wrote:
> >> Note that the check also must be removed near the top of mountmsdosfs(), at
> >> least in the cvs head version.
> >>
> > The only reference to BOOTSIG[23] in msdosfs_vnops.c were the ones I
> > removed: Do you mean here (line 445 of msdos_vfsops.c v 1.144)
> >
> >> #ifndef MSDOSFS_NOCHECKSIG
> >>         if (bsp->bs50.bsBootSectSig0 != BOOTSIG0
> >>             || bsp->bs50.bsBootSectSig1 != BOOTSIG1) {
> >>                 error = EINVAL;
> >>                 goto error_exit;
> >>         }
> >> #endif
> >
> > This is a different check: It's testing a different signature: the
> > "0xAA55" marker at the end of the bootblock, which _is_ actually
> > documented.
>
> Surely this one is very standard?

Yes: that's what I was saying: I haven't touched the AA55 stuff at
all, and I don't really intend to: even if it's #ifdeffed away, it
makes sense that the code at least documents the expected layout, even
if it doesn't enforce it.

> I think the checking for BOOTSIG[0-1] shouldn't be removed or a compile-
> time option.

I'd be somewhat reticent about re-inserting the check: I have to
assume it was removed for valid reasons, and breaking existing
filesystems doesn't seem wise.
The argument is of course somewhat orthogonal to the original patch,
which was to remove the BOOTSIG[23] stuff.

>
> The \x55\xAA signature also occurs in the fsinfo and is messed up by
> newfs_msdos for unusual sector sizes.  This results in msdosfs just
> ignoring the fsinfo for unusual sector sizes.  Since the fsinfo is
> mostly an optional optimization hint, this is almost harmless.
>

When I get some of that mythical free time, I might shove some patches
for newfs_msdos in front of you for review :-)


More information about the freebsd-fs mailing list