On 12/28/23 08:51, Christoph Hellwig wrote:
Now that host-aware devices are always treated as conventional this case can't happen. Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- drivers/scsi/sd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 6bedd2d5298f6d..dace4aa8e3534d 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3149,12 +3149,11 @@ static void sd_read_block_characteristics(struct scsi_disk *sdkp) * the device physical block size. */ blk_queue_zone_write_granularity(q, sdkp->physical_block_size); - } else if (blk_queue_is_zoned(q)) { + } else { /* - * Anything else. This includes host-aware device that we treat - * as conventional. + * Host-aware devices are treated as conventional. */ - disk_clear_zoned(sdkp->disk); + WARN_ON_ONCE(blk_queue_is_zoned(q)); } #endif /* CONFIG_BLK_DEV_ZONED */
Reviewed-by: Hannes Reinecke <hare@xxxxxxx> Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@xxxxxxx +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), GF: Ivo Totev, Andrew McDonald, Werner Knoblich