From: Jens Axboe <[email protected]>
To: Miklos Szeredi <[email protected]>
Cc: [email protected]
Subject: Re: io_uring_prep_openat_direct() and link/drain
Date: Wed, 30 Mar 2022 06:48:58 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAJfpegtEG2c3H8ZyOWPT69HJN2UWU1es-n9P+CSgV7jiZMPtGg@mail.gmail.com>
On 3/30/22 6:43 AM, Miklos Szeredi wrote:
> On Wed, 30 Mar 2022 at 14:35, Jens Axboe <[email protected]> wrote:
>>
>> On 3/30/22 2:18 AM, Miklos Szeredi wrote:
>>> On Tue, 29 Mar 2022 at 22:03, Jens Axboe <[email protected]> wrote:
>>>
>>>> Can you try and repull the branch? I rebased the top two, so reset to
>>>> v5.17 first and then pull it.
>>>
>>> This one works in all cases, except if there's a link flag on the
>>> read. In that case the read itself will succeed but following
>>> requests on the link chain will fail with -ECANCELED.
>>
>> That sounds like you're asking for more data than what is being read,
>> in which case the link should correctly break and cancel the rest.
>> That's expected behavior, a short read is not a successful read in that
>> regard.
>
> Sorry, I don't get it. Does the link flag has other meaning than
> "wait until this request completes before starting the next"?
IOSQE_IO_LINK means "wait until this request SUCCESSFULLY completes
before starting the next one". You can't reliably use a link from an eg
read, if you don't know how much data it read. If you don't care about
success, then use IOSQE_IO_HARDLINK. That is semantically like a link,
but it doesn't break on an unexpected result.
If you're using LINK from the read _and_ the read returns less than you
asked for, IOSQE_IO_LINK will break the chain as that is an unexpected
result.
--
Jens Axboe
next prev parent reply other threads:[~2022-03-30 12:49 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-29 13:20 io_uring_prep_openat_direct() and link/drain Miklos Szeredi
2022-03-29 16:08 ` Jens Axboe
2022-03-29 17:04 ` Jens Axboe
2022-03-29 18:21 ` Miklos Szeredi
2022-03-29 18:26 ` Jens Axboe
2022-03-29 18:31 ` Miklos Szeredi
2022-03-29 18:40 ` Jens Axboe
2022-03-29 19:30 ` Miklos Szeredi
2022-03-29 20:03 ` Jens Axboe
2022-03-30 8:18 ` Miklos Szeredi
2022-03-30 12:35 ` Jens Axboe
2022-03-30 12:43 ` Miklos Szeredi
2022-03-30 12:48 ` Jens Axboe [this message]
2022-03-30 12:51 ` Miklos Szeredi
2022-03-30 14:58 ` Miklos Szeredi
2022-03-30 15:05 ` Jens Axboe
2022-03-30 15:12 ` Miklos Szeredi
2022-03-30 15:17 ` Jens Axboe
2022-03-30 15:53 ` Jens Axboe
2022-03-30 17:49 ` Jens Axboe
2022-04-01 8:40 ` Miklos Szeredi
2022-04-01 15:36 ` Jens Axboe
2022-04-01 16:02 ` Miklos Szeredi
2022-04-01 16:21 ` Jens Axboe
2022-04-02 1:17 ` Jens Axboe
2022-04-05 7:45 ` Miklos Szeredi
2022-04-05 14:44 ` Jens Axboe
2022-04-21 12:31 ` Miklos Szeredi
2022-04-21 12:34 ` Jens Axboe
2022-04-21 12:39 ` Miklos Szeredi
2022-04-21 12:41 ` Jens Axboe
2022-04-21 13:10 ` Miklos Szeredi
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