On 3/3/19 6:17 AM, Ming Lei wrote: > 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. Applied, thanks Ming. -- Jens Axboe