From: Yunlong Xing <yunlong.xing@unisoc.com>
To: <axboe@kernel.dk>, <linux-block@vger.kernel.org>, <bvanassche@acm.org>
Cc: <niuzhiguo84@gmail.com>, <yunlongxing23@gmail.com>,
<linux-kernel@vger.kernel.org>, <hao_hao.wang@unisoc.com>,
<zhiguo.niu@unisoc.com>
Subject: [PATCH V2] loop: aio inherit the ioprio of original request
Date: Mon, 14 Apr 2025 11:01:59 +0800 [thread overview]
Message-ID: <20250414030159.501180-1-yunlong.xing@unisoc.com> (raw)
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
next reply other threads:[~2025-04-14 3:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 3:01 Yunlong Xing [this message]
2025-04-14 6:12 ` [PATCH V2] loop: aio inherit the ioprio of original request 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250414030159.501180-1-yunlong.xing@unisoc.com \
--to=yunlong.xing@unisoc.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hao_hao.wang@unisoc.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=niuzhiguo84@gmail.com \
--cc=yunlongxing23@gmail.com \
--cc=zhiguo.niu@unisoc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox