From: Jens Axboe <[email protected]>
To: Stefano Garzarella <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH liburing 3/3] man/io_uring_enter.2: add EACCES and EBADFD errors
Date: Mon, 14 Sep 2020 19:35:48 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <20200914160243.o4vldl5isqktrvdd@steredhat>
On 9/14/20 10:02 AM, Stefano Garzarella wrote:
> On Mon, Sep 14, 2020 at 09:38:25AM -0600, Jens Axboe wrote:
>> On 9/14/20 2:05 AM, Stefano Garzarella wrote:
>>> On Fri, Sep 11, 2020 at 09:36:02AM -0600, Jens Axboe wrote:
>>>> On 9/11/20 7:34 AM, Stefano Garzarella wrote:
>>>>> These new errors are added with the restriction series recently
>>>>> merged in io_uring (Linux 5.10).
>>>>>
>>>>> Signed-off-by: Stefano Garzarella <[email protected]>
>>>>> ---
>>>>> man/io_uring_enter.2 | 18 ++++++++++++++++++
>>>>> 1 file changed, 18 insertions(+)
>>>>>
>>>>> diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2
>>>>> index 5443d5f..4773dfd 100644
>>>>> --- a/man/io_uring_enter.2
>>>>> +++ b/man/io_uring_enter.2
>>>>> @@ -842,6 +842,16 @@ is set appropriately.
>>>>> .PP
>>>>> .SH ERRORS
>>>>> .TP
>>>>> +.B EACCES
>>>>> +The
>>>>> +.I flags
>>>>> +field or
>>>>> +.I opcode
>>>>> +in a submission queue entry is not allowed due to registered restrictions.
>>>>> +See
>>>>> +.BR io_uring_register (2)
>>>>> +for details on how restrictions work.
>>>>> +.TP
>>>>> .B EAGAIN
>>>>> The kernel was unable to allocate memory for the request, or otherwise ran out
>>>>> of resources to handle it. The application should wait for some completions and
>>>>> @@ -861,6 +871,14 @@ field in the submission queue entry is invalid, or the
>>>>> flag was set in the submission queue entry, but no files were registered
>>>>> with the io_uring instance.
>>>>> .TP
>>>>> +.B EBADFD
>>>>> +The
>>>>> +.I fd
>>>>> +field in the submission queue entry is valid, but the io_uring ring is not
>>>>> +in the right state (enabled). See
>>>>> +.BR io_uring_register (2)
>>>>> +for details on how to enable the ring.
>>>>> +.TP
>>>>
>>>> I actually think some of this needs general updating. io_uring_enter()
>>>> will not return an error on behalf of an sqe, it'll only return an error
>>>> if one happened outside the context of a specific sqe. Any error
>>>> specific to an sqe will generate a cqe with the result.
>>>
>>> Mmm, right.
>>>
>>> For example in this case, EACCES is returned by a cqe and EBADFD is
>>> returned by io_uring_enter().
>>>
>>> Should we create 2 error sections?
>>
>> Yep, I think we should. One that describes that io_uring_enter() would
>> return in terms of errors, and one that describes cqe->res returns.
>
> Yeah, that would be much better!
>
>>
>> Are you up for this? Would be a great change, making it a lot more
>> accurate.
>
> Sure! I'll prepare a patch with this change, and I'll also try to catch
> all possible return values, then I'll rebase this series on top of that.
Awesome! It'll be a really nice improvement.
--
Jens Axboe
prev parent reply other threads:[~2020-09-15 1:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-11 13:34 [PATCH liburing 0/3] Add restrictions stuff in the man pages Stefano Garzarella
2020-09-11 13:34 ` [PATCH liburing 1/3] man/io_uring_setup.2: add IORING_SETUP_R_DISABLED description Stefano Garzarella
2020-09-11 13:34 ` [PATCH liburing 2/3] man/io_uring_register.2: add description of restrictions Stefano Garzarella
2020-09-11 15:33 ` Jens Axboe
2020-09-14 8:02 ` Stefano Garzarella
2020-09-11 13:34 ` [PATCH liburing 3/3] man/io_uring_enter.2: add EACCES and EBADFD errors Stefano Garzarella
2020-09-11 15:36 ` Jens Axboe
2020-09-14 8:05 ` Stefano Garzarella
2020-09-14 15:38 ` Jens Axboe
2020-09-14 16:02 ` Stefano Garzarella
2020-09-15 1:35 ` Jens Axboe [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] \
/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