Date: Fri, 25 Apr 2003 08:46:56 -0700 (PDT) From: Nate Lawson <nate@root.org> To: "Tim J. Robbins" <tjr@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/quot quot.c Message-ID: <Pine.BSF.4.21.0304250843430.65215-100000@root.org> In-Reply-To: <20030425100758.561E137B4B0@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0304250843430.65215-100000>