If the "next free cluster" field of the FSInfo block is 0xFFFFFFFF,

it means that the correct value is unknown. Since this value is just
a hint to improve performance, initially assume that the first non-reserved
cluster is free, then correct this assumption if necessary before writing
the FSInfo block back to disk.

PR:		62826
MFC after:	2 weeks
This commit is contained in:
Tim J. Robbins 2004-02-17 08:51:49 +00:00
parent c6d1415d6a
commit 8bb386f217

View File

@ -561,9 +561,11 @@ mountmsdosfs(devvp, mp, td, argp)
if (!bcmp(fp->fsisig1, "RRaA", 4)
&& !bcmp(fp->fsisig2, "rrAa", 4)
&& !bcmp(fp->fsisig3, "\0\0\125\252", 4)
&& !bcmp(fp->fsisig4, "\0\0\125\252", 4))
&& !bcmp(fp->fsisig4, "\0\0\125\252", 4)) {
pmp->pm_nxtfree = getulong(fp->fsinxtfree);
else
if (pmp->pm_nxtfree == 0xffffffff)
pmp->pm_nxtfree = CLUST_FIRST;
} else
pmp->pm_fsinfo = 0;
brelse(bp);
bp = NULL;