Skip to content

Commit 1fdb818

Browse files
Yunlong Xingaxboe
authored andcommitted
loop: aio inherit the ioprio of original request
Set cmd->iocb.ki_ioprio to the ioprio of loop device's request. The purpose is to inherit the original request ioprio in the aio flow. Signed-off-by: Yunlong Xing <yunlong.xing@unisoc.com> Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250414030159.501180-1-yunlong.xing@unisoc.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 40f2eb9 commit 1fdb818

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/block/loop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd,
447447
cmd->iocb.ki_filp = file;
448448
cmd->iocb.ki_complete = lo_rw_aio_complete;
449449
cmd->iocb.ki_flags = IOCB_DIRECT;
450-
cmd->iocb.ki_ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 0);
450+
cmd->iocb.ki_ioprio = req_get_ioprio(rq);
451451

452452
if (rw == ITER_SOURCE)
453453
ret = file->f_op->write_iter(&cmd->iocb, &iter);

0 commit comments

Comments
 (0)