1. 17 6月, 2022 1 次提交
    • C
      block: disable the elevator int del_gendisk · 50e34d78
      Christoph Hellwig 提交于
      The elevator is only used for file system requests, which are stopped in
      del_gendisk.  Move disabling the elevator and freeing the scheduler tags
      to the end of del_gendisk instead of doing that work in disk_release and
      blk_cleanup_queue to avoid a use after free on q->tag_set from
      disk_release as the tag_set might not be alive at that point.
      
      Move the blk_qos_exit call as well, as it just depends on the elevator
      exit and would be the only reason to keep the not exactly cheap queue
      freeze in disk_release.
      
      Fixes: e155b0c2 ("blk-mq: Use shared tags for shared sbitmap support")
      Reported-by: syzbot+3e3f419f4a7816471838@syzkaller.appspotmail.com
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Tested-by: syzbot+3e3f419f4a7816471838@syzkaller.appspotmail.com
      Link: https://lore.kernel.org/r/20220614074827.458955-2-hch@lst.deSigned-off-by: NJens Axboe <axboe@kernel.dk>
      50e34d78
  2. 28 5月, 2022 1 次提交
  3. 17 5月, 2022 1 次提交
  4. 05 5月, 2022 1 次提交
  5. 03 5月, 2022 1 次提交
  6. 18 4月, 2022 3 次提交
  7. 15 3月, 2022 1 次提交
  8. 10 3月, 2022 1 次提交
  9. 09 3月, 2022 2 次提交
  10. 07 3月, 2022 2 次提交
  11. 23 2月, 2022 1 次提交
  12. 17 2月, 2022 6 次提交
  13. 12 2月, 2022 2 次提交
  14. 04 2月, 2022 2 次提交
  15. 02 2月, 2022 1 次提交
  16. 29 1月, 2022 1 次提交
  17. 10 1月, 2022 1 次提交
    • M
      block: don't protect submit_bio_checks by q_usage_counter · 9d497e29
      Ming Lei 提交于
      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: NMing Lei <ming.lei@redhat.com>
      Link: https://lore.kernel.org/r/20220104134223.590803-1-ming.lei@redhat.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
      9d497e29
  18. 19 12月, 2021 1 次提交
  19. 15 12月, 2021 1 次提交
  20. 04 12月, 2021 1 次提交
  21. 29 11月, 2021 9 次提交