1. 19 4月, 2022 1 次提交
  2. 03 4月, 2022 2 次提交
  3. 02 4月, 2022 2 次提交
    • M
      dm: fix bio polling to handle possibile BLK_STS_AGAIN · 52919840
      Ming Lei 提交于
      Expanded testing of DM's bio polling support (using more fio threads
      to dm-linear ontop of null_blk) exposed the possibility for polled
      bios to hang (repeatedly polling in io_uring) when null_blk responds
      with BLK_STS_AGAIN (due to lack of resources):
      
      1) io_complete_rw_iopoll() is called from blkdev_bio_end_io_async() to
         notify kiocb is done, that is the completion interface between block
         layer and io_uring
      
      2) io_complete_rw_iopoll() is called from io_do_iopoll()
      
      3) dm returns BLK_STS_AGAIN for one bio (on behalf of underlying
         driver), then io_complete_rw_iopoll is called, but io_do_iopoll()
         doesn't handle -EAGAIN at all (due to logic in io_rw_should_reissue)
      
      4) reason for dm's BLK_STS_AGAIN is underlying null_blk driver ran out
         of requests (easier to reproduce by setting low hw_queue_depth).
      
      5) dm should handle BLK_STS_AGAIN for POLLED underlying IO, and may
         retry in dm layer.
      
      This fix adds REQ_POLLED specific BLK_STS_AGAIN handling to
      dm_io_complete() that clears REQ_POLLED and requeues the bio to DM
      using queue_io().
      
      Fixes: b99fdcdc ("dm: support bio polling")
      Signed-off-by: NMing Lei <ming.lei@redhat.com>
      [snitzer: revised header, reused dm_io_complete's REQ_POLLED case]
      Signed-off-by: NMike Snitzer <snitzer@kernel.org>
      52919840
    • M
      dm: fix dm_io and dm_target_io flags race condition on Alpha · aad5b23e
      Mikulas Patocka 提交于
      Early alpha processors cannot write a single byte or short; they read 8
      bytes, modify the value in registers and write back 8 bytes.
      
      This could cause race condition in the structure dm_io - if the fields
      flags and io_count are modified simultaneously.
      
      Fix this bug by using 32-bit flags if we are on Alpha and if we are
      compiling for a processor that doesn't have the byte-word-extension.
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Fixes: bd4a6dd2 ("dm: reduce size of dm_io and dm_target_io structs")
      [snitzer: Jens allowed this change since Mikulas owns a relevant Alpha!]
      Acked-by: NJens Axboe <axboe@kernel.dk>
      Signed-off-by: NMike Snitzer <snitzer@kernel.org>
      aad5b23e
  4. 01 4月, 2022 8 次提交
  5. 31 3月, 2022 22 次提交
  6. 30 3月, 2022 5 次提交