Re: [PATCH v2 12/13] block: simplify disk_zone_set_cond()
Hannes Reinecke <[email protected]> Fri, 7 Aug 2026 13:51:43 +0200
| Newsgroups | org.kernel.vger.linux-block |
|---|---|
| Message-ID | <[email protected]> |
On 8/6/26 6:04 PM, Damien Le Moal wrote: > disk_zone_set_cond() is used to set a zone condition afer a reset, a afer -> after > finish or a reset all operation. For a single zone reset or finish, we are > guaranteed that the target zone is a sequential one that is not offline > nor read-only (otherwise, the operation would have failed). For a reset > all operation, there is no point in calling this function for offline and > read-only zones since the condition checks in disk_zone_set_cond() will > result in nothing being done. > > Simplify all this using disk_zone_is_offline_or_readonly() in > blk_zone_reset_all_bio_endio() to skip zones that are offline or > read-only. This change allows simplifying disk_zone_set_cond() by removing > the zone condition checks. This change is also consistent with the fact > that conventional zones can now have the offline or read-only condition. > > Signed-off-by: Damien Le Moal <[email protected]> > --- > block/blk-zoned.c | 26 ++++++-------------------- > 1 file changed, 6 insertions(+), 20 deletions(-) > Otherwise: 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