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

Hannes Reinecke <[email protected]>
Newsgroups org.kernel.vger.linux-block
Message-ID <[email protected]>
On 8/11/26 12:58 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]>
> Reviewed-by: Bart Van Assche <[email protected]>
> ---
>   block/blk-zoned.c | 110 +++++++++++++++++++++++++---------------------
>   1 file changed, 59 insertions(+), 51 deletions(-)
> 
Reviewed-by: Hannes Reinecke <[email protected]>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
[email protected]                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.