/block/ |
D | blk-merge.c | 55 static inline bool req_gap_back_merge(struct request *req, struct bio *bio) in req_gap_back_merge() argument 57 return bio_will_gap(req->q, req, req->biotail, bio); in req_gap_back_merge() 60 static inline bool req_gap_front_merge(struct request *req, struct bio *bio) in req_gap_front_merge() argument 62 return bio_will_gap(req->q, NULL, bio, req->bio); in req_gap_front_merge() 557 static inline int ll_new_hw_segment(struct request *req, struct bio *bio, in ll_new_hw_segment() argument 560 if (!blk_cgroup_mergeable(req, bio)) in ll_new_hw_segment() 563 if (blk_integrity_merge_bio(req->q, req, bio) == false) in ll_new_hw_segment() 567 if (req_op(req) == REQ_OP_DISCARD) in ll_new_hw_segment() 570 if (req->nr_phys_segments + nr_phys_segs > blk_rq_get_max_segments(req)) in ll_new_hw_segment() 577 req->nr_phys_segments += nr_phys_segs; in ll_new_hw_segment() [all …]
|
D | blk-core.c | 229 static void print_req_error(struct request *req, blk_status_t status, in print_req_error() argument 241 req->rq_disk ? req->rq_disk->disk_name : "?", in print_req_error() 242 blk_rq_pos(req), req_op(req), blk_op_str(req_op(req)), in print_req_error() 243 req->cmd_flags & ~REQ_OP_MASK, in print_req_error() 244 req->nr_phys_segments, in print_req_error() 245 IOPRIO_PRIO_CLASS(req->ioprio)); in print_req_error() 642 struct request *req; in blk_get_request() local 647 req = blk_mq_alloc_request(q, op, flags); in blk_get_request() 648 if (!IS_ERR(req) && q->mq_ops->initialize_rq_fn) in blk_get_request() 649 q->mq_ops->initialize_rq_fn(req); in blk_get_request() [all …]
|
D | bsg-lib.c | 204 static int bsg_map_buffer(struct bsg_buffer *buf, struct request *req) in bsg_map_buffer() argument 206 size_t sz = (sizeof(struct scatterlist) * req->nr_phys_segments); in bsg_map_buffer() 208 BUG_ON(!req->nr_phys_segments); in bsg_map_buffer() 213 sg_init_table(buf->sg_list, req->nr_phys_segments); in bsg_map_buffer() 214 buf->sg_cnt = blk_rq_map_sg(req->q, req, buf->sg_list); in bsg_map_buffer() 215 buf->payload_len = blk_rq_bytes(req); in bsg_map_buffer() 224 static bool bsg_prepare_job(struct device *dev, struct request *req) in bsg_prepare_job() argument 226 struct bsg_job *job = blk_mq_rq_to_pdu(req); in bsg_prepare_job() 229 job->timeout = req->timeout; in bsg_prepare_job() 231 if (req->bio) { in bsg_prepare_job() [all …]
|
D | scsi_ioctl.c | 223 struct scsi_request *req = scsi_req(rq); in blk_fill_sghdr_rq() local 225 if (copy_from_user(req->cmd, hdr->cmdp, hdr->cmd_len)) in blk_fill_sghdr_rq() 227 if (blk_verify_command(req->cmd, mode)) in blk_fill_sghdr_rq() 233 req->cmd_len = hdr->cmd_len; in blk_fill_sghdr_rq() 249 struct scsi_request *req = scsi_req(rq); in blk_complete_sghdr_rq() local 255 hdr->status = req->result & 0xff; in blk_complete_sghdr_rq() 256 hdr->masked_status = status_byte(req->result); in blk_complete_sghdr_rq() 257 hdr->msg_status = msg_byte(req->result); in blk_complete_sghdr_rq() 258 hdr->host_status = host_byte(req->result); in blk_complete_sghdr_rq() 259 hdr->driver_status = driver_byte(req->result); in blk_complete_sghdr_rq() [all …]
|
D | blk-timeout.c | 79 void blk_abort_request(struct request *req) in blk_abort_request() argument 86 WRITE_ONCE(req->deadline, jiffies); in blk_abort_request() 87 kblockd_schedule_work(&req->q->timeout_work); in blk_abort_request() 128 void blk_add_timer(struct request *req) in blk_add_timer() argument 130 struct request_queue *q = req->q; in blk_add_timer() 137 if (!req->timeout) in blk_add_timer() 138 req->timeout = q->rq_timeout; in blk_add_timer() 140 req->rq_flags &= ~RQF_TIMED_OUT; in blk_add_timer() 142 expiry = jiffies + req->timeout; in blk_add_timer() 143 WRITE_ONCE(req->deadline, expiry); in blk_add_timer()
|
D | blk-crypto-internal.h | 31 static inline bool bio_crypt_ctx_back_mergeable(struct request *req, in bio_crypt_ctx_back_mergeable() argument 34 return bio_crypt_ctx_mergeable(req->crypt_ctx, blk_rq_bytes(req), in bio_crypt_ctx_back_mergeable() 38 static inline bool bio_crypt_ctx_front_mergeable(struct request *req, in bio_crypt_ctx_front_mergeable() argument 42 bio->bi_iter.bi_size, req->crypt_ctx); in bio_crypt_ctx_front_mergeable() 45 static inline bool bio_crypt_ctx_merge_rq(struct request *req, in bio_crypt_ctx_merge_rq() argument 48 return bio_crypt_ctx_mergeable(req->crypt_ctx, blk_rq_bytes(req), in bio_crypt_ctx_merge_rq() 76 static inline bool bio_crypt_ctx_front_mergeable(struct request *req, in bio_crypt_ctx_front_mergeable() argument 82 static inline bool bio_crypt_ctx_back_mergeable(struct request *req, in bio_crypt_ctx_back_mergeable() argument 88 static inline bool bio_crypt_ctx_merge_rq(struct request *req, in bio_crypt_ctx_merge_rq() argument
|
D | blk.h | 47 bool is_flush_rq(struct request *req); 118 static inline bool integrity_req_gap_back_merge(struct request *req, in integrity_req_gap_back_merge() argument 121 struct bio_integrity_payload *bip = bio_integrity(req->bio); in integrity_req_gap_back_merge() 124 return bvec_gap_to_prev(req->q, &bip->bip_vec[bip->bip_vcnt - 1], in integrity_req_gap_back_merge() 128 static inline bool integrity_req_gap_front_merge(struct request *req, in integrity_req_gap_front_merge() argument 132 struct bio_integrity_payload *bip_next = bio_integrity(req->bio); in integrity_req_gap_front_merge() 134 return bvec_gap_to_prev(req->q, &bip->bip_vec[bip->bip_vcnt - 1], in integrity_req_gap_front_merge() 151 static inline bool integrity_req_gap_back_merge(struct request *req, in integrity_req_gap_back_merge() argument 156 static inline bool integrity_req_gap_front_merge(struct request *req, in integrity_req_gap_front_merge() argument 181 void blk_add_timer(struct request *req); [all …]
|
D | blk-integrity.c | 164 bool blk_integrity_merge_rq(struct request_queue *q, struct request *req, in blk_integrity_merge_rq() argument 167 if (blk_integrity_rq(req) == 0 && blk_integrity_rq(next) == 0) in blk_integrity_merge_rq() 170 if (blk_integrity_rq(req) == 0 || blk_integrity_rq(next) == 0) in blk_integrity_merge_rq() 173 if (bio_integrity(req->bio)->bip_flags != in blk_integrity_merge_rq() 177 if (req->nr_integrity_segments + next->nr_integrity_segments > in blk_integrity_merge_rq() 181 if (integrity_req_gap_back_merge(req, next->bio)) in blk_integrity_merge_rq() 187 bool blk_integrity_merge_bio(struct request_queue *q, struct request *req, in blk_integrity_merge_bio() argument 193 if (blk_integrity_rq(req) == 0 && bio_integrity(bio) == NULL) in blk_integrity_merge_bio() 196 if (blk_integrity_rq(req) == 0 || bio_integrity(bio) == NULL) in blk_integrity_merge_bio() 199 if (bio_integrity(req->bio)->bip_flags != bio_integrity(bio)->bip_flags) in blk_integrity_merge_bio() [all …]
|
D | mq-deadline-main.c | 209 static void dd_request_merged(struct request_queue *q, struct request *req, in dd_request_merged() argument 213 const u8 ioprio_class = dd_rq_ioclass(req); in dd_request_merged() 221 elv_rb_del(deadline_rb_root(per_prio, req), req); in dd_request_merged() 222 deadline_add_rq_rb(per_prio, req); in dd_request_merged() 229 static void dd_merged_requests(struct request_queue *q, struct request *req, in dd_merged_requests() argument 244 if (!list_empty(&req->queuelist) && !list_empty(&next->queuelist)) { in dd_merged_requests() 246 (unsigned long)req->fifo_time)) { in dd_merged_requests() 247 list_move(&req->queuelist, &next->queuelist); in dd_merged_requests() 248 req->fifo_time = next->fifo_time; in dd_merged_requests()
|
D | elevator.c | 303 enum elv_merge elv_merge(struct request_queue *q, struct request **req, in elv_merge() argument 325 *req = q->last_merge; in elv_merge() 338 *req = __rq; in elv_merge() 346 return e->type->ops.request_merge(q, req, bio); in elv_merge()
|
D | bfq-iosched.c | 2260 static int bfq_request_merge(struct request_queue *q, struct request **req, in bfq_request_merge() argument 2268 *req = __rq; in bfq_request_merge() 2278 static void bfq_request_merged(struct request_queue *q, struct request *req, in bfq_request_merged() argument 2282 rb_prev(&req->rb_node) && in bfq_request_merged() 2283 blk_rq_pos(req) < in bfq_request_merged() 2284 blk_rq_pos(container_of(rb_prev(&req->rb_node), in bfq_request_merged() 2286 struct bfq_queue *bfqq = RQ_BFQQ(req); in bfq_request_merged() 2296 elv_rb_del(&bfqq->sort_list, req); in bfq_request_merged() 2297 elv_rb_add(&bfqq->sort_list, req); in bfq_request_merged() 2301 next_rq = bfq_choose_req(bfqd, bfqq->next_rq, req, in bfq_request_merged()
|
D | blk-mq.c | 919 static void blk_mq_rq_timed_out(struct request *req, bool reserved) in blk_mq_rq_timed_out() argument 921 req->rq_flags |= RQF_TIMED_OUT; in blk_mq_rq_timed_out() 922 if (req->q->mq_ops->timeout) { in blk_mq_rq_timed_out() 925 ret = req->q->mq_ops->timeout(req, reserved); in blk_mq_rq_timed_out() 931 blk_add_timer(req); in blk_mq_rq_timed_out()
|