public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] loop: aio inherit the ioprio of original request
@ 2025-04-14  3:01 Yunlong Xing
  2025-04-14  6:12 ` Christoph Hellwig
  2025-04-14 14:48 ` Jens Axboe
  0 siblings, 2 replies; 6+ messages in thread
From: Yunlong Xing @ 2025-04-14  3:01 UTC (permalink / raw)
  To: axboe, linux-block, bvanassche
  Cc: niuzhiguo84, yunlongxing23, linux-kernel, hao_hao.wang,
	zhiguo.niu

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>=
---
V2:
- Assign cmd->iocb.ki_ioprio in lo_rw_aio()
---
 drivers/block/loop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 674527d770dc..dd7f33d47f4f 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -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);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-04-16 14:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-14  3:01 [PATCH V2] loop: aio inherit the ioprio of original request Yunlong Xing
2025-04-14  6:12 ` Christoph Hellwig
2025-04-14 14:47   ` Jens Axboe
2025-04-16  4:32     ` Christoph Hellwig
2025-04-16 14:58       ` Jens Axboe
2025-04-14 14:48 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox