All of lore.kernel.org
 help / color / mirror / Atom feed
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 v2] btrfs: test block group size class loading logic
Date: Thu, 26 Jan 2023 16:56:07 +0800	[thread overview]
Message-ID: <76463f9b-2b12-5282-7f9c-3478562265ab@oracle.com> (raw)
In-Reply-To: <4ea6df6e4f96b6e6101a16a1c94fc967d54558c7.1674686506.git.boris@bur.io>

On 26/01/2023 06:43, Boris Burkov wrote:
> Add a new test which checks that size classes in freshly loaded block
> groups after a cycle mount match size classes before going down
> 
> Depends on the kernel patch:
> btrfs: add size class stats to sysfs
> 
> Signed-off-by: Boris Burkov <boris@bur.io>
> ---
> v2: drop the fixed_by_kernel_commit since the fix is not out past the
> btrfs development tree, so the fix is getting rolled in to the original
> broken commit. Modified the commit message to note the dependency on the
> new sysfs counters.

You can add it as below, it will be helpful to some extent.
Depending on the status of the kernel patch at a later point,
we can update the fixed_by_kernel_commit.

fixed_by_kernel_commit xxxxxxxx "btrfs: add size class stats to sysfs".


> 
>   tests/btrfs/283     | 49 +++++++++++++++++++++++++++++++++++++++++++++
>   tests/btrfs/283.out |  2 ++
>   2 files changed, 51 insertions(+)
>   create mode 100755 tests/btrfs/283
>   create mode 100644 tests/btrfs/283.out
> 
> diff --git a/tests/btrfs/283 b/tests/btrfs/283
> new file mode 100755
> index 00000000..b3614786
> --- /dev/null
> +++ b/tests/btrfs/283
> @@ -0,0 +1,49 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (c) 2023 Meta Platforms, Inc.  All Rights Reserved.
> +#
> +# FS QA Test 283
> +#
> +# Test that mounting a btrfs filesystem properly loads block group size classes.
> +#
> +. ./common/preamble
> +_begin_fstest auto quick mount
> +
> +sysfs_size_classes() {
> +	local uuid="$(findmnt -n -o UUID "$SCRATCH_MNT")"
> +	cat "/sys/fs/btrfs/$uuid/allocation/data/size_classes"

The kernels without the sysfs patch must fail with not_run.
  _require_fs_sysfs() will help here.

Thx.


      reply	other threads:[~2023-01-26  8:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25 22:43 [PATCH v2] btrfs: test block group size class loading logic Boris Burkov
2023-01-26  8:56 ` Anand Jain [this message]

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=76463f9b-2b12-5282-7f9c-3478562265ab@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.