[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87ilb9h2yz.fsf@metaspace.dk>
Date: Tue, 27 Jun 2023 07:45:25 +0200
From: "Andreas Hindborg (Samsung)" <nmi@...aspace.dk>
To: Damien Le Moal <dlemoal@...nel.org>
Cc: Johannes Thumshirn <Johannes.Thumshirn@....com>,
"open list:ZONEFS FILESYSTEM" <linux-fsdevel@...r.kernel.org>,
"gost.dev@...sung.com" <gost.dev@...sung.com>,
Naohiro Aota <Naohiro.Aota@....com>,
Johannes Thumshirn <jth@...nel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] zonefs: do not use append if device does not support it
Damien Le Moal <dlemoal@...nel.org> writes:
> On 6/27/23 03:23, Andreas Hindborg (Samsung) wrote:
>>
>> Johannes Thumshirn <Johannes.Thumshirn@....com> writes:
>>
>>> On 26.06.23 18:47, Andreas Hindborg wrote:
>>>> From: "Andreas Hindborg (Samsung)" <nmi@...aspace.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
Powered by blists - more mailing lists