From patchwork Wed Apr 13 18:22:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zorro Lang X-Patchwork-Id: 8824941 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 62F349F36E for ; Wed, 13 Apr 2016 18:23:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B3C02011B for ; Wed, 13 Apr 2016 18:23:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D89F20120 for ; Wed, 13 Apr 2016 18:23:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755146AbcDMSW6 (ORCPT ); Wed, 13 Apr 2016 14:22:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56018 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755169AbcDMSW5 (ORCPT ); Wed, 13 Apr 2016 14:22:57 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B83BE3D7; Wed, 13 Apr 2016 18:22:56 +0000 (UTC) Received: from localhost (vpn1-4-201.pek2.redhat.com [10.72.4.201]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3DIMtJx002283; Wed, 13 Apr 2016 14:22:56 -0400 From: Zorro Lang To: xfs@oss.sgi.com Cc: linux-fsdevel@vger.kernel.org, sandeen@redhat.com, Zorro Lang Subject: [PATCH] xfs: group quota is still enforced if mount v5 xfs with gqnoenforce and pqnoenforce Date: Thu, 14 Apr 2016 02:22:52 +0800 Message-Id: <1460571772-20285-1-git-send-email-zlang@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 --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 |