Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Mar 31, 2022
  2. Mar 11, 2022
  3. Mar 08, 2022
  4. Mar 07, 2022
  5. Feb 16, 2022
  6. Feb 11, 2022
  7. Feb 04, 2022
  8. Jan 26, 2022
  9. Jan 18, 2022
  10. Jan 15, 2022
  11. Jan 09, 2022
    • Ming Lei's avatar
      block: don't protect submit_bio_checks by q_usage_counter · 9d497e29
      Ming Lei authored
      Commit cc9c884d
      
       ("block: call submit_bio_checks under q_usage_counter")
      uses q_usage_counter to protect submit_bio_checks for avoiding IO after
      disk is deleted by del_gendisk().
      
      Turns out the protection isn't necessary, because once
      blk_mq_freeze_queue_wait() in del_gendisk() returns:
      
      1) all in-flight IO has been done
      
      2) all new IO will be failed in __bio_queue_enter() because
         q_usage_counter is dead, and GD_DEAD is set
      
      3) both disk and request queue instance are safe since caller of
      submit_bio() guarantees that the disk can't be closed.
      
      Once submit_bio_checks() needn't the protection of q_usage_counter, we can
      move submit_bio_checks before calling blk_mq_submit_bio() and
      ->submit_bio(). With this change, we needn't to throttle queue with
      holding one allocated request, then precise driver tag or request won't be
      wasted in throttling. Meantime we can unify the bio check for both bio
      based and request based driver.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Link: https://lore.kernel.org/r/20220104134223.590803-1-ming.lei@redhat.com
      
      
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      9d497e29
  12. Dec 20, 2021
  13. Dec 16, 2021
  14. Dec 06, 2021
  15. Dec 03, 2021
  16. Dec 02, 2021
  17. Nov 29, 2021