]> git.ipfire.org Git - thirdparty/linux.git/commit
blk-lib: check for kill signal
authorKeith Busch <kbusch@kernel.org>
Fri, 23 Feb 2024 15:59:10 +0000 (07:59 -0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 24 Feb 2024 19:46:46 +0000 (12:46 -0700)
commit8a08c5fd89b447a7de7eb293a7a274c46b932ba2
treed7c9d860ed39b9419d0bf674ddb89976962e54a6
parent0eb4db4706603db09644ec3bc9bb0d63ea5d326c
blk-lib: check for kill signal

Some of these block operations can access a significant capacity and
take longer than the user expected. A user may change their mind about
wanting to run that command and attempt to kill the process and do
something else with their device. But since the task is uninterruptable,
they have to wait for it to finish, which could be many hours.

Check for a fatal signal at each iteration so the user doesn't have to
wait for their regretted operation to complete naturally.

Reported-by: Conrad Meyer <conradmeyer@meta.com>
Tested-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20240223155910.3622666-5-kbusch@meta.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-lib.c