On 3/23/22 6:32 PM, Stefan Metzmacher wrote:
Hi Jens,
@@ -5524,12 +5542,22 @@ static int io_recv(struct io_kiocb *req, unsigned int issue_flags) return -EAGAIN; if (ret == -ERESTARTSYS) ret = -EINTR;
if (ret > 0 && io_net_retry(sock, flags)) {
sr->len -= ret;
sr->buf += ret;
sr->done_io += ret;
return -EAGAIN;
out_free: req_set_fail(req);} req_set_fail(req); } else if ((flags & MSG_WAITALL) && (msg.msg_flags & (MSG_TRUNC | MSG_CTRUNC))) {
The change only affects retry based socket io in the main thread, correct?
Not sure I follow - it affects retries for streams based sockets, where previously they could be broken into two pieces when they should not be.
The truncated mesages still trigger req_set_fail if MSG_WAITALL was set?
If we don't retry, regardless of flags, then we'll set failure on the request to break links. If it ends up transferring the whole amount, regardless of whether or not it happens in one go or not, it will not fail links.