From: Christoph Hellwig <hch@infradead.org>
To: adam.manzanares@wdc.com
Cc: viro@zeniv.linux.org.uk, bcrl@kvack.org,
linux-fsdevel@vger.kernel.org, linux-aio@kvack.org,
linux-abi-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] fs: Add aio priority support for block_dev
Date: Wed, 2 May 2018 10:33:22 -0700 [thread overview]
Message-ID: <20180502173322.GB27997@infradead.org> (raw)
In-Reply-To: <20180430165740.2842-3-adam.manzanares@wdc.com>
> --- 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.
next prev parent reply other threads:[~2018-05-02 17:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-30 16:57 [PATCH 0/2] AIO add per-command iopriority adam.manzanares
2018-04-30 16:57 ` [PATCH 1/2] fs: add RWF_IOPRIO adam.manzanares
2018-05-02 17:32 ` Christoph Hellwig
2018-05-02 17:51 ` Adam Manzanares
2018-04-30 16:57 ` [PATCH 2/2] fs: Add aio priority support for block_dev adam.manzanares
2018-05-02 17:33 ` Christoph Hellwig [this message]
2018-05-02 18:07 ` Adam Manzanares
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=20180502173322.GB27997@infradead.org \
--to=hch@infradead.org \
--cc=adam.manzanares@wdc.com \
--cc=bcrl@kvack.org \
--cc=linux-abi-devel@lists.sourceforge.net \
--cc=linux-aio@kvack.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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