aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorDamien Le Moal <dlemoal@kernel.org>2026-09-08 17:57:31 +0900
committerJens Axboe <axboe@kernel.dk>2026-09-15 06:53:06 -0600
commit496b9748884cf8b1c656a69eadc9f9f7eb84eb4e (patch)
treed22e84f971f675f95352c683c10fd3fa9475431f /scripts/Makefile.thinlto
parentblock: remove disk_free_zone_resources() (diff)
block: improve capacity handling during zone revalidation
While executing blk_revalidate_disk_zones(), a disk capacity is looked at using get_capacity() several times: on entry to blk_revalidate_disk_zones(), when allocating zone revalidation arguments in disk_revalidate_zone_resources(), while validating zones in blk_revalidate_zone_cb() and one last time at the end of blk_revalidate_disk_zones() to check that all zones have been inspected. Since this is all done while passthrough commands can be issued, it is possible that a capacity change operation (e.g. the removal of a storage element on a SCSI or SATA disk) is concurrently executed, potentially resulting in an inconsistent or conflicting revalidation with potentially out-of-bound accesses to the zone condition array. Prevent issues by using get_capacity() once on entry to blk_revalidate_disk_zones(), remembering this capacity as a field of struct blk_revalidate_zone_args and using that field while revalidating zones. A final second call to get_capacity() is done at the end of blk_revalidate_disk_zones() to ensure that the disk capacity has not changed, thus revalidating the capacity (and number of zones) itself. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20260908085745.1082697-3-dlemoal@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions