1. 17 2月, 2022 1 次提交
  2. 12 2月, 2022 1 次提交
    • Y
      block: introduce block_rq_error tracepoint · d5869fdc
      Yang Shi 提交于
      Currently, rasdaemon uses the existing tracepoint block_rq_complete
      and filters out non-error cases in order to capture block disk errors.
      
      But there are a few problems with this approach:
      
      1. Even kernel trace filter could do the filtering work, there is
         still some overhead after we enable this tracepoint.
      
      2. The filter is merely based on errno, which does not align with kernel
         logic to check the errors for print_req_error().
      
      3. block_rq_complete only provides dev major and minor to identify
         the block device, it is not convenient to use in user-space.
      
      So introduce a new tracepoint block_rq_error just for the error case.
      With this patch, rasdaemon could switch to block_rq_error.
      
      Since the new tracepoint has the similar implementation with
      block_rq_complete, so move the existing code from TRACE_EVENT
      block_rq_complete() into new event class block_rq_completion(). Then add
      event for block_rq_complete and block_rq_err respectively from the newly
      created event class per the suggestion from Chaitanya Kulkarni.
      
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Christoph Hellwig <hch@infradead.org>
      Reviewed-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NChaitanya Kulkarni <kch@nvidia.com>
      Signed-off-by: NYang Shi <shy828301@gmail.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Link: https://lore.kernel.org/r/20220210225222.260069-1-shy828301@gmail.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
      d5869fdc
  3. 04 2月, 2022 1 次提交
  4. 26 1月, 2022 1 次提交
  5. 18 1月, 2022 1 次提交
  6. 16 1月, 2022 1 次提交
  7. 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
  8. 21 12月, 2021 1 次提交
  9. 16 12月, 2021 2 次提交
  10. 07 12月, 2021 3 次提交
  11. 04 12月, 2021 5 次提交
  12. 03 12月, 2021 2 次提交
  13. 29 11月, 2021 19 次提交
  14. 27 11月, 2021 1 次提交