Lines Matching refs:next
18 struct request *prev_rq, struct bio *prev, struct bio *next) in bio_will_gap() argument
47 bio_get_first_bvec(next, &nb); in bio_will_gap()
643 struct request *next) in req_attempt_discard_merge() argument
649 if (blk_rq_sectors(req) + bio_sectors(next->bio) > in req_attempt_discard_merge()
653 req->nr_phys_segments = segments + blk_rq_nr_discard_segments(next); in req_attempt_discard_merge()
661 struct request *next) in ll_merge_requests_fn() argument
665 if (req_gap_back_merge(req, next->bio)) in ll_merge_requests_fn()
671 if ((blk_rq_sectors(req) + blk_rq_sectors(next)) > in ll_merge_requests_fn()
675 total_phys_segments = req->nr_phys_segments + next->nr_phys_segments; in ll_merge_requests_fn()
679 if (!blk_cgroup_mergeable(req, next->bio)) in ll_merge_requests_fn()
682 if (blk_integrity_merge_rq(q, req, next) == false) in ll_merge_requests_fn()
685 if (!bio_crypt_ctx_merge_rq(req, next)) in ll_merge_requests_fn()
733 struct request *next) in blk_try_req_merge() argument
737 else if (blk_rq_pos(req) + blk_rq_sectors(req) == blk_rq_pos(next)) in blk_try_req_merge()
748 struct request *req, struct request *next) in attempt_merge() argument
750 if (!rq_mergeable(req) || !rq_mergeable(next)) in attempt_merge()
753 if (req_op(req) != req_op(next)) in attempt_merge()
756 if (rq_data_dir(req) != rq_data_dir(next) in attempt_merge()
757 || req->rq_disk != next->rq_disk) in attempt_merge()
761 !blk_write_same_mergeable(req->bio, next->bio)) in attempt_merge()
768 if (req->write_hint != next->write_hint) in attempt_merge()
771 if (req->ioprio != next->ioprio) in attempt_merge()
782 switch (blk_try_req_merge(req, next)) { in attempt_merge()
784 if (!req_attempt_discard_merge(q, req, next)) in attempt_merge()
788 if (!ll_merge_requests_fn(q, req, next)) in attempt_merge()
801 if (((req->rq_flags | next->rq_flags) & RQF_MIXED_MERGE) || in attempt_merge()
803 (next->cmd_flags & REQ_FAILFAST_MASK)) { in attempt_merge()
805 blk_rq_set_mixed_merge(next); in attempt_merge()
813 if (next->start_time_ns < req->start_time_ns) in attempt_merge()
814 req->start_time_ns = next->start_time_ns; in attempt_merge()
816 req->biotail->bi_next = next->bio; in attempt_merge()
817 req->biotail = next->biotail; in attempt_merge()
819 req->__data_len += blk_rq_bytes(next); in attempt_merge()
822 elv_merge_requests(q, req, next); in attempt_merge()
824 blk_crypto_rq_put_keyslot(next); in attempt_merge()
829 blk_account_io_merge_request(next); in attempt_merge()
831 trace_block_rq_merge(next); in attempt_merge()
837 next->bio = NULL; in attempt_merge()
838 return next; in attempt_merge()
844 struct request *next = elv_latter_request(q, rq); in attempt_back_merge() local
846 if (next) in attempt_back_merge()
847 return attempt_merge(q, rq, next); in attempt_back_merge()
869 struct request *next) in blk_attempt_req_merge() argument
871 return attempt_merge(q, rq, next); in blk_attempt_req_merge()