From 6945a1804e5c2a3382232a8d6c2143930b833362 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 28 Dec 2023 07:51:40 +0000 Subject: [PATCH] sd: remove the !ZBC && blk_queue_is_zoned case in sd_read_block_characteristics Now that host-aware devices are always treated as conventional this case can't happen. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20231228075141.362560-2-hch@lst.de Signed-off-by: Jens Axboe --- 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 6bedd2d5298f6..dace4aa8e3534 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 */ -- 2.30.2