Commit 1fdb8188 authored by Yunlong Xing's avatar Yunlong Xing Committed by Jens Axboe
Browse files

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: default avatarYunlong Xing <yunlong.xing@unisoc.com>
Signed-off-by: default avatarZhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250414030159.501180-1-yunlong.xing@unisoc.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 40f2eb9b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -447,7 +447,7 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd,
	cmd->iocb.ki_filp = file;
	cmd->iocb.ki_complete = lo_rw_aio_complete;
	cmd->iocb.ki_flags = IOCB_DIRECT;
	cmd->iocb.ki_ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 0);
	cmd->iocb.ki_ioprio = req_get_ioprio(rq);

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