quot(8) on UFS2

Tim Robbins tjr at FreeBSD.ORG
Thu Apr 24 03:40:46 PDT 2003


Someone mentioned on one of the lists that the quot(8) utility doesn't work
properly on UFS2 filesystems. I think this is because the fs_sblockloc test in
quot() is incorrect. Are there any objections to this patch? I'd like to
commit it before 5.1 is released because UFS2 has been made the default FS.

--- //depot/user/tjr/freebsd-tjr/src/usr.sbin/quot/quot.c	2003/04/21 22:23:11
+++ //depot/user/tjr/freebsd-tjr/src/usr.sbin/quot/quot.c	2003/04/24 03:34:52
@@ -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;



Tim


More information about the freebsd-fs mailing list