Re: [PATCH 1/2] io_uring/rw: fix link failure on successful pipe short reads

Yang Xiuwei <[email protected]>
Newsgroups org.kernel.vger.io-uring
Message-ID <[email protected]>
Hi Jens,

Following up on my note below.

Patch 1/2 was motivated by __io_read() returning short reads on pipes
and sockets without retrying, while __io_complete_rw_common() still
failed the link chain. I had not fully understood IOSQE_IO_LINK at the
time. When a chain depends on reading a full buffer from a pipe or
socket, a short read means that dependency is not met and the chain
should fail. IOSQE_IO_HARDLINK is the right option when later requests
must still run despite a short read. Sorry for the confusion. I will
drop patch 1/2.

Regarding patch 2/2: the current code does not handle TIMEOUT_REMOVE
against pending link timeouts on ltimeout_list, while
IORING_LINK_TIMEOUT_UPDATE already has a separate path for them. Was
leaving ltimeout_list out of the remove/cancel path intentional, or
simply an oversight? If the current behaviour is intended, I will drop
patch 2/2 as well.

Thanks,
Yang Xiuwei
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.