Re: [PATCH v2 09/13] block: always treat offline and read-only zones as dead

Damien Le Moal <[email protected]> Fri, 7 Aug 2026 08:48:11 -0700
Newsgroups org.kernel.vger.linux-block
Organization Western Digital Research
Message-ID <[email protected]>
On 2026/08/07 3:46, Hannes Reinecke wrote:
> On 8/6/26 6:04 PM, Damien Le Moal wrote:
>> Since any write BIO targeting an offline or a read-only zone will fail,
>> there is no point in keeping zone write plugs for these zones.
>> So for any offline or read-only zone, the zone write plug should always
>> be treated as dead.
>>
>> Do this by modifying disk_check_zone_wplug_dead() to always mark read-only
>> and offline zones as dead to force a removal of the zone write plug from
>> the disk hash table on BIO submission. blk_zone_wplug_prepare_bio() is
>> also modified to have the same checks to immediately fail a write BIO
>> targeting a read-only or offline zone. With these two changes, any newly
>> issued or unplugged write BIO targeting a read-only or offline zone is
>> immediately failed.
>>
>> Finally, disk_zone_wplug_sync_state() is modified to add a call to
>> disk_mark_zone_wplug_dead() for the zone write plug of any read-only or
>> offline zone found during zone revalidation or a report zones.
>>
>> Signed-off-by: Damien Le Moal <[email protected]>
>> ---
>>   block/blk-zoned.c | 113 +++++++++++++++++++++++++---------------------
>>   1 file changed, 61 insertions(+), 52 deletions(-)
>>
> Makes one feeling sorry for filesystems having to deal with this ..

Yeah. If you depop a head under a mounted FS, the FS will not be happy :)

For file systems that can support it (e.g. XFS with metadata & log on a
different device), the plan is to execute depop going through the file system,
so that the FS can synchronize itself with zones going offline so that it does
not uselessly trip on IO errors and also can notify the user of affected files.


-- 
Damien Le Moal
Western Digital Research