Skip to content

io_uring: handle short reads internally

Jens Axboe io-uring 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 11 repliesIn review
  2. v12 patches 14 repliesSuperseded

Changes in v2 from the cover letter

- Fixed an issue with fixed/registered buffers
- Rewrite io_read() code flow to be a lot more readable
- Add comments

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2io_uring: retain iov_iter state over io_read/io_write callsfs/io_uring.c+54 -600 replies
2/2io_uring: internally retry short readsfs/io_uring.c+71 -400 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCHSET v2 0/2] io_uring: handle short reads internally

Hi,

Since we've had a few cases of applications not dealing with this appopriately, I believe the safest course of action is to ensure that we don't return short reads when we really don't have to.

The first patch is just a prep patch that retains iov_iter state over retries, while the second one actually enables just doing retries if we get a short read back.

This passes all my testing, both liburing regression tests but also tests that explicitly trigger internal short reads and hence retry based on current state. No short reads are passed back to the application.

Changes since v1:

- Fixed an issue with fixed/registered buffers
- Rewrite io_read() code flow to be a lot more readable
- Add comments

Signature · 1 line
Jens Axboe