diff mbox

xfs: group quota is still enforced if mount v5 xfs with gqnoenforce and pqnoenforce

Message ID 1460571772-20285-1-git-send-email-zlang@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Zorro Lang April 13, 2016, 6:22 p.m. UTC
This's a regression bug caused by:

  2e74af0 xfs: convert mount option parsing to tokens

xfstests xfs/299 can reproduce this bug, it will fail when do
gpnoenforce test, the error output as below(diff with 299.out):

 *** push past the soft block limit
  [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
  -[NAME] 140 100 500 00 [--------] 4 4 10 00 [--------] 0 0 0 00 [--------]
  +[NAME] 140 100 500 00 [7 days] 4 4 10 00 [--------] 0 0 0 00 [--------]

 *** push past the hard inode limit (expect EDQUOT)
  [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
  -[NAME] 140 100 500 00 [--------] 16 4 10 00 [--none--] 0 0 0 00 [--------]
  +[NAME] 140 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------]

 *** push past the hard block limit (expect EDQUOT)
  [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------]
  -[NAME] 540 100 500 00 [--none--] 16 4 10 00 [--none--] 0 0 0 00 [--------]
  +[NAME] 500 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------]

It shows that group quota is still enforced. But this bug only can
be reproduced when mount v5 xfs with gqnoenforce and pqnoenforce
options. The reason as I found is a missed "break" in xfs_parseargs()
function.

After deal with "pqnoenforce", it should break. But the code keep
running into "gquota/grpquota" lines, and make gquota enforced.

Signed-off-by: Zorro Lang <zlang@redhat.com>
---

Hi,

This's a tiny bug(only one line patch). But it's belong to
regression bug and take me a few hours to find the problem.
So I hope it can be fixed:)

Thanks,
Zorro

 fs/xfs/xfs_super.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 187e14b..f3c0ffc 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -350,6 +350,7 @@  xfs_parseargs(
 		case Opt_pqnoenforce:
 			mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE);
 			mp->m_qflags &= ~XFS_PQUOTA_ENFD;
+			break;
 		case Opt_gquota:
 		case Opt_grpquota:
 			mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE |