linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jan Kara <jack@suse.cz>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] quota-tools: add gfs2 support
Date: Fri, 7 May 2010 16:40:25 +0200	[thread overview]
Message-ID: <20100507144025.GA13562@lst.de> (raw)
In-Reply-To: <20100504220910.GA319@lst.de>

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@lst.de>

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;

      parent reply	other threads:[~2010-05-07 14:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-04 22:09 [PATCH] quota-tools: add gfs2 support Christoph Hellwig
2010-05-05 14:14 ` Steven Whitehouse
2010-05-05 15:17 ` Jan Kara
2010-05-07 14:40 ` Christoph Hellwig [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100507144025.GA13562@lst.de \
    --to=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).