From owner-freebsd-fs@FreeBSD.ORG Thu Apr 24 03:40:45 2003 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E421B37B401 for ; Thu, 24 Apr 2003 03:40:45 -0700 (PDT) Received: from smtp02.syd.iprimus.net.au (smtp02.syd.iprimus.net.au [210.50.76.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 706DB43F3F for ; Thu, 24 Apr 2003 03:40:45 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au (210.50.216.159) by smtp02.syd.iprimus.net.au (7.0.012) id 3E8A160000435102 for freebsd-fs@freebsd.org; Thu, 24 Apr 2003 20:40:43 +1000 Received: by dilbert.robbins.dropbear.id.au (Postfix, from userid 1000) id 2B0C7C90D; Thu, 24 Apr 2003 20:40:39 +1000 (EST) Date: Thu, 24 Apr 2003 20:40:39 +1000 From: Tim Robbins To: freebsd-fs@freebsd.org Message-ID: <20030424204039.A66020@dilbert.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Subject: quot(8) on UFS2 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2003 10:40:46 -0000 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