diff options
author | 2023-10-09 17:33:18 +0800 | |
---|---|---|
committer | 2023-10-17 08:27:55 -0600 | |
commit | 85248d670b71d9edda9459ee14fdc85c8e9632c0 (patch) | |
tree | 81daebf9d7990c8ebc0827b09496d35bd99e96e1 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | ublk: make sure io cmd handled in submitter task context (diff) | |
download | wireguard-linux-85248d670b71d9edda9459ee14fdc85c8e9632c0.tar.xz wireguard-linux-85248d670b71d9edda9459ee14fdc85c8e9632c0.zip |
ublk: move ublk_cancel_dev() out of ub->mutex
ublk_cancel_dev() just calls ublk_cancel_queue() to cancel all pending
io commands after ublk request queue is idle. The only protection is just
the read & write of ubq->nr_io_ready and avoid duplicated command cancel,
so add one per-queue lock with cancel flag for providing this protection,
meantime move ublk_cancel_dev() out of ub->mutex.
Then we needn't to call io_uring_cmd_complete_in_task() to cancel
pending command. And the same cancel logic will be re-used for
cancelable uring command.
This patch basically reverts commit ac5902f84bb5 ("ublk: fix AB-BA lockdep warning").
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20231009093324.957829-4-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions