Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20231217165359.604246-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
5cc99b89 d73e93b4

+1 -1
+1 -1
drivers/scsi/sd.c
··· 3149 3149 * the device physical block size. 3150 3150 */ 3151 3151 blk_queue_zone_write_granularity(q, sdkp->physical_block_size); 3152 - } else { 3152 + } else if (blk_queue_is_zoned(q)) { 3153 3153 /* 3154 3154 * Anything else. This includes host-aware device that we treat 3155 3155 * as conventional.