FSTests Archive mirror
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Qu Wenruo <wqu@suse.com>,
	linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH] fstests: btrfs: detect regular qgroup for older kernels correctly
Date: Mon, 26 Feb 2024 12:06:09 +0530	[thread overview]
Message-ID: <9ee33bad-717c-4d6c-9fb2-0ae579bc2370@oracle.com> (raw)
In-Reply-To: <20240220040134.81084-1-wqu@suse.com>

On 2/20/24 09:31, Qu Wenruo wrote:
> [BUG]
> When running an older (vendoer v6.4) kernel, some qgroup test cases
> would be skipped:
> 
>    btrfs/017 1s ... [not run] not running normal qgroups
> 
> [CAUSE]
> With the introduce of simple quota mode, there is a new sysfs interface,
> /sys/fs/btrfs/<uuid>/qgroups/mode to indicate the currently running
> qgroup modes.
> 
> And _qgroup_mode() from `common/btrfs` is using that new interface to
> detect the mode.
> 
> Unfortuantely for older kernels without simple quota support,
> _qgroup_mode() would return "disabled" directly, causing those test case
> to be skipped.
> 
> [FIX]
> Fallback to regular qgroup if that sysfs interface is not accessible, as
> qgroup is introduced from the very beginning of btrfs, thus the regular
> qgroup is always supported.
> 
> Signed-off-by: Qu Wenruo <wqu@suse.com>


Reviewed-by: Anand Jain <anand.jain@oracle.com>

Sorry for missing this patch. Now, applied and staged for the next PR.

Thanks.

> ---
>   common/btrfs | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/btrfs b/common/btrfs
> index e1b29c61..0a3f0f0b 100644
> --- a/common/btrfs
> +++ b/common/btrfs
> @@ -728,7 +728,7 @@ _qgroup_mode()
>   	if _has_fs_sysfs_attr $dev /qgroups/mode; then
>   		_get_fs_sysfs_attr $dev qgroups/mode
>   	else
> -		echo "disabled"
> +		echo "qgroup"
>   	fi
>   }
>   


      parent reply	other threads:[~2024-02-26  6:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20  4:01 [PATCH] fstests: btrfs: detect regular qgroup for older kernels correctly Qu Wenruo
2024-02-20 11:11 ` Filipe Manana
2024-02-26  6:36 ` 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=9ee33bad-717c-4d6c-9fb2-0ae579bc2370@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).