* [PATCH V3] loop: aio inherit the ioprio of original request
@ 2025-04-15 5:44 Yunlong Xing
2025-04-15 5:56 ` yunlong xing
2025-04-15 15:38 ` Chaitanya Kulkarni
0 siblings, 2 replies; 4+ messages in thread
From: Yunlong Xing @ 2025-04-15 5:44 UTC (permalink / raw)
To: axboe, linux-block, bvanassche, hch
Cc: niuzhiguo84, yunlongxing23, linux-kernel, hao_hao.wang
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>
---
V3:
- fix Signed-off-by error in commit message
---
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] 4+ messages in thread
* Re: [PATCH V3] loop: aio inherit the ioprio of original request
2025-04-15 5:44 [PATCH V3] loop: aio inherit the ioprio of original request Yunlong Xing
@ 2025-04-15 5:56 ` yunlong xing
2025-04-15 13:45 ` Jens Axboe
2025-04-15 15:38 ` Chaitanya Kulkarni
1 sibling, 1 reply; 4+ messages in thread
From: yunlong xing @ 2025-04-15 5:56 UTC (permalink / raw)
To: Yunlong Xing
Cc: axboe, linux-block, bvanassche, hch, niuzhiguo84, linux-kernel,
hao_hao.wang
Yunlong Xing <yunlong.xing@unisoc.com> 于2025年4月15日周二 13:45写道:
>
> 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>
> ---
> V3:
> - fix Signed-off-by error in commit message
> ---
> 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
>
Hi Jens,
There is a mistake of Signed-off-by in commit message on previous version.
I noticed that you had commited it in block-6.15. Could you please help fix it.
Best regards,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V3] loop: aio inherit the ioprio of original request
2025-04-15 5:56 ` yunlong xing
@ 2025-04-15 13:45 ` Jens Axboe
0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2025-04-15 13:45 UTC (permalink / raw)
To: yunlong xing, Yunlong Xing
Cc: linux-block, bvanassche, hch, niuzhiguo84, linux-kernel,
hao_hao.wang
On 4/14/25 11:56 PM, yunlong xing wrote:
> There is a mistake of Signed-off-by in commit message on previous
> version. I noticed that you had commited it in block-6.15. Could you
> please help fix it.
I fixed it up.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V3] loop: aio inherit the ioprio of original request
2025-04-15 5:44 [PATCH V3] loop: aio inherit the ioprio of original request Yunlong Xing
2025-04-15 5:56 ` yunlong xing
@ 2025-04-15 15:38 ` Chaitanya Kulkarni
1 sibling, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2025-04-15 15:38 UTC (permalink / raw)
To: Yunlong Xing, axboe@kernel.dk, linux-block@vger.kernel.org,
bvanassche@acm.org, hch@lst.de
Cc: niuzhiguo84@gmail.com, yunlongxing23@gmail.com,
linux-kernel@vger.kernel.org, hao_hao.wang@unisoc.com
On 4/14/25 22:44, Yunlong Xing wrote:
> 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>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-15 15:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-15 5:44 [PATCH V3] loop: aio inherit the ioprio of original request Yunlong Xing
2025-04-15 5:56 ` yunlong xing
2025-04-15 13:45 ` Jens Axboe
2025-04-15 15:38 ` Chaitanya Kulkarni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox