[PATCH v2 07/15] block: track zone conditions

Johannes Thumshirn Johannes.Thumshirn at wdc.com
Mon Nov 3 07:00:28 PST 2025


On 11/3/25 2:42 PM, Damien Le Moal wrote:
> @@ -770,12 +857,18 @@ static void blk_zone_reset_all_bio_endio(struct bio *bio)
>   		}
>   	}
>   	rcu_read_unlock();
> +
> +	/* Update the cached zone conditions. */
> +	for (sector = 0; sector < get_capacity(disk);
> +	     sector += bdev_zone_sectors(bio->bi_bdev))
> +		disk_zone_set_cond(disk, sector, BLK_ZONE_COND_EMPTY);
>   }
>   

Reset all endio might not be the fastpath but the repeated calls to 
get_capacity() seems superfluous.

Other than that,

Reviewed-by: Johannes Thumshirn <johannes.thumshirn at wdc.com>



More information about the Linux-nvme mailing list