From patchwork Thu Jul 22 07:38:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12393347 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D28E1C6377D for ; Thu, 22 Jul 2021 07:39:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BC30161285 for ; Thu, 22 Jul 2021 07:39:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230090AbhGVG6i (ORCPT ); Thu, 22 Jul 2021 02:58:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbhGVG6i (ORCPT ); Thu, 22 Jul 2021 02:58:38 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C963C061575; Thu, 22 Jul 2021 00:39:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=+4rFdmenskUWQxcBu4amh8q6OQuokyNEeMtwp1CcRyY=; b=sl0i0s/4JaF4nO3ZjZvWvIn+1a Fzh1Q1x5xw+G9Sj6d78IIuHwpShq8CpoWau37jDGUL6tY0BQhoYFnyfs75x/Y4i3foNjSK3E9bM0h TPkTiLpDLPoNN1vkG43bxoal2O9vgmFpic3TvVn7+aKrJi+YBNAjNsbW+pr1pa9IwAx9XGbBBV1yN 8/dchnK7iKbAlmFR83Kxap0JIntnOhb5Nufpydzs9GRqDm2l6gmFg+VNMrJykcsP5UcLOLZ9W3PzZ cw1L5NJpWCnH/+IcFDQBxQ7ly9F7+DwqgqbWjHHzBl5wk/AdoIfquvNW4Ls/wBMJjJHB7w+pOL/1C iELgfxmA==; Received: from [2001:4bb8:193:7660:643c:9899:473:314a] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6TI9-00A0Rk-7w; Thu, 22 Jul 2021 07:38:55 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org, "Darrick J . Wong" Subject: [PATCH 1/7] common/quota: allow removing quota options entirely in _qmount_option Date: Thu, 22 Jul 2021 09:38:26 +0200 Message-Id: <20210722073832.976547-2-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210722073832.976547-1-hch@lst.de> References: <20210722073832.976547-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Add support for dropping all quota related options instead of only overriding them with new ones to _qmount_option. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- common/quota | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/quota b/common/quota index 883a28a2..7fa1a61a 100644 --- a/common/quota +++ b/common/quota @@ -263,7 +263,9 @@ _qmount_option() -e 's/prjquota/quota/g'` fi # Ensure we have the given quota option - duplicates are fine - export MOUNT_OPTIONS="$MOUNT_OPTIONS -o $OPTS" + if [ -n "$OPTS" ]; then + export MOUNT_OPTIONS="$MOUNT_OPTIONS -o $OPTS" + fi echo "MOUNT_OPTIONS = $MOUNT_OPTIONS" >>$seqres.full } From patchwork Thu Jul 22 07:38:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12393349 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC7F1C63799 for ; Thu, 22 Jul 2021 07:39:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B1BF16023B for ; Thu, 22 Jul 2021 07:39:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230479AbhGVG7D (ORCPT ); Thu, 22 Jul 2021 02:59:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231140AbhGVG7B (ORCPT ); Thu, 22 Jul 2021 02:59:01 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07C25C06179F; Thu, 22 Jul 2021 00:39:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=XHf7NylaNHEeAjC+MhKJdPPu0IAZXpO3NzEg4UjJV3s=; b=qhpvj8fbIXrEaq7rccoU5lrGRE XGVteld3Vd8XycTb63Cnu7RpB535nm9RlePfkGgSM69TTVSWyThuca2L6Peth1LuzwP4WjkslzxmK 2dNzG68JaCmvn1M+ENzdYsQ0yGUGYiT54F92DJpy3JfIfmP5BlPx/NeYNKREJUZpqLSlxRk4o43Rz HlnLQ0YTY08YH4em/sW2XoVLVBQY04tb3OfyaUag1s+e+97J8lMOr4jv86g5BDtOUp95sQm3RhWiN GbxJKJrT6vdMw7rXFx0h49PlPUb09mO5a/qkUOkWR2jj2srKznBSSoJWsIlZpswGqLQwtLPIooTUj QHwFk5Tg==; Received: from [2001:4bb8:193:7660:643c:9899:473:314a] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6TIW-00A0Sz-W1; Thu, 22 Jul 2021 07:39:18 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org, "Darrick J . Wong" Subject: [PATCH 2/7] xfs/007: unmount after disabling quota Date: Thu, 22 Jul 2021 09:38:27 +0200 Message-Id: <20210722073832.976547-3-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210722073832.976547-1-hch@lst.de> References: <20210722073832.976547-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org With the pending patches to remove support for disabling quota accounting on a mounted file system we need to unmount the file system first before removing the quota files. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- tests/xfs/007 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/xfs/007 b/tests/xfs/007 index 09268e8c..d1946524 100755 --- a/tests/xfs/007 +++ b/tests/xfs/007 @@ -41,6 +41,9 @@ do_test() _qmount echo "*** turn off $off_opts quotas" xfs_quota -x -c "off -$off_opts" $SCRATCH_MNT + _scratch_unmount + _qmount_option "" + _scratch_mount xfs_quota -x -c "remove -$off_opts" $SCRATCH_MNT echo "*** umount" _scratch_unmount From patchwork Thu Jul 22 07:38:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12393351 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6F6AC6377D for ; Thu, 22 Jul 2021 07:40:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A711B6023B for ; Thu, 22 Jul 2021 07:40:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230330AbhGVHAG (ORCPT ); Thu, 22 Jul 2021 03:00:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbhGVHAG (ORCPT ); Thu, 22 Jul 2021 03:00:06 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91129C061575; Thu, 22 Jul 2021 00:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=nZszmsSX55+cZmZYvZNY9zQaac6/W5GwpimFBMR4oJ4=; b=tOmSAUEb+Z2FjUYSgU36MLnepR Kwks5yUc0DZ3ryTOMM3RXxAsMsXr4AJKvbP+fTmnRv/oKX6ZmPCgADlmM+A4xjodpKtpoL9cT8DKk oCNH+m2rweprfHb5v3d8Bip9u9Orarckc5NH9QSHnkAnNfRwMAKNu0ZyYtLjbaOzeee4UX1ieqVy1 icesw608Muva6rvWN1rYAfeAp8JW85hZ3AYr3Gp127heYnrYAtJVZuKHsptUO0ucoy5rvmxYvXKKx 4mwuJikaCq9QoZpxQurX/K86k+c1xYcGbd6Cjgt7A3CBOQTXE6tq6tGv+bpujFjneKK6nI+gg/cCF WtAbSlFg==; Received: from [2001:4bb8:193:7660:643c:9899:473:314a] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6TIr-00A0Uk-Fe; Thu, 22 Jul 2021 07:40:01 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org Subject: [PATCH 3/7] xfs/106: don't test disabling quota accounting Date: Thu, 22 Jul 2021 09:38:28 +0200 Message-Id: <20210722073832.976547-4-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210722073832.976547-1-hch@lst.de> References: <20210722073832.976547-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Switch the test that removes the quota files to just disable enforcement and then unmount the file system as disabling quota accounting is about to go away. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- tests/xfs/106 | 42 ++++++++++++++++++---------------- tests/xfs/106.out | 58 +++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 72 insertions(+), 28 deletions(-) diff --git a/tests/xfs/106 b/tests/xfs/106 index f1397f94..d8f55441 100755 --- a/tests/xfs/106 +++ b/tests/xfs/106 @@ -155,9 +155,9 @@ test_enable() test_off() { - echo "checking off command (type=$type)" - $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ - -c "off -$type -v" $SCRATCH_MNT | _filter_scratch + _scratch_unmount + _qmount_option "" + _qmount } test_remove() @@ -194,6 +194,15 @@ test_restore() test_xfs_quota() { + _qmount_option $1 + _qmount + + if [ $type == "p" ]; then + _require_prjquota $SCRATCH_DEV + $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ + -c "project -s $id" $SCRATCH_MNT > /dev/null + fi + # init quota echo "init quota limit and timer, and dump it" echo "create_files 1024k 15"; create_files 1024k 15 @@ -236,14 +245,19 @@ test_xfs_quota() echo ; test_report -N # off and remove test - echo "off and remove test" + echo "disable and remove test" echo ; test_limit 100m 100m 100 100 echo ; test_quota -N - echo ; test_off + echo ; test_disable echo ; test_state + echo ; test_off echo ; test_remove echo ; test_report -N - echo "quota remount"; _qmount + _scratch_unmount + + echo "quota remount"; + _qmount_option $1 + _qmount echo ; test_report -N # restore test @@ -255,33 +269,23 @@ test_xfs_quota() } echo "----------------------- uquota,sync ---------------------------" -_qmount_option "uquota,sync" -_qmount type=u id=$uqid -test_xfs_quota +test_xfs_quota "uquota,sync" echo "----------------------- gquota,sync ---------------------------" -_qmount_option "gquota,sync" -_qmount type=g id=$gqid -test_xfs_quota +test_xfs_quota "gquota,sync" echo "----------------------- pquota,sync ---------------------------" # Need to clean the group quota before test project quota, because # V4 xfs doesn't support separate project inode. So mkfs at here. _scratch_unmount _scratch_mkfs_xfs >>$seqres.full 2>&1 -_qmount_option "pquota,sync" -_qmount type=p id=$pqid -_require_prjquota $SCRATCH_DEV -$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ - -c "project -s $id" \ - $SCRATCH_MNT > /dev/null -test_xfs_quota +test_xfs_quota "pquota,sync" _scratch_unmount # success, all done diff --git a/tests/xfs/106.out b/tests/xfs/106.out index e36375d3..3e6805a6 100644 --- a/tests/xfs/106.out +++ b/tests/xfs/106.out @@ -124,17 +124,31 @@ Realtime Blocks grace time: [7 days] checking report command (type=u) fsgqa 1024 512 2048 00 [3 days] 15 10 20 00 [3 days] -off and remove test +disable and remove test checking limit command (type=u, bsoft=100m, bhard=100m, isoft=100, ihard=100) checking quota command (type=u) SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT -checking off command (type=u) -User quota are not enabled on SCRATCH_DEV +checking disable command (type=u) +User quota state on SCRATCH_MNT (SCRATCH_DEV) + Accounting: ON + Enforcement: OFF + Inode: #[INO] (X blocks, Y extents) +Blocks grace time: [3 days] +Inodes grace time: [3 days] +Realtime Blocks grace time: [7 days] checking state command (type=u) +User quota state on SCRATCH_MNT (SCRATCH_DEV) + Accounting: ON + Enforcement: OFF + Inode: #[INO] (X blocks, Y extents) +Blocks grace time: [3 days] +Inodes grace time: [3 days] +Realtime Blocks grace time: [7 days] + checking remove command (type=u) User quota are not enabled on SCRATCH_DEV @@ -288,17 +302,30 @@ Realtime Blocks grace time: [7 days] checking report command (type=g) fsgqa 1024 512 2048 00 [3 days] 15 10 20 00 [3 days] -off and remove test +disable and remove test checking limit command (type=g, bsoft=100m, bhard=100m, isoft=100, ihard=100) checking quota command (type=g) SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT -checking off command (type=g) -Group quota are not enabled on SCRATCH_DEV +checking disable command (type=g) +Group quota state on SCRATCH_MNT (SCRATCH_DEV) + Accounting: ON + Enforcement: OFF + Inode: #[INO] (X blocks, Y extents) +Blocks grace time: [3 days] +Inodes grace time: [3 days] +Realtime Blocks grace time: [7 days] checking state command (type=g) +Group quota state on SCRATCH_MNT (SCRATCH_DEV) + Accounting: ON + Enforcement: OFF + Inode: #[INO] (X blocks, Y extents) +Blocks grace time: [3 days] +Inodes grace time: [3 days] +Realtime Blocks grace time: [7 days] checking remove command (type=g) Group quota are not enabled on SCRATCH_DEV @@ -452,17 +479,30 @@ Realtime Blocks grace time: [7 days] checking report command (type=p) fsgqa 1024 512 2048 00 [3 days] 15 10 20 00 [3 days] -off and remove test +disable and remove test checking limit command (type=p, bsoft=100m, bhard=100m, isoft=100, ihard=100) checking quota command (type=p) SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT -checking off command (type=p) -Project quota are not enabled on SCRATCH_DEV +checking disable command (type=p) +Project quota state on SCRATCH_MNT (SCRATCH_DEV) + Accounting: ON + Enforcement: OFF + Inode: #[INO] (X blocks, Y extents) +Blocks grace time: [3 days] +Inodes grace time: [3 days] +Realtime Blocks grace time: [7 days] checking state command (type=p) +Project quota state on SCRATCH_MNT (SCRATCH_DEV) + Accounting: ON + Enforcement: OFF + Inode: #[INO] (X blocks, Y extents) +Blocks grace time: [3 days] +Inodes grace time: [3 days] +Realtime Blocks grace time: [7 days] checking remove command (type=p) Project quota are not enabled on SCRATCH_DEV From patchwork Thu Jul 22 07:38:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12393353 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84149C63793 for ; Thu, 22 Jul 2021 07:41:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 67BBE6023B for ; Thu, 22 Jul 2021 07:41:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230306AbhGVHAl (ORCPT ); Thu, 22 Jul 2021 03:00:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230090AbhGVHAk (ORCPT ); Thu, 22 Jul 2021 03:00:40 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 463E1C061575; Thu, 22 Jul 2021 00:41:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=X1NeZeVtf+Cf6qAkIGRLNh0MOX2/K2uIrNry7FochMs=; b=c7m2x+mjZj/o5oYxbynk1DtAoD ZNTPDbhaBB4JyecYOaEDGGagp8Y2/t5jknKaiqy6ur2LZqyxF/Pb/KSUgH0fyB5SpbtZDLy3uj2Xz aJd/qI0t2muE67VlZzsq9AMTYA/UJpRDlHAoo0Vs4+GrfoQgvg2/7EraAaAgk4iotGIXv52LWJ3+/ xSk3yKdkSC/v+7LuhUCiJSfPdVyU/ekU2grj8z7KqqOwyEtxXZJd88huWBPA5gdz7iywI+SnS52Iy hh+KDE1nvb2+Nv3cCQASjrv1nMmqbVcK1wVaC0LHCEd0/D4k/QYic42NvvDE/9yWkZ0lwPjy21yyH IqmoeE1w==; Received: from [2001:4bb8:193:7660:643c:9899:473:314a] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6TJx-00A0XR-3e; Thu, 22 Jul 2021 07:40:53 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org Subject: [PATCH 4/7] xfs/220: avoid failure when disabling quota accounting is not supported Date: Thu, 22 Jul 2021 09:38:29 +0200 Message-Id: <20210722073832.976547-5-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210722073832.976547-1-hch@lst.de> References: <20210722073832.976547-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Doing a proper _requires for quotaoff support is rather hard, as we need to test it on a specific file system. Instead just use sed to remove the warning and let the test case pass. Eventually it should just be removed entirely. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- tests/xfs/220 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/xfs/220 b/tests/xfs/220 index 8d955225..c847a0dc 100755 --- a/tests/xfs/220 +++ b/tests/xfs/220 @@ -54,7 +54,12 @@ _scratch_mount -o uquota # turn off quota and remove space allocated to the quota files # (this used to give wrong ENOSYS returns in 2.6.31) -xfs_quota -x -c off -c remove $SCRATCH_DEV +# +# The sed expression below replaces a notrun to cater for kernels that have +# removed the ability to disable quota accounting at runtime. On those +# kernel this test is rather useless, and in a few years we can drop it. +xfs_quota -x -c off -c remove $SCRATCH_DEV 2>&1 | \ + sed -e '/XFS_QUOTARM: Invalid argument/d' # and unmount again _scratch_unmount From patchwork Thu Jul 22 07:38:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12393355 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AF45C63793 for ; Thu, 22 Jul 2021 07:41:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3058A6023B for ; Thu, 22 Jul 2021 07:41:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230090AbhGVHBE (ORCPT ); Thu, 22 Jul 2021 03:01:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbhGVHBD (ORCPT ); Thu, 22 Jul 2021 03:01:03 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A5B9C061575; Thu, 22 Jul 2021 00:41:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=Gk3FmlS2FETjaPN/NsYYvsduDo/sekD/0gliwGLO6U4=; b=lS8cNKw15IwnuuKAZu6lKd887y 8O9Y/GM24DmP4T8iHBXpQhx2jMHOeXpbodcLdQPKTuaztmhxRsQK62R8+6yoQTTcvSQ9eaT30cTM9 WitMRNeqhR16hM3UEQ3a6DVdmLAqiUBzMuz9UpBkxEXMX6zNQGia3lq0dBXWKRLA7+jNjx2sAySoo I23lJLJCz19SrGrZYv3lGLy8hGc/ywNC3SRtDm3jd+ZSCu40N5XzsMlFS1R738X5rrMwQ8dAuaYJp 5wN/q9WZo+sCX3PtX8V1NxqF0GPkxID+nf3USe0YDNjWLh8kYW42jkHJhTQH5wfJjrPqMWrTmAr1D EwhVp7hw==; Received: from [2001:4bb8:193:7660:643c:9899:473:314a] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6TKV-00A0aB-NI; Thu, 22 Jul 2021 07:41:20 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org, "Darrick J . Wong" Subject: [PATCH 5/7] xfs/304: don't turn quota accounting off Date: Thu, 22 Jul 2021 09:38:30 +0200 Message-Id: <20210722073832.976547-6-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210722073832.976547-1-hch@lst.de> References: <20210722073832.976547-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org The test case tests just as much when just testing turning quota enforcement off, so switch it to that. This is in preparation for removing support to turn quota accounting off. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- tests/xfs/304 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/xfs/304 b/tests/xfs/304 index 2716ccd5..91fa5d97 100755 --- a/tests/xfs/304 +++ b/tests/xfs/304 @@ -31,7 +31,7 @@ QUOTA_DIR=$SCRATCH_MNT/quota_dir mkdir -p $QUOTA_DIR echo "*** turn off group quotas" -xfs_quota -x -c 'off -g' $SCRATCH_MNT +xfs_quota -x -c 'disable -g' $SCRATCH_MNT rmdir $QUOTA_DIR echo "*** umount" _scratch_unmount @@ -39,7 +39,7 @@ _scratch_unmount _qmount mkdir -p $QUOTA_DIR echo "*** turn off project quotas" -xfs_quota -x -c 'off -p' $SCRATCH_MNT +xfs_quota -x -c 'disable -p' $SCRATCH_MNT rmdir $QUOTA_DIR echo "*** umount" _scratch_unmount @@ -47,7 +47,7 @@ _scratch_unmount _qmount mkdir -p $QUOTA_DIR echo "*** turn off group/project quotas" -xfs_quota -x -c 'off -gp' $SCRATCH_MNT +xfs_quota -x -c 'disable -gp' $SCRATCH_MNT rmdir $QUOTA_DIR echo "*** umount" _scratch_unmount From patchwork Thu Jul 22 07:38:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12393357 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F885C6377D for ; Thu, 22 Jul 2021 07:42:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 10EB56128C for ; Thu, 22 Jul 2021 07:42:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230051AbhGVHBu (ORCPT ); Thu, 22 Jul 2021 03:01:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbhGVHBu (ORCPT ); Thu, 22 Jul 2021 03:01:50 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3351C061575; Thu, 22 Jul 2021 00:42:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=H/HzHUbup5jN6v9nUb2oFbvAvzEYXDSXOMVKgeh6kZA=; b=cQVF+GCtm7Kgc4OeA/U/3dbyC6 fjXeYXSvI4Nc5Due8aoP5mV34fYHZMGTu4EBmEuO9KAP9sutunDOvo9j/G+q2mb4pQnC/fGQIUzwK IfOkMxBa8CjUW0gcJ/plr94vZL4PsuWONDCAiVaEm/q9hrbAAzywVCuGmo+7Ypljl9P5xDslE+Ktr kR/h0+rOzuQYcTaCtbPa2NAkOQqZXJMG/gn/4QVhcP2NknvwymJUFWcvsTfG8L46FlYjzLTlhy7pg GJUknean7oHwCBjwUxLtsifZjX5EGv83+G+Bk/5oF9cuDaWg6NFOuKjVs/M3TycxiSxVku4yWmCJC Pd7gde8g==; Received: from [2001:4bb8:193:7660:643c:9899:473:314a] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6TKs-00A0be-Nx; Thu, 22 Jul 2021 07:41:46 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org, "Darrick J . Wong" Subject: [PATCH 6/7] xfs/305: don't turn quota accounting off Date: Thu, 22 Jul 2021 09:38:31 +0200 Message-Id: <20210722073832.976547-7-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210722073832.976547-1-hch@lst.de> References: <20210722073832.976547-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org The test case tests just as much when just testing turning quota enforcement off, so switch it to that. This is in preparation for removing support to turn quota accounting off. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- tests/xfs/305 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xfs/305 b/tests/xfs/305 index 140557a0..0b89499a 100755 --- a/tests/xfs/305 +++ b/tests/xfs/305 @@ -38,7 +38,7 @@ _exercise() $FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >/dev/null 2>&1 & sleep 10 - xfs_quota -x -c "off -$type" $SCRATCH_DEV + xfs_quota -x -c "disable -$type" $SCRATCH_DEV sleep 5 $KILLALL_PROG -q $FSSTRESS_PROG wait From patchwork Thu Jul 22 07:38:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12393367 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 023C0C6377D for ; Thu, 22 Jul 2021 07:43:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D774161283 for ; Thu, 22 Jul 2021 07:43:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230106AbhGVHDD (ORCPT ); Thu, 22 Jul 2021 03:03:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230048AbhGVHDD (ORCPT ); Thu, 22 Jul 2021 03:03:03 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE438C061575; Thu, 22 Jul 2021 00:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=gueB4ReJM9ZJqCuETlr/z4O9FhJdSnth9xUZQFe/va0=; b=r9cN9eFAxfT7Wdbg9Ls0IP9SSc G/3N3T20qZ5iJxjQOrmlhdwqjXkp0ggC9162I1msoXS6wYPpHs99YxIZV2W0qbWoOio+Le7Stsdyf 4D1s8UBJkcwzsXfgl8cUfp/oakV+LbsCWpsD83pDjqpIaOZNJps0zLbz3j7TqqIWLnNBE0ftoyKaW VwomUIdDgKJEV0gSrPFVPfwXJLthIK5wlWimle7sH+WTJs23CVsunLwlOifeXocrhuXRK2YxRL4XX 4mqR/3twPUf/BVfCsaRZPkmkWcXnLToFAtgO3VXVjnIm1ciL5k8T8mxusE0/v6qAUOMamCkMKTyLI hgKPJV2A==; Received: from [2001:4bb8:193:7660:643c:9899:473:314a] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6TLd-00A0eB-6D; Thu, 22 Jul 2021 07:42:44 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org Subject: [PATCH 7/7] xfs: use $XFS_QUOTA_PROG instead of hardcoding xfs_quota Date: Thu, 22 Jul 2021 09:38:32 +0200 Message-Id: <20210722073832.976547-8-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210722073832.976547-1-hch@lst.de> References: <20210722073832.976547-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- tests/xfs/007 | 4 ++-- tests/xfs/052 | 4 ++-- tests/xfs/108 | 6 +++--- tests/xfs/220 | 4 ++-- tests/xfs/261 | 4 ++-- tests/xfs/303 | 14 +++++++------- tests/xfs/304 | 6 +++--- tests/xfs/305 | 2 +- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/tests/xfs/007 b/tests/xfs/007 index d1946524..66f1f101 100755 --- a/tests/xfs/007 +++ b/tests/xfs/007 @@ -40,11 +40,11 @@ do_test() _qmount echo "*** turn off $off_opts quotas" - xfs_quota -x -c "off -$off_opts" $SCRATCH_MNT + $XFS_QUOTA_PROG -x -c "off -$off_opts" $SCRATCH_MNT _scratch_unmount _qmount_option "" _scratch_mount - xfs_quota -x -c "remove -$off_opts" $SCRATCH_MNT + $XFS_QUOTA_PROG -x -c "remove -$off_opts" $SCRATCH_MNT echo "*** umount" _scratch_unmount diff --git a/tests/xfs/052 b/tests/xfs/052 index 010f9ad6..75761022 100755 --- a/tests/xfs/052 +++ b/tests/xfs/052 @@ -63,13 +63,13 @@ bsoft=1001 bhard=1001 isoft=10 ihard=10 -xfs_quota -x \ +$XFS_QUOTA_PROG -x \ -c "limit -$type bsoft=${bsoft}k bhard=${bhard}k $id" \ -c "limit -$type isoft=$isoft ihard=$ihard $id" \ $SCRATCH_DEV # cross check blks, softblks, hardblks <-> quota, xfs_db -xfs_quota -c "quota -$type -birnN $id" $SCRATCH_DEV | +$XFS_QUOTA_PROG -c "quota -$type -birnN $id" $SCRATCH_DEV | tr -d '\n' | tr -s '[:space:]' | tee -a $seqres.full | perl -ne 'if (m[^\s*'$SCRATCH_DEV'\s+(\d+)\s+(\d+)\s+(\d+)]) { print "used_blocks=", $1, "\n"; diff --git a/tests/xfs/108 b/tests/xfs/108 index 0af22443..8a102133 100755 --- a/tests/xfs/108 +++ b/tests/xfs/108 @@ -47,9 +47,9 @@ test_accounting() for file in $SCRATCH_MNT/{buffer,direct,mmap}; do $here/src/lstat64 $file | head -3 | _filter_scratch done - xfs_quota -c "quota -hnb -$type $id" $QARGS | _filter_quota - xfs_quota -c "quota -hni -$type $id" $QARGS | _filter_quota - xfs_quota -c "quota -hnr -$type $id" $QARGS | _filter_quota + $XFS_QUOTA_PROG -c "quota -hnb -$type $id" $QARGS | _filter_quota + $XFS_QUOTA_PROG -c "quota -hni -$type $id" $QARGS | _filter_quota + $XFS_QUOTA_PROG -c "quota -hnr -$type $id" $QARGS | _filter_quota } export MOUNT_OPTIONS="-opquota" diff --git a/tests/xfs/220 b/tests/xfs/220 index c847a0dc..241a7abd 100755 --- a/tests/xfs/220 +++ b/tests/xfs/220 @@ -41,7 +41,7 @@ _scratch_mkfs_xfs >/dev/null 2>&1 _scratch_mount -o uquota # turn off quota -xfs_quota -x -c off $SCRATCH_DEV +$XFS_QUOTA_PROG -x -c off $SCRATCH_DEV # and unmount (this used to crash) _scratch_unmount @@ -58,7 +58,7 @@ _scratch_mount -o uquota # The sed expression below replaces a notrun to cater for kernels that have # removed the ability to disable quota accounting at runtime. On those # kernel this test is rather useless, and in a few years we can drop it. -xfs_quota -x -c off -c remove $SCRATCH_DEV 2>&1 | \ +$XFS_QUOTA_PROG -x -c off -c remove $SCRATCH_DEV 2>&1 | \ sed -e '/XFS_QUOTARM: Invalid argument/d' # and unmount again diff --git a/tests/xfs/261 b/tests/xfs/261 index 3b58db8d..eb8a72cd 100755 --- a/tests/xfs/261 +++ b/tests/xfs/261 @@ -71,13 +71,13 @@ _check() { # Set up a private mount table file, then try out a simple quota # command to show mounts _setup_my_mtab - echo print | xfs_quota -t "${my_mtab}" > /dev/null || exit + echo print | $XFS_QUOTA_PROG -t "${my_mtab}" > /dev/null || exit # Do the same simple quota command after adding a bogus entry to the # mount table. Old code will bail on this because it has trouble # with the bogus entry. _perturb_my_mtab - echo print | xfs_quota -t "${my_mtab}" > /dev/null || exit + echo print | $XFS_QUOTA_PROG -t "${my_mtab}" > /dev/null || exit } ######### diff --git a/tests/xfs/303 b/tests/xfs/303 index b2e5668c..6aafae85 100755 --- a/tests/xfs/303 +++ b/tests/xfs/303 @@ -24,13 +24,13 @@ echo "Silence is golden" # An non-existent xfs mount point INVALID_PATH="/INVALID_XFS_MOUNT_POINT" -xfs_quota -x -c 'report -a' $INVALID_PATH 2>/dev/null -xfs_quota -x -c 'state -a' $INVALID_PATH 2>/dev/null -xfs_quota -x -c 'free -h' $INVALID_PATH 2>/dev/null -xfs_quota -x -c 'quot -v' $INVALID_PATH 2>/dev/null -xfs_quota -x -c 'remove' $INALID_PATH 2>/dev/null -xfs_quota -x -c 'disable' $INVALID_PATH 2>/dev/null -xfs_quota -x -c 'enable' $INVALID_PATH 2>/dev/null +$XFS_QUOTA_PROG -x -c 'report -a' $INVALID_PATH 2>/dev/null +$XFS_QUOTA_PROG -x -c 'state -a' $INVALID_PATH 2>/dev/null +$XFS_QUOTA_PROG -x -c 'free -h' $INVALID_PATH 2>/dev/null +$XFS_QUOTA_PROG -x -c 'quot -v' $INVALID_PATH 2>/dev/null +$XFS_QUOTA_PROG -x -c 'remove' $INALID_PATH 2>/dev/null +$XFS_QUOTA_PROG -x -c 'disable' $INVALID_PATH 2>/dev/null +$XFS_QUOTA_PROG -x -c 'enable' $INVALID_PATH 2>/dev/null # success, all done status=0 diff --git a/tests/xfs/304 b/tests/xfs/304 index 91fa5d97..3c38e613 100755 --- a/tests/xfs/304 +++ b/tests/xfs/304 @@ -31,7 +31,7 @@ QUOTA_DIR=$SCRATCH_MNT/quota_dir mkdir -p $QUOTA_DIR echo "*** turn off group quotas" -xfs_quota -x -c 'disable -g' $SCRATCH_MNT +$XFS_QUOTA_PROG -x -c 'disable -g' $SCRATCH_MNT rmdir $QUOTA_DIR echo "*** umount" _scratch_unmount @@ -39,7 +39,7 @@ _scratch_unmount _qmount mkdir -p $QUOTA_DIR echo "*** turn off project quotas" -xfs_quota -x -c 'disable -p' $SCRATCH_MNT +$XFS_QUOTA_PROG -x -c 'disable -p' $SCRATCH_MNT rmdir $QUOTA_DIR echo "*** umount" _scratch_unmount @@ -47,7 +47,7 @@ _scratch_unmount _qmount mkdir -p $QUOTA_DIR echo "*** turn off group/project quotas" -xfs_quota -x -c 'disable -gp' $SCRATCH_MNT +$XFS_QUOTA_PROG -x -c 'disable -gp' $SCRATCH_MNT rmdir $QUOTA_DIR echo "*** umount" _scratch_unmount diff --git a/tests/xfs/305 b/tests/xfs/305 index 0b89499a..41c7b7f8 100755 --- a/tests/xfs/305 +++ b/tests/xfs/305 @@ -38,7 +38,7 @@ _exercise() $FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >/dev/null 2>&1 & sleep 10 - xfs_quota -x -c "disable -$type" $SCRATCH_DEV + $XFS_QUOTA_PROG -x -c "disable -$type" $SCRATCH_DEV sleep 5 $KILLALL_PROG -q $FSSTRESS_PROG wait From patchwork Fri Jul 23 05:08:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12395291 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2A80C4320A for ; Fri, 23 Jul 2021 05:09:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B624660E8E for ; Fri, 23 Jul 2021 05:09:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229713AbhGWE20 (ORCPT ); Fri, 23 Jul 2021 00:28:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:59794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229698AbhGWE20 (ORCPT ); Fri, 23 Jul 2021 00:28:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 458ED60E96; Fri, 23 Jul 2021 05:09:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627016940; bh=xfc+sBUAHtcS6Hmn+m6yA2+EFrI2h3nmRnx1uI9oOps=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TMKCgHWMOXP4qXlh58WNpGw6VbtMgZcmDeESYj9iq3DvhnXaDBEodVhfFkCoYVJiv tLctSgm6U8bMCpmy1ZcSUU9DfAjZ5xt1bWqYhxRhKbju6bBEN3Mg+xSzSdHXIGQAre 6C6rkkNgyfvq3LEuR/LIOgnZLKR26LGh1l8ZxE5sk7frS3TXbh6FrWuQfzCH5X/7Wt r1DdM3MKVu1Mk0o7EZBmpBLJS9XI+4Lv3L8xQmu8T9Ys/tir7BcmA+G7sFv+9XqPqg VwnwyvwUwd48okqOo3+LE2mZM4lSazM8f57aPLWPydAsPpMAvJYvpV/PgVk9lSRfvd tbaees/sd2CTw== Date: Thu, 22 Jul 2021 22:08:59 -0700 From: "Darrick J. Wong" To: Christoph Hellwig Cc: fstests@vger.kernel.org, linux-xfs@vger.kernel.org Subject: [PATCH 8/7] xfs/152: avoid failure when quotaoff is not supported Message-ID: <20210723050859.GR559212@magnolia> References: <20210722073832.976547-1-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210722073832.976547-1-hch@lst.de> Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong Switch the test that removes the quota files to just disable enforcement and then unmount the file system as disabling quota accounting is about to go away. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- tests/xfs/152 | 20 +++++++++++++------- tests/xfs/152.out | 4 ---- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/tests/xfs/152 b/tests/xfs/152 index de85f48c..129d9c06 100755 --- a/tests/xfs/152 +++ b/tests/xfs/152 @@ -195,8 +195,9 @@ test_enable() test_off() { echo "checking off command (type=$type)" - $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ - -c "off -$type -v" $SCRATCH_MNT | _filter_scratch + _scratch_unmount + _qmount_option "" + _qmount } test_remove() @@ -257,6 +258,8 @@ qmount_idmapped() test_xfs_quota() { + local quota_options="$1" + # init quota echo "init quota limit and timer, and dump it" if [ "$idmapped" -eq 1 ]; then @@ -310,7 +313,10 @@ test_xfs_quota() echo ; test_state echo ; test_remove echo ; test_report -N - echo "quota remount"; qmount_idmapped + echo "quota remount" + _qmount_option "$quota_options" + _qmount + qmount_idmapped echo ; test_report -N # restore test @@ -329,7 +335,7 @@ id=$uqid id2=$uqid2 idmapped=0 qmount_idmapped -test_xfs_quota +test_xfs_quota "uquota,sync" echo "----------------------- uquota,sync,idmapped ---------------------------" wipe_scratch @@ -339,7 +345,7 @@ id=$uqid id2=$uqid2 idmapped=1 qmount_idmapped -test_xfs_quota +test_xfs_quota "uquota,sync" echo "----------------------- gquota,sync,unmapped ---------------------------" wipe_scratch @@ -349,7 +355,7 @@ id=$gqid id2=$gqid2 idmapped=0 qmount_idmapped -test_xfs_quota +test_xfs_quota "gquota,sync" echo "----------------------- gquota,sync,idmapped ---------------------------" wipe_scratch @@ -359,7 +365,7 @@ id=$gqid id2=$gqid2 idmapped=1 qmount_idmapped -test_xfs_quota +test_xfs_quota "gquota,sync" wipe_mounts diff --git a/tests/xfs/152.out b/tests/xfs/152.out index 1fc71fb9..b663b096 100644 --- a/tests/xfs/152.out +++ b/tests/xfs/152.out @@ -132,7 +132,6 @@ checking quota command (type=u) SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT checking off command (type=u) -User quota are not enabled on SCRATCH_DEV checking state command (type=u) @@ -296,7 +295,6 @@ checking quota command (type=u) SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT checking off command (type=u) -User quota are not enabled on SCRATCH_DEV checking state command (type=u) @@ -460,7 +458,6 @@ checking quota command (type=g) SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT checking off command (type=g) -Group quota are not enabled on SCRATCH_DEV checking state command (type=g) @@ -624,7 +621,6 @@ checking quota command (type=g) SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT checking off command (type=g) -Group quota are not enabled on SCRATCH_DEV checking state command (type=g)