diff options
| author | Ming Lei <ming.lei@redhat.com> | 2026-01-16 17:18:35 +0300 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-01-23 06:05:40 +0300 |
| commit | 7ba62f5969defbab7df47c0016ffd4dedf30950a (patch) | |
| tree | 53d6086e5fa92216c72b43b2b6c264d8d34732f6 | |
| parent | fb027d569422efcf1b367441f782fb425a4b5569 (diff) | |
| download | linux-7ba62f5969defbab7df47c0016ffd4dedf30950a.tar.xz | |
ublk: prepare for not tracking task context for command batch
batch io is designed to be independent of task context, and we will not
track task context for batch io feature.
Reviewed-by: Caleb Sander Mateos <csander@purestorage.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
| -rw-r--r-- | drivers/block/ublk_drv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index f6a4b222c71a..0f9fcd16258b 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -2423,7 +2423,10 @@ static int __ublk_fetch(struct io_uring_cmd *cmd, struct ublk_device *ub, ublk_fill_io_cmd(io, cmd); - WRITE_ONCE(io->task, get_task_struct(current)); + if (ublk_dev_support_batch_io(ub)) + WRITE_ONCE(io->task, NULL); + else + WRITE_ONCE(io->task, get_task_struct(current)); ublk_mark_io_ready(ub); return 0; |
