linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gfs2: fix quota state reporting
@ 2010-05-04 22:10 Christoph Hellwig
  2010-05-05  9:07 ` Steven Whitehouse
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2010-05-04 22:10 UTC (permalink / raw)
  To: Steven Whitehouse; +Cc: linux-fsdevel, cluster-devel

We need to report both the accounting and enforcing flags if we are
in enforcing mode.

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: xfs/fs/gfs2/quota.c
===================================================================
--- xfs.orig/fs/gfs2/quota.c	2010-05-04 23:16:59.718256886 +0200
+++ xfs/fs/gfs2/quota.c	2010-05-04 23:54:25.643255558 +0200
@@ -1418,10 +1418,18 @@ static int gfs2_quota_get_xstate(struct
 
 	memset(fqs, 0, sizeof(struct fs_quota_stat));
 	fqs->qs_version = FS_QSTAT_VERSION;
-	if (sdp->sd_args.ar_quota == GFS2_QUOTA_ON)
-		fqs->qs_flags = (XFS_QUOTA_UDQ_ENFD | XFS_QUOTA_GDQ_ENFD);
-	else if (sdp->sd_args.ar_quota == GFS2_QUOTA_ACCOUNT)
-		fqs->qs_flags = (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_GDQ_ACCT);
+
+	switch (sdp->sd_args.ar_quota) {
+	case GFS2_QUOTA_ON:
+		fqs->qs_flags |= (XFS_QUOTA_UDQ_ENFD | XFS_QUOTA_GDQ_ENFD);
+		/*FALLTHRU*/
+	case GFS2_QUOTA_ACCOUNT:
+		fqs->qs_flags |= (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_GDQ_ACCT);
+		break;
+	case GFS2_QUOTA_OFF:
+		break;
+	}
+
 	if (sdp->sd_quota_inode) {
 		fqs->qs_uquota.qfs_ino = GFS2_I(sdp->sd_quota_inode)->i_no_addr;
 		fqs->qs_uquota.qfs_nblks = sdp->sd_quota_inode->i_blocks;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-05  9:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04 22:10 [PATCH] gfs2: fix quota state reporting Christoph Hellwig
2010-05-05  9:07 ` Steven Whitehouse

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).