From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH] quota-tools: add gfs2 support Date: Fri, 7 May 2010 16:40:25 +0200 Message-ID: <20100507144025.GA13562@lst.de> References: <20100504220910.GA319@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Jan Kara Return-path: Received: from verein.lst.de ([213.95.11.210]:34447 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753577Ab0EGOk1 (ORCPT ); Fri, 7 May 2010 10:40:27 -0400 Content-Disposition: inline In-Reply-To: <20100504220910.GA319@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, May 05, 2010 at 12:09:10AM +0200, Christoph Hellwig wrote: > GFS2 implements the XFS interface for setting and reporting the quota > information, and only allows state changes via remount. > > Signed-off-by: Christoph Hellwig Sorry this patch was missing a hunk I added later after researching it. The patch I sent works as-is, but if you want to avoid possibly strange errors with GFS2 filesystems mounted without quota support your want this tiny patch on top: Index: quota-tools/quotasys.c =================================================================== --- quota-tools.orig/quotasys.c 2010-05-07 12:16:38.000000000 +0000 +++ quota-tools/quotasys.c 2010-05-07 14:35:32.000000000 +0000 @@ -496,9 +496,8 @@ int hasquota(struct mntent *mnt, int typ if (!correct_fstype(mnt->mnt_type) || hasmntopt(mnt, MNTOPT_NOQUOTA)) return 0; - if (!strcmp(mnt->mnt_type, MNTTYPE_GFS2)) - return 1; - if (!strcmp(mnt->mnt_type, MNTTYPE_XFS)) + if (!strcmp(mnt->mnt_type, MNTTYPE_GFS2) || + !strcmp(mnt->mnt_type, MNTTYPE_XFS)) return hasxfsquota(mnt, type, flags); if (nfs_fstype(mnt->mnt_type)) /* NFS always has quota or better there is no good way how to detect it */ return 1;