From patchwork Mon Jul 12 11:11:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12370725 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 784C6C07E99 for ; Mon, 12 Jul 2021 11:12:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5092D610E6 for ; Mon, 12 Jul 2021 11:12:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233468AbhGLLPO (ORCPT ); Mon, 12 Jul 2021 07:15:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233036AbhGLLPO (ORCPT ); Mon, 12 Jul 2021 07:15:14 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E2D8C0613DD; Mon, 12 Jul 2021 04:12:26 -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=V+KO/u3GnG66QraDJkDTkR2XI53P0PtTs8keaHE0kos=; b=f+Z9xzezHTbYMKMJj9BXx+uZoa lu4grSXUKSolJxjdo5RuNAhQrF8NEAqz9V6sWViVNP8CDDwGob1q0tS/HoEW/69nlSmghSZg1Zc4U v2czbOvp83EFsx2zcbvNsoUBHVglWTKNKiflS4pkx9iCZSy5HRKKr1dOcodFE1ItQIogI8wIR6+On H92gXnVCbnVZIsIz/00/8bjXr9MQX+KtKscdr5rv+hl5aWSdjTLQkG7IGOHmaIpn70Gzjs6aBk7gD OCev6KyYwQscJaoMS4WwWSPtDzj3paD/J0f9F9ifHvL/gxJejMYGS0/TxpQ1yN1L7OmA3S5Rmzlgk 9o+QZfZg==; Received: from [2001:4bb8:184:8b7c:bd9:61b8:39ba:d78a] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m2tr0-00HXDS-2Y; Mon, 12 Jul 2021 11:12:06 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org Subject: [PATCH 1/6] common/quota: allow removing quota options entirely in _qmount_option Date: Mon, 12 Jul 2021 13:11:41 +0200 Message-Id: <20210712111146.82734-2-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712111146.82734-1-hch@lst.de> References: <20210712111146.82734-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: fstests@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 Mon Jul 12 11:11:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12370727 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 89B5CC07E99 for ; Mon, 12 Jul 2021 11:12:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 707A8610CD for ; Mon, 12 Jul 2021 11:12:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234121AbhGLLPi (ORCPT ); Mon, 12 Jul 2021 07:15:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233935AbhGLLPi (ORCPT ); Mon, 12 Jul 2021 07:15:38 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AA09C0613DD; Mon, 12 Jul 2021 04:12:50 -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=hUgB9pK4cAr+UwfpqUqx+hqKvVTl3agpw3rGCT601gs=; b=CPAsDuPaMacJt9eisrHy+cA/2s c/f199rHj9sU0uMrGendQ0pKbD6SVtUcpjFjAqY+dxY/qT6Z7VU3m6qN6a8F8F80KS1fS5JUlEx6z sfPp4LITE9i5DTmnOrIlmv5l5cJ6L8V+gdrRA6oDvtl0HUEoEG4hb6HfxsLg2EJqzZn8LOGH005oN Z6REXCfksZLvpH/hCXNbNMMts4DqXQX5JELfMQDVBQ5qsTwTdlSTJRnddaRSPeY20qkBB005JmDlW a9BWFKlEo2/OJj+IOwP7OAwjq4E2n9yYrbiDwk8LLor90z+7hvF74QqrpGo6dxZIin4WT9XdATKuc OuzhVANg==; Received: from [2001:4bb8:184:8b7c:bd9:61b8:39ba:d78a] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m2trO-00HXEe-2Q; Mon, 12 Jul 2021 11:12:34 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org Subject: [PATCH 2/6] xfs/007: unmount after disabling quota Date: Mon, 12 Jul 2021 13:11:42 +0200 Message-Id: <20210712111146.82734-3-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712111146.82734-1-hch@lst.de> References: <20210712111146.82734-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: fstests@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 Mon Jul 12 11:11:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12370733 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 5CD6FC07E99 for ; Mon, 12 Jul 2021 11:13:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 468E960FED for ; Mon, 12 Jul 2021 11:13:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234250AbhGLLQB (ORCPT ); Mon, 12 Jul 2021 07:16:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234262AbhGLLQA (ORCPT ); Mon, 12 Jul 2021 07:16:00 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8980AC0613DD; Mon, 12 Jul 2021 04:13:12 -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=SKx/k8h0UhNtZSTjHvFoBuK2uLppCQfMzMqbe1klMRU=; b=L0pFvxtkO4kq3L0X2xEGqS71Zs qpYcyMd9x9r4J2AqOL/Hyu7uI8F1O2yyxpI2+9iOcF9M13qcq+ZcDPhTPr72MHJ50YeBEcZrGEHUu 5pzI86iMxYkIMASKh/klpmofqU9JNaN9aRvEqnEWAUXA7u0S65nfHQqzNjiQbBT/+1YmLW2lv5u7g 0Y+UuVbBG9bXli8DpvbSBuC96dMrllPYfJnLKLZV5xlAODldKC9Kbg1z3p4VIE21HVb+l/hzfZdVZ 7/WkhIzjrKU+QNGXbIAd76dmV3YKSvxuI/b9HX4pkrryAa/d/iZII5LgO1fJlZLw91NaHm9CAR9xq e57PBF9w==; Received: from [2001:4bb8:184:8b7c:bd9:61b8:39ba:d78a] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m2trm-00HXGU-FQ; Mon, 12 Jul 2021 11:12:54 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org Subject: [PATCH 3/6] xfs/106: don't test disabling quota accounting Date: Mon, 12 Jul 2021 13:11:43 +0200 Message-Id: <20210712111146.82734-4-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712111146.82734-1-hch@lst.de> References: <20210712111146.82734-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: fstests@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 --- tests/xfs/106 | 45 ++++++++++++++++++------------------- tests/xfs/106.out | 57 +++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 70 insertions(+), 32 deletions(-) diff --git a/tests/xfs/106 b/tests/xfs/106 index f1397f94..5f0512d6 100755 --- a/tests/xfs/106 +++ b/tests/xfs/106 @@ -153,13 +153,6 @@ test_enable() -c "enable -$type -v" $SCRATCH_MNT | filter_state } -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 -} - test_remove() { echo "checking remove command (type=$type)" @@ -194,6 +187,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 +238,21 @@ 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 + _scratch_unmount + _qmount_option "" + _qmount 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 +264,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..2af17bc9 100644 --- a/tests/xfs/106.out +++ b/tests/xfs/106.out @@ -124,17 +124,30 @@ 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 +301,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 +478,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 Mon Jul 12 11:11:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12370735 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 6260FC07E99 for ; Mon, 12 Jul 2021 11:13:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 42B95610FA for ; Mon, 12 Jul 2021 11:13:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234146AbhGLLQW (ORCPT ); Mon, 12 Jul 2021 07:16:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234131AbhGLLQT (ORCPT ); Mon, 12 Jul 2021 07:16:19 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 783FCC0613DD; Mon, 12 Jul 2021 04:13:31 -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=hh1DzIt3D27F6QKmyRxfAeaPQr CoU0BqzB6EtbNeLWyFxQk/timBI9aZ4Se5ZR8iMyD0kky6r7a/MDLDCYYdETydXtumbliWk8BNFED fTRrrs5sM36mg9GdeEHX7v/i3vZ75tdFXt9L0g788tmaYkBAkTCPn37HtL8q5t+JUn/xpsrY3oSE0 9qdxeW9tNnftFU5tCrvq7ltqzevjjfF2lCZpT47NTbMsVM5DIz6J9cQtPfTMmCckr2iUaTaxa37Gr qURzNY4D+tywtVFVe0klZP7tXDb0hvYZiR5Ykj9nIxTE4820Rnl12HWvr6y2jP7JKQyN7pyJUzvBj TRlm1FHA==; Received: from [2001:4bb8:184:8b7c:bd9:61b8:39ba:d78a] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m2ts8-00HXI2-6a; Mon, 12 Jul 2021 11:13:23 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org Subject: [PATCH 4/6] xfs/220: avoid failure when disabling quota accounting is not supported Date: Mon, 12 Jul 2021 13:11:44 +0200 Message-Id: <20210712111146.82734-5-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712111146.82734-1-hch@lst.de> References: <20210712111146.82734-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: fstests@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 --- 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 Mon Jul 12 11:11:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12370737 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 A663BC07E9C for ; Mon, 12 Jul 2021 11:14:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 919FB610FA for ; Mon, 12 Jul 2021 11:14:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235811AbhGLLQw (ORCPT ); Mon, 12 Jul 2021 07:16:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235639AbhGLLQm (ORCPT ); Mon, 12 Jul 2021 07:16:42 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC64BC0613DD; Mon, 12 Jul 2021 04:13:53 -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=xieBsUOQPWNOtVW7+/uj5Qg2zjqMrA846E3mzziA//o=; b=UTfOSL6tzWV7idCl9ih30Wy58z 83fh5+TUkOV+GmoO5KsvAmkiBGp4eATObFwLzbZhwJX4itAa9KLtTUbH7bxBsvfMlGJ2cOSxbyRhh xatDc/TdKhA7odx/wVzJ4Q0KeCvBq/NB0mtWpHqkY+9pyKg4NeuUoUWEcyVRyqKrwpizyIYzhS5qK K/2KiFtF8NIO61xeSEgMlgjfGhEIlK0RTncaDHj1BgKoYocPmUmeEIkOmbLEiKeL7YCkyOhfE8qXa 7FHamCvrmZ2+agcqEmshIvpoHkqCrhtjf5ONRrv0cZEyU3lRt5IGFBaCU+9LEmZRdxH5+1Dv0G6MI 2QyrK7wA==; Received: from [2001:4bb8:184:8b7c:bd9:61b8:39ba:d78a] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m2tsR-00HXJw-AB; Mon, 12 Jul 2021 11:13:37 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org Subject: [PATCH 5/6] xfs/304: don't turn quota accounting off Date: Mon, 12 Jul 2021 13:11:45 +0200 Message-Id: <20210712111146.82734-6-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712111146.82734-1-hch@lst.de> References: <20210712111146.82734-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: fstests@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 Mon Jul 12 11:11:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12370739 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 DACDEC07E99 for ; Mon, 12 Jul 2021 11:14:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B2D16610C7 for ; Mon, 12 Jul 2021 11:14:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236383AbhGLLRK (ORCPT ); Mon, 12 Jul 2021 07:17:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235456AbhGLLQ4 (ORCPT ); Mon, 12 Jul 2021 07:16:56 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBC50C0613DD; Mon, 12 Jul 2021 04:14:07 -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=ZA4VP6EOXAg966+D6EAwKT23yxSFLPZH1bPIJnsKkSk=; b=ITMdY4BUJ5Vj5WZnyBThWZK/9g irUEGep3quRLu/9o0HQFXQmkEIuic4crwUowX6x1Yw7xlC6+8yIpGlhSZ5H8/Ad+YwtKeTXTKOOz9 KuyUgyZJbyihvwMnHnHhPR4pj3W4XtD08q6weTQC+8jzJvHiQBpNcLP7FD3SrH5PWxxTuJdQtlfR/ rMb70B2p1INuVPt6VPCrwveFVDSz6iyefxSvIguZ6npeJCoAxu18HqNOO/tMe/xSheXiWU5JS0fwU RZ94jJjO4sUcnQL1c3g+cHbO5kpwN8axOcjOwksNGy3h3CoMc5go91GMJvg7KgkeMz4O7J5EgxUJw +IfuOymA==; Received: from [2001:4bb8:184:8b7c:bd9:61b8:39ba:d78a] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m2tsn-00HXKw-LM; Mon, 12 Jul 2021 11:13:57 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org Subject: [PATCH 6/6] xfs/305: don't turn quota accounting off Date: Mon, 12 Jul 2021 13:11:46 +0200 Message-Id: <20210712111146.82734-7-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712111146.82734-1-hch@lst.de> References: <20210712111146.82734-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: fstests@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