cvs commit: src/usr.sbin/quot quot.c
Nate Lawson
nate at root.org
Fri Apr 25 08:46:59 PDT 2003
On Fri, 25 Apr 2003, Tim J. Robbins wrote:
> Repair the UFS2 superblock location consistency check so that it succeeds
> on valid superblocks instead of issuing the error "not a BSD filesystem".
> fs_sblockloc is a byte offset, not a fragment number. This change makes
> quot work properly on UFS2 filesystems, which is important now that UFS2
> is the default.
>
> Revision Changes Path
> 1.21 +1 -1 src/usr.sbin/quot/quot.c
>
> --- src/usr.sbin/quot/quot.c:1.20 Mon Dec 30 10:21:47 2002
> +++ src/usr.sbin/quot/quot.c Fri Apr 25 03:07:50 2003
> @@ -563,7 +563,7 @@
> fs = (struct fs *)superblock;
> if ((fs->fs_magic == FS_UFS1_MAGIC ||
> (fs->fs_magic == FS_UFS2_MAGIC &&
> - fs->fs_sblockloc == numfrags(fs, sblock_try[i]))) &&
> + fs->fs_sblockloc == sblock_try[i])) &&
> fs->fs_bsize <= MAXBSIZE &&
> fs->fs_bsize >= sizeof(struct fs))
> break;
There's actually a UFS1 case where sblockloc is in bytes, if fs_old_flags
& FLAGS_UPDATED. See ffs_compat_read(). (Func names inexact since I
don't have the code in front of me, send me email if it's not clear). I
am working on merging all this into a single, user/kernel shared function
for updating the superblock so we don't have this many places to make a
change.
-Nate
More information about the cvs-src
mailing list