[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180502173322.GB27997@infradead.org>
Date: Wed, 2 May 2018 10:33:22 -0700
From: Christoph Hellwig <hch@...radead.org>
To: adam.manzanares@....com
Cc: viro@...iv.linux.org.uk, bcrl@...ck.org,
linux-fsdevel@...r.kernel.org, linux-aio@...ck.org,
linux-abi-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] fs: Add aio priority support for block_dev
> --- a/fs/aio.c
> +++ b/fs/aio.c
> @@ -1603,6 +1603,15 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
> goto out_put_req;
> }
>
> + if (req->common.ki_flags & IOCB_IOPRIO)
> + /*
> + * The IOCB_IOPRIO flag is set when the user supplied iocb
> + * aio_rw_flag field has the RWF_IOPRIO flag set. If so,
> + * aio_reqprio is interpreted as a I/O scheduling class and
> + * priority.
> + */
> + req->common.ki_ioprio = iocb->aio_reqprio;
Do we need any validation of the field here?
The only other thing I am a bit worried about is bloating struct kiocb
with a field for a relatively uncommon feature, but I can't really
see any much better way to pass it.
Powered by blists - more mailing lists