diff options
author | Christoph Hellwig <hch@lst.de> | 2024-05-06 06:20:27 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-05-07 07:29:42 -0600 |
commit | 719c15a75ebf3bda3ca718fe8e0ce63d262ec7ae (patch) | |
tree | 43ba4e2c2a447399d98e8533d0aa7707440609d5 /include | |
parent | 0f8e9ecc4636e3abb4f3cf1ead14c94cce7dfde8 (diff) |
blk-lib: check for kill signal in ioctl BLKDISCARD
Discards 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.
Open code blkdev_issue_discard in the BLKDISCARD ioctl handler and check
for a fatal signal at each iteration so the user doesn't have to wait
for their regretted operation to complete naturally.
Heavily based on an earlier patch from Keith Busch.
Reported-by: Conrad Meyer <conradmeyer@meta.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240506042027.2289826-7-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions