aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@wdc.com>2021-01-28 13:47:33 +0900
committerJens Axboe <axboe@kernel.dk>2021-02-10 07:44:41 -0700
commit78e1663f19b5c34579cf186e776df3bf1ed326a5 (patch)
tree43b07545210681acced497a9b210f6037fd9ba88 /Documentation/filesystems
parentblock: introduce blk_queue_clear_zone_settings() (diff)
downloadlinux-dev-78e1663f19b5c34579cf186e776df3bf1ed326a5.tar.xz
linux-dev-78e1663f19b5c34579cf186e776df3bf1ed326a5.zip
sd_zbc: clear zone resources for non-zoned case
For host-aware ZBC disk, setting the device zoned model to BLK_ZONED_HA using blk_queue_set_zoned() in sd_read_block_characteristics() may result in the block device effective zoned model to be "none" (BLK_ZONED_NONE) if partitions are present on the device. In this case, sd_zbc_read_zones() should not setup the zone related queue limits for the disk so that the device limits and configuration is consistent with a regular disk and resources not uselessly allocated (e.g. the zone write pointer tracking array for zone append emulation). Furthermore, if the disk zoned model changes at run time due to the creation of a partition by the user, the zone related resources can be released. Fix both problems by introducing the function sd_zbc_clear_zone_info() to reset the scsi disk zone information and free resources and by returning early in sd_zbc_read_zones() for a block device that has a zoned model equal to BLK_ZONED_NONE. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@edc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'Documentation/filesystems')
0 files changed, 0 insertions, 0 deletions