Commit 5cc99b89 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

sd: only call disk_clear_zoned when needed

disk_clear_zoned only needs to be called when a device reported zone
managed mode first and we clear it.  Add a check so that disk_clear_zoned
isn't called on devices that were never zoned.

This avoids a fairly expensive queue freezing when revalidating
conventional devices.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20231217165359.604246-6-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d73e93b4
......@@ -3149,7 +3149,7 @@ 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 {
} else if (blk_queue_is_zoned(q)) {
/*
* Anything else. This includes host-aware device that we treat
* as conventional.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment