1. 29 4月, 2020 1 次提交
  2. 23 4月, 2020 4 次提交
  3. 15 1月, 2020 1 次提交
  4. 30 12月, 2019 1 次提交
    • M
      block: fix splitting segments on boundary masks · 429120f3
      Ming Lei 提交于
      We ran into a problem with a mpt3sas based controller, where we would
      see random (and hard to reproduce) file corruption). The issue seemed
      specific to this controller, but wasn't specific to the file system.
      After a lot of debugging, we find out that it's caused by segments
      spanning a 4G memory boundary. This shouldn't happen, as the default
      setting for segment boundary masks is 4G.
      
      Turns out there are two issues in get_max_segment_size():
      
      1) The default segment boundary mask is bypassed
      
      2) The segment start address isn't taken into account when checking
         segment boundary limit
      
      Fix these two issues by removing the bypass of the segment boundary
      check even if the mask is set to the default value, and taking into
      account the actual start address of the request when checking if a
      segment needs splitting.
      
      Cc: stable@vger.kernel.org # v5.1+
      Reviewed-by: NChris Mason <clm@fb.com>
      Tested-by: NChris Mason <clm@fb.com>
      Fixes: dcebd755 ("block: use bio_for_each_bvec() to compute multi-page bvec count")
      Signed-off-by: NMing Lei <ming.lei@redhat.com>
      
      Dropped const on the page pointer, ppc page_to_phys() doesn't mark the
      page as const...
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      429120f3
  5. 22 11月, 2019 1 次提交
  6. 08 11月, 2019 2 次提交
  7. 05 11月, 2019 1 次提交
  8. 05 8月, 2019 5 次提交
  9. 03 7月, 2019 1 次提交
  10. 21 6月, 2019 3 次提交
  11. 24 5月, 2019 3 次提交
  12. 22 4月, 2019 1 次提交
  13. 12 4月, 2019 1 次提交
  14. 09 4月, 2019 1 次提交
    • M
      block: fix build warning in merging bvecs · b21e11c5
      Ming Lei 提交于
      Commit f6970f83 ("block: don't check if adjacent bvecs in one bio can
      be mergeable") changes bvec merge by only considering two bvecs from
      different bios. However, if the former bio doesn't inlcude any io bvec,
      then the following warning may be triggered:
      
       warning: ‘bvec.bv_offset’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      
      In practice, it shouldn't be triggered.
      
      Fixes it by adding check on former bio, the check shouldn't add any cost
      given 'bio->bi_iter' can be hit in cache.
      Reported-by: NJens Axboe <axboe@kernel.dk>
      Fixes: f6970f83 ("block: don't check if adjacent bvecs in one bio can be mergeable")
      Signed-off-by: NMing Lei <ming.lei@redhat.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      b21e11c5
  15. 02 4月, 2019 4 次提交
  16. 07 3月, 2019 1 次提交
    • M
      block: fix segment calculation for passthrough IO · 05b700ba
      Ming Lei 提交于
      blk_recount_segments() can be called in bio_add_pc_page() for
      calculating how many segments this bio will has after one page is added
      to this bio. If the resulted segment number is beyond the queue limit,
      the added page will be removed.
      
      The try-and-fix policy requires blk_recount_segments(__blk_recalc_rq_segments)
      to not consider the segment number limit. Unfortunately bvec_split_segs()
      does check this limit, and causes small segment number returned to
      bio_add_pc_page(), then page still may be added to the bio even though
      segment number limit becomes broken.
      
      Fixes this issue by not considering segment number limit when calcualting
      bio's segment number.
      
      Fixes: dcebd755 ("block: use bio_for_each_bvec() to compute multi-page bvec count")
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Omar Sandoval <osandov@fb.com>
      Signed-off-by: NMing Lei <ming.lei@redhat.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      05b700ba
  17. 03 3月, 2019 1 次提交
  18. 27 2月, 2019 3 次提交
  19. 20 2月, 2019 1 次提交
  20. 15 2月, 2019 4 次提交