[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <319facaa-f3de-4cca-adf0-6916f30e8c7c@acm.org>
Date: Fri, 11 Apr 2025 12:36:58 -0700
From: Bart Van Assche <bvanassche@....org>
To: Yunlong Xing <yunlong.xing@...soc.com>, axboe@...nel.dk,
linux-block@...r.kernel.org
Cc: niuzhiguo84@...il.com, yunlongxing23@...il.com,
linux-kernel@...r.kernel.org, hao_hao.wang@...soc.com, zhiguo.niu@...soc.com
Subject: Re: [PATCH] loop: aio inherit the ioprio of original request
On 4/11/25 12:28 AM, Yunlong Xing wrote:
> diff --git a/drivers/block/loop.c b/drivers/block/loop.c
> index 674527d770dc..ed73627af3ff 100644
> --- a/drivers/block/loop.c
> +++ b/drivers/block/loop.c
> @@ -447,7 +447,6 @@ 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);
>
> if (rw == ITER_SOURCE)
> ret = file->f_op->write_iter(&cmd->iocb, &iter);
> @@ -1892,6 +1891,9 @@ static blk_status_t loop_queue_rq(struct blk_mq_hw_ctx *hctx,
> break;
> }
>
> + /* get original request ioprio */
> + cmd->iocb.ki_ioprio = req_get_ioprio(rq);
> +
> /* always use the first bio's css */
> cmd->blkcg_css = NULL;
> cmd->memcg_css = NULL;
Shouldn't the cmd->iocb.ki_ioprio assignment occur in lo_rw_aio() rather
than in loop_queue_rq() since the iocb is only used by lo_rw_aio()?
Bart.
Powered by blists - more mailing lists