From: Pavel Begunkov <[email protected]>
To: Stefan Metzmacher <[email protected]>, Jens Axboe <[email protected]>,
Alexander Viro <[email protected]>,
[email protected], [email protected],
[email protected]
Subject: Re: [PATCH v2 3/3] io_uring: add splice(2) support
Date: Mon, 17 Feb 2020 18:59:16 +0300 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 2/17/2020 6:54 PM, Stefan Metzmacher wrote:
> Am 17.02.20 um 16:40 schrieb Pavel Begunkov:
>> On 2/17/2020 6:18 PM, Stefan Metzmacher wrote:
>>> Hi Pavel,
>>>
>>>> +static int io_splice_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
>>>> +{
>>>> + struct io_splice* sp = &req->splice;
>>>> + unsigned int valid_flags = SPLICE_F_FD_IN_FIXED | SPLICE_F_ALL;
>>>> + int ret;
>>>> +
>>>> + if (req->flags & REQ_F_NEED_CLEANUP)
>>>> + return 0;
>>>> +
>>>> + sp->file_in = NULL;
>>>> + sp->off_in = READ_ONCE(sqe->off_in);
>>>> + sp->off_out = READ_ONCE(sqe->off);
>>>> + sp->len = READ_ONCE(sqe->len);
>>>> + sp->flags = READ_ONCE(sqe->splice_flags);
>>>> +
>>>> + if (unlikely(READ_ONCE(sqe->ioprio) || (sp->flags & ~valid_flags)))
>>>> + return -EINVAL;
>>>
>>> Why is ioprio not supported?
>>
>> Because there is no way to set it without changing much of splice code.
>> It may be added later
>>
>> BTW, it seems, only opcodes cares about ioprio are read*/write*.
>> recv*() and send*() don't reject it, but never use.
>
> I guess it's more like a hint, so should we just ignore it until
> it's passed down? Otherwise applications need to do some logic to
> find out if they can pass a value or not.
Then it probably needs to validate the value, but not just ignore it
> I'm not sure what's better, but I think it needs to be discussed...
meh, let's see what Jens think
--
Pavel Begunkov
prev parent reply other threads:[~2020-02-17 15:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-15 22:05 [PATCH v2 0/3] io_uring: add splice(2) support Pavel Begunkov
2020-02-15 22:05 ` [PATCH v2 1/3] splice: make do_splice public Pavel Begunkov
2020-02-15 22:05 ` [PATCH v2 2/3] io_uring: add interface for getting files Pavel Begunkov
2020-02-15 22:05 ` [PATCH v2 3/3] io_uring: add splice(2) support Pavel Begunkov
2020-02-17 15:18 ` Stefan Metzmacher
2020-02-17 15:40 ` Pavel Begunkov
2020-02-17 15:54 ` Stefan Metzmacher
2020-02-17 15:59 ` Pavel Begunkov [this message]
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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