From: "Andreas Hindborg (Samsung)" <nmi@metaspace.dk>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
"open list:ZONEFS FILESYSTEM" <linux-fsdevel@vger.kernel.org>,
"gost.dev@samsung.com" <gost.dev@samsung.com>,
Naohiro Aota <Naohiro.Aota@wdc.com>,
Johannes Thumshirn <jth@kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] zonefs: do not use append if device does not support it
Date: Tue, 27 Jun 2023 07:45:25 +0200 [thread overview]
Message-ID: <87ilb9h2yz.fsf@metaspace.dk> (raw)
In-Reply-To: <7481472f-8950-0801-029c-85264b671c19@kernel.org>
Damien Le Moal <dlemoal@kernel.org> writes:
> On 6/27/23 03:23, Andreas Hindborg (Samsung) wrote:
>>
>> Johannes Thumshirn <Johannes.Thumshirn@wdc.com> writes:
>>
>>> On 26.06.23 18:47, Andreas Hindborg wrote:
>>>> From: "Andreas Hindborg (Samsung)" <nmi@metaspace.dk>
>>>>
>>>> Zonefs will try to use `zonefs_file_dio_append()` for direct sync writes even if
>>>> device `max_zone_append_sectors` is zero. This will cause the IO to fail as the
>>>> io vector is truncated to zero. It also causes a call to
>>>> `invalidate_inode_pages2_range()` with end set to UINT_MAX, which is probably
>>>> not intentional. Thus, do not use append when device does not support it.
>>>>
>>>
>>> I'm sorry but I think it has been stated often enough that for Linux Zone Append
>>> is a mandatory feature for a Zoned Block Device. Therefore this path is essentially
>>> dead code as max_zone_append_sectors will always be greater than zero.
>>>
>>> So this is a clear NAK from my side.
>>
>> OK, thanks for clarifying 👍 I came across this bugging out while
>> playing around with zone append for ublk. The code makes sense if the
>> stack expects append to always be present.
>>
>> I didn't follow the discussion, could you reiterate why the policy is
>> that zoned devices _must_ support append?
>
> To avoid support fragmentation and for performance. btrfs zoned block device
> support requires zone append and using that command makes writes much faster as
> we do not have to go through zone locking.
> Note that for zonefs, I plan to add async zone append support as well, linked
> with O_APPEND use to further improve write performance with ZNS drives.
>
Thanks for clarifying, Damien 👍
BR Andreas
next prev parent reply other threads:[~2023-06-27 5:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 16:47 [PATCH] zonefs: do not use append if device does not support it Andreas Hindborg
2023-06-26 17:54 ` Johannes Thumshirn
2023-06-26 18:23 ` Andreas Hindborg (Samsung)
2023-06-27 0:21 ` Damien Le Moal
2023-06-27 5:45 ` Andreas Hindborg (Samsung) [this message]
2023-06-27 3:45 ` Christoph Hellwig
2023-06-27 4:45 ` Damien Le Moal
2023-06-27 4:48 ` Christoph Hellwig
2023-06-27 4:50 ` Damien Le Moal
2023-06-27 5:14 ` Andreas Hindborg (Samsung)
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=87ilb9h2yz.fsf@metaspace.dk \
--to=nmi@metaspace.dk \
--cc=Johannes.Thumshirn@wdc.com \
--cc=Naohiro.Aota@wdc.com \
--cc=dlemoal@kernel.org \
--cc=gost.dev@samsung.com \
--cc=jth@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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