linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: Boris Burkov <boris@bur.io>
Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com, fstests@vger.kernel.org
Subject: Re: [PATCH 3/5] common/btrfs: quota rescan helpers
Date: Thu, 13 Jul 2023 16:30:36 -0400	[thread overview]
Message-ID: <20230713203036.GA207541@perftesting> (raw)
In-Reply-To: <0e9cb76f3ddad71bb36b70464b62423b77fd6399.1688600422.git.boris@bur.io>

On Wed, Jul 05, 2023 at 04:42:25PM -0700, 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 | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/common/btrfs b/common/btrfs
> index 66c065a10..d88feaded 100644
> --- a/common/btrfs
> +++ b/common/btrfs
> @@ -715,6 +715,31 @@ _qgroup_mode()
>  	fi
>  }
>  
> +_check_regular_qgroup()
> +{
> +	local mnt=$1
> +
> +	_qgroup_mode $mnt | grep -q 'qgroup'
> +}
> +
> +_qgroup_rescan()
> +{
> +	local mnt=$1
> +
> +	_check_regular_qgroup $mnt || return 1
> +	_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
> +}

Looks like whitespace errors here.  Thanks,

Josef

  reply	other threads:[~2023-07-13 20:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-05 23:42 [PATCH 0/5] btrfs: simple quotas fstests Boris Burkov
2023-07-05 23:42 ` [PATCH 1/5] btrfs/400: new test for simple quotas Boris Burkov
2023-09-22 15:40   ` Anand Jain
2023-09-22 15:50     ` Anand Jain
2023-09-27 17:57     ` Boris Burkov
2023-07-05 23:42 ` [PATCH 2/5] common/btrfs: quota mode helpers Boris Burkov
2023-09-22 16:34   ` Anand Jain
2023-07-05 23:42 ` [PATCH 3/5] common/btrfs: quota rescan helpers Boris Burkov
2023-07-13 20:30   ` Josef Bacik [this message]
2023-07-05 23:42 ` [PATCH 4/5] btrfs: use new rescan wrapper Boris Burkov
2023-07-05 23:42 ` [PATCH 5/5] 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=20230713203036.GA207541@perftesting \
    --to=josef@toxicpanda.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).