Skip to content

Commit 6945a18

Browse files
Christoph Hellwigaxboe
authored andcommitted
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 <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>
1 parent e3d7581 commit 6945a18

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/scsi/sd.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3149,12 +3149,11 @@ static void sd_read_block_characteristics(struct scsi_disk *sdkp)
31493149
* the device physical block size.
31503150
*/
31513151
blk_queue_zone_write_granularity(q, sdkp->physical_block_size);
3152-
} else if (blk_queue_is_zoned(q)) {
3152+
} else {
31533153
/*
3154-
* Anything else. This includes host-aware device that we treat
3155-
* as conventional.
3154+
* Host-aware devices are treated as conventional.
31563155
*/
3157-
disk_clear_zoned(sdkp->disk);
3156+
WARN_ON_ONCE(blk_queue_is_zoned(q));
31583157
}
31593158
#endif /* CONFIG_BLK_DEV_ZONED */
31603159

0 commit comments

Comments
 (0)