lkml.org 
[lkml]   [2020]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 3/3] io_uring: add splice(2) support
Date
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.

I'm not sure what's better, but I think it needs to be discussed...

metze


[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-02-17 16:56    [W:0.131 / U:1.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site