From: Anand Jain <anand.jain@oracle.com>
To: Boris Burkov <boris@bur.io>,
linux-btrfs@vger.kernel.org, kernel-team@fb.com,
fstests@vger.kernel.org
Subject: Re: [PATCH v3 4/6] btrfs: quota rescan helpers
Date: Thu, 28 Sep 2023 20:58:12 +0800 [thread overview]
Message-ID: <c3de3910-0f09-ce8f-4a7d-7926f5a1e043@oracle.com> (raw)
In-Reply-To: <1111e2f58d73dfe7571598cdd044211e15076a1b.1695856385.git.boris@bur.io>
On 28/09/2023 07:14, Boris Burkov wrote:
> Many btrfs tests explicitly trigger quota rescan. This is not a
> meaningful operation for simple quotas, so we wrap it in a helper that
> doesn't blow up quite so badly and lets us run those tests where the
> rescan is a qgroup detail.
>
> Signed-off-by: Boris Burkov <boris@bur.io>
> ---
> common/btrfs | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/common/btrfs b/common/btrfs
> index 37796cc6e..0053fec48 100644
> --- a/common/btrfs
> +++ b/common/btrfs
> @@ -710,6 +710,24 @@ _check_regular_qgroup()
> _qgroup_mode "$@" | grep -q 'qgroup'
> }
>
> +_qgroup_rescan()
> +{
> + local mnt=$1
> +
> + _check_regular_qgroup $dev || return 1
$dev is not initialized.
Test case such as btrfs/028 fails with MKFS_OPTIONS="-O squota" config
option.
btrfs/028 30s ... [failed, exit status 1]- output mismatch (see
/xfstests-dev/results//btrfs/028.out.bad)
--- tests/btrfs/028.out 2023-02-20 12:32:31.399005973 +0800
+++ /xfstests-dev/results//btrfs/028.out.bad 2023-09-28
20:54:52.744848575 +0800
@@ -1,2 +1,3 @@
QA output created by 028
-Silence is golden
+failed: '/usr/local/bin/btrfs quota rescan -w /mnt/scratch'
+(see /xfstests-dev/results//btrfs/028.full for details)
...
(Run 'diff -u /xfstests-dev/tests/btrfs/028.out
/xfstests-dev/results//btrfs/028.out.bad' to see the entire diff)
Thanks, Anand
> + _run_btrfs_util_prog quota rescan -w $mnt
> +}
> +
> +_require_qgroup_rescan()
> +{
> + _scratch_mkfs >>$seqres.full 2>&1
> + _scratch_mount
> + _run_btrfs_util_prog quota enable $SCRATCH_MNT
> + $BTRFS_UTIL_PROG quota rescan -w $SCRATCH_MNT || \
> + _notrun "not able to run quota rescan"
> + _scratch_unmount
> +}
> +
> _require_scratch_qgroup()
> {
> _scratch_mkfs >>$seqres.full 2>&1
next prev parent reply other threads:[~2023-09-28 12:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-27 23:14 [PATCH v3 0/6] btrfs: simple quotas fstests Boris Burkov
2023-09-27 23:14 ` [PATCH v3 1/6] common: refactor sysfs_attr functions Boris Burkov
2023-09-27 23:14 ` [PATCH v3 2/6] btrfs: quota mode helpers Boris Burkov
2023-09-28 13:07 ` Anand Jain
2023-09-27 23:14 ` [PATCH v3 3/6] btrfs/301: new test for simple quotas Boris Burkov
2023-09-28 15:39 ` Filipe Manana
2023-09-27 23:14 ` [PATCH v3 4/6] btrfs: quota rescan helpers Boris Burkov
2023-09-28 12:58 ` Anand Jain [this message]
2023-09-27 23:14 ` [PATCH v3 5/6] btrfs: use new rescan wrapper Boris Burkov
2023-09-27 23:14 ` [PATCH v3 6/6] btrfs: skip squota incompatible tests Boris Burkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c3de3910-0f09-ce8f-4a7d-7926f5a1e043@oracle.com \
--to=anand.jain@oracle.com \
--cc=boris@bur.io \
--cc=fstests@vger.kernel.org \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).