Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: Qu Wenruo <wqu@suse.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Cc: HAN Yuwei <hrx@bupt.moe>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] btrfs: reject zoned RW mount if sectorsize is smaller than page size
Date: Mon, 12 Feb 2024 09:45:21 +0000	[thread overview]
Message-ID: <11533563-8e88-4b4f-acc3-0846ec3e8d1f@wdc.com> (raw)
In-Reply-To: <2a19a500ccb297397018dac23d30106977153d62.1707714970.git.wqu@suse.com>

On 12.02.24 06:16, Qu Wenruo wrote:
> Reported-by: HAN Yuwei <hrx@bupt.moe>
> Link: https://lore.kernel.org/all/1ACD2E3643008A17+da260584-2c7f-432a-9e22-9d390aae84cc@bupt.moe/
> CC: stable@vger.kernel.org # 5.10+
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
>   fs/btrfs/disk-io.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index c3ab268533ca..85cd23aebdd6 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -3193,7 +3193,8 @@ int btrfs_check_features(struct btrfs_fs_info *fs_info, bool is_rw_mount)
>   	 * part of @locked_page.
>   	 * That's also why compression for subpage only work for page aligned ranges.
>   	 */
> -	if (fs_info->sectorsize < PAGE_SIZE && btrfs_is_zoned(fs_info) && is_rw_mount) {
> +	if (fs_info->sectorsize < PAGE_SIZE &&
> +	    btrfs_fs_incompat(fs_info, ZONED) && is_rw_mount) {
>   		btrfs_warn(fs_info,
>   	"no zoned read-write support for page size %lu with sectorsize %u",
>   			   PAGE_SIZE, fs_info->sectorsize);

Please keep btrfs_is_zoned(fs_info) instead of using 
btrfs_fs_incompat(fs_info, ZONED).

Otherwise,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

  reply	other threads:[~2024-02-12  9:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-12  5:16 [PATCH] btrfs: reject zoned RW mount if sectorsize is smaller than page size Qu Wenruo
2024-02-12  9:45 ` Johannes Thumshirn [this message]
2024-02-12  9:50   ` Qu Wenruo
2024-02-12 10:25     ` Johannes Thumshirn
2024-02-14  7:29     ` David Sterba
2024-02-17  0:07       ` Qu Wenruo
2024-02-12 11:14 ` David Sterba
2024-02-12 22:54   ` Qu Wenruo
2024-02-14  7:28 ` David Sterba

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=11533563-8e88-4b4f-acc3-0846ec3e8d1f@wdc.com \
    --to=johannes.thumshirn@wdc.com \
    --cc=hrx@bupt.moe \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=stable@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