diff options
author | Ming Lei <ming.lei@redhat.com> | 2019-03-03 21:17:48 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-03-06 09:42:54 -0700 |
commit | 05b700ba6003fd98c41314f390df36e2b893e167 (patch) | |
tree | ea1ae0f1e8ab9a6f4a4085e47842910043793377 /crypto | |
parent | e61750c84701310f5a99e1c2e59d77aad5f1da78 (diff) |
block: fix segment calculation for passthrough IO
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: dcebd755926b ("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: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions