Skip to content
Snippets Groups Projects
  1. Sep 21, 2022
  2. Sep 18, 2022
  3. Sep 15, 2022
  4. Sep 13, 2022
  5. Sep 09, 2022
    • Pavel Begunkov's avatar
      io_uring/rw: fix short rw error handling · 4d9cb92c
      Pavel Begunkov authored
      
      We have a couple of problems, first reports of unexpected link breakage
      for reads when cqe->res indicates that the IO was done in full. The
      reason here is partial IO with retries.
      
      TL;DR; we compare the result in __io_complete_rw_common() against
      req->cqe.res, but req->cqe.res doesn't store the full length but rather
      the length left to be done. So, when we pass the full corrected result
      via kiocb_done() -> __io_complete_rw_common(), it fails.
      
      The second problem is that we don't try to correct res in
      io_complete_rw(), which, for instance, might be a problem for O_DIRECT
      but when a prefix of data was cached in the page cache. We also
      definitely don't want to pass a corrected result into io_rw_done().
      
      The fix here is to leave __io_complete_rw_common() alone, always pass
      not corrected result into it and fix it up as the last step just before
      actually finishing the I/O.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
      Link: https://github.com/axboe/liburing/issues/643
      
      
      Reported-by: default avatarBeld Zhang <beldzhang@gmail.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      4d9cb92c
  6. Sep 08, 2022
  7. Sep 07, 2022
  8. Sep 05, 2022
  9. Sep 01, 2022
  10. Aug 26, 2022
  11. Aug 25, 2022
  12. Aug 24, 2022
  13. Aug 23, 2022
  14. Aug 18, 2022
  15. Aug 16, 2022
  16. Aug 12, 2022
  17. Aug 11, 2022
  18. Aug 05, 2022
  19. Aug 04, 2022
Loading