summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
author胡连勤 <hulianqin@vivo.com>2026-08-12 11:59:04 +0000
committerJens Axboe <axboe@kernel.dk>2026-08-15 17:18:11 -0600
commit7e9a46004b471eaf69b082c473d865316a4158e0 (patch)
tree1b6c47ca7738d7cbce136aa0985bd18cddd60233 /tools/perf/scripts/python/bin/stackcollapse-report
parentf9820056e40ccea2919fcac0d27d13eb59548274 (diff)
block: set QUEUE_FLAG_DYING unconditionally in blk_mark_disk_dead()
Disks created via blk_mq_alloc_disk_for_queue() (e.g. SCSI SD disks) do not have GD_OWNS_QUEUE set. Currently __blk_mark_disk_dead() only sets QUEUE_FLAG_DYING when GD_OWNS_QUEUE is set, so for such disks blk_queue_enter() and __bio_queue_enter() cannot detect the dying state via blk_queue_dying() and remain blocked waiting for I/O that will never complete after surprise removal. blk_mark_disk_dead() is the explicit "surprise removal" API -- the caller has already decided the disk is dead. Setting QUEUE_FLAG_DYING unconditionally here is appropriate: any in-flight I/O from other threads should get -ENODEV immediately from blk_queue_enter() regardless of GD_OWNS_QUEUE ownership. For disks that already have GD_OWNS_QUEUE set, __blk_mark_disk_dead() will set the flag again which is harmless. Fixes: 6f8191fdf41d ("block: simplify disk shutdown") Cc: stable@vger.kernel.org Signed-off-by: Lianqin Hu <hulianqin@vivo.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/PUZPR06MB62247E82E66A3ED46CC3E6C7D2DC2@PUZPR06MB6224.apcprd06.prod.outlook.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions