]> git.itanic.dy.fi Git - linux-stable/commitdiff
sd: remove the !ZBC && blk_queue_is_zoned case in sd_read_block_characteristics
authorChristoph Hellwig <hch@lst.de>
Thu, 28 Dec 2023 07:51:40 +0000 (07:51 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 8 Jan 2024 15:27:22 +0000 (08:27 -0700)
Now that host-aware devices are always treated as conventional this case
can't happen.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20231228075141.362560-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/sd.c

index 6bedd2d5298f6d090e1d87d49c893e87070d821a..dace4aa8e3534d51db4bed70acb3387a0ef82092 100644 (file)
@@ -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 */