Re: [PATCH] quota-tools: add gfs2 support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <hch@xxxxxx>

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;
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux