From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz
Cc: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
Qu Wenruo <wqu@suse.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
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: Sat, 17 Feb 2024 10:37:11 +1030 [thread overview]
Message-ID: <25afb718-9aa1-417a-95fb-144b39010932@gmx.com> (raw)
In-Reply-To: <20240214072931.GN355@twin.jikos.cz>
在 2024/2/14 17:59, David Sterba 写道:
> On Mon, Feb 12, 2024 at 08:20:21PM +1030, Qu Wenruo wrote:
>>
>>
>> On 2024/2/12 20:15, Johannes Thumshirn wrote:
>>> 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).
>>
>> At the time of calling, we haven't yet populate fs_info->zone_size, thus
>> we have to use super flags to verify if it's zoned.
>>
>> If needed, I can add a comment for it.
>
> Yes please add a comment the difference is quite subtle.
>
I'd say this patch can be dropped.
The reason is:
- I'm already working on the proper subpage handling for the
@locked_page of a delalloc range
The patchset is under testing now, the results looks fine for
both regular and subpage cases.
Will queue extra testing for subpage zoned.
- The rejection would cause future problems for detecting whether we
have proper subpage + zoned support.
Either we do not detect, or introduce a complex mechanism only for
this one edge case.
Thus I prefer not to detect.
- Subage + zoned is too niche for now
The most common subpage usage would be aarch64 (especially for Apple
M1/2 chips).
For those Apple based ones, they have no ability to expand, thus won't
hit any real zoned devices.
For other aarch64 servers, they should have the ability to choose a 4K
page size kernel if they really want to go zoned devices.
This bug is only exposed with a helpful reporter using 16K page sized
loongson board with SATA zoned disk.
Due to above reasons, I really prefer to keep the current situation, and
focus on the proper fix instead.
Thanks,
Qu
next prev parent reply other threads:[~2024-02-17 0:07 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
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 [this message]
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=25afb718-9aa1-417a-95fb-144b39010932@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=Johannes.Thumshirn@wdc.com \
--cc=dsterba@suse.cz \
--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