Lines Matching refs:q
33 void blk_queue_prep_rq(struct request_queue *q, prep_rq_fn *pfn) in blk_queue_prep_rq() argument
35 q->prep_rq_fn = pfn; in blk_queue_prep_rq()
50 void blk_queue_unprep_rq(struct request_queue *q, unprep_rq_fn *ufn) in blk_queue_unprep_rq() argument
52 q->unprep_rq_fn = ufn; in blk_queue_unprep_rq()
56 void blk_queue_softirq_done(struct request_queue *q, softirq_done_fn *fn) in blk_queue_softirq_done() argument
58 q->softirq_done_fn = fn; in blk_queue_softirq_done()
62 void blk_queue_rq_timeout(struct request_queue *q, unsigned int timeout) in blk_queue_rq_timeout() argument
64 q->rq_timeout = timeout; in blk_queue_rq_timeout()
68 void blk_queue_rq_timed_out(struct request_queue *q, rq_timed_out_fn *fn) in blk_queue_rq_timed_out() argument
70 q->rq_timed_out_fn = fn; in blk_queue_rq_timed_out()
74 void blk_queue_lld_busy(struct request_queue *q, lld_busy_fn *fn) in blk_queue_lld_busy() argument
76 q->lld_busy_fn = fn; in blk_queue_lld_busy()
158 void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn) in blk_queue_make_request() argument
163 q->nr_requests = BLKDEV_MAX_RQ; in blk_queue_make_request()
165 q->make_request_fn = mfn; in blk_queue_make_request()
166 blk_queue_dma_alignment(q, 511); in blk_queue_make_request()
167 blk_queue_congestion_threshold(q); in blk_queue_make_request()
168 q->nr_batching = BLK_BATCH_REQ; in blk_queue_make_request()
170 blk_set_default_limits(&q->limits); in blk_queue_make_request()
175 blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH); in blk_queue_make_request()
190 void blk_queue_bounce_limit(struct request_queue *q, u64 max_addr) in blk_queue_bounce_limit() argument
195 q->bounce_gfp = GFP_NOIO; in blk_queue_bounce_limit()
204 q->limits.bounce_pfn = max(max_low_pfn, b_pfn); in blk_queue_bounce_limit()
208 q->limits.bounce_pfn = b_pfn; in blk_queue_bounce_limit()
212 q->bounce_gfp = GFP_NOIO | GFP_DMA; in blk_queue_bounce_limit()
213 q->limits.bounce_pfn = b_pfn; in blk_queue_bounce_limit()
237 void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_hw_sectors) in blk_queue_max_hw_sectors() argument
239 struct queue_limits *limits = &q->limits; in blk_queue_max_hw_sectors()
268 void blk_queue_chunk_sectors(struct request_queue *q, unsigned int chunk_sectors) in blk_queue_chunk_sectors() argument
271 q->limits.chunk_sectors = chunk_sectors; in blk_queue_chunk_sectors()
280 void blk_queue_max_discard_sectors(struct request_queue *q, in blk_queue_max_discard_sectors() argument
283 q->limits.max_hw_discard_sectors = max_discard_sectors; in blk_queue_max_discard_sectors()
284 q->limits.max_discard_sectors = max_discard_sectors; in blk_queue_max_discard_sectors()
293 void blk_queue_max_write_same_sectors(struct request_queue *q, in blk_queue_max_write_same_sectors() argument
296 q->limits.max_write_same_sectors = max_write_same_sectors; in blk_queue_max_write_same_sectors()
309 void blk_queue_max_segments(struct request_queue *q, unsigned short max_segments) in blk_queue_max_segments() argument
317 q->limits.max_segments = max_segments; in blk_queue_max_segments()
330 void blk_queue_max_segment_size(struct request_queue *q, unsigned int max_size) in blk_queue_max_segment_size() argument
338 q->limits.max_segment_size = max_size; in blk_queue_max_segment_size()
352 void blk_queue_logical_block_size(struct request_queue *q, unsigned int size) in blk_queue_logical_block_size() argument
354 q->limits.logical_block_size = size; in blk_queue_logical_block_size()
356 if (q->limits.physical_block_size < size) in blk_queue_logical_block_size()
357 q->limits.physical_block_size = size; in blk_queue_logical_block_size()
359 if (q->limits.io_min < q->limits.physical_block_size) in blk_queue_logical_block_size()
360 q->limits.io_min = q->limits.physical_block_size; in blk_queue_logical_block_size()
374 void blk_queue_physical_block_size(struct request_queue *q, unsigned int size) in blk_queue_physical_block_size() argument
376 q->limits.physical_block_size = size; in blk_queue_physical_block_size()
378 if (q->limits.physical_block_size < q->limits.logical_block_size) in blk_queue_physical_block_size()
379 q->limits.physical_block_size = q->limits.logical_block_size; in blk_queue_physical_block_size()
381 if (q->limits.io_min < q->limits.physical_block_size) in blk_queue_physical_block_size()
382 q->limits.io_min = q->limits.physical_block_size; in blk_queue_physical_block_size()
397 void blk_queue_alignment_offset(struct request_queue *q, unsigned int offset) in blk_queue_alignment_offset() argument
399 q->limits.alignment_offset = in blk_queue_alignment_offset()
400 offset & (q->limits.physical_block_size - 1); in blk_queue_alignment_offset()
401 q->limits.misaligned = 0; in blk_queue_alignment_offset()
442 void blk_queue_io_min(struct request_queue *q, unsigned int min) in blk_queue_io_min() argument
444 blk_limits_io_min(&q->limits, min); in blk_queue_io_min()
480 void blk_queue_io_opt(struct request_queue *q, unsigned int opt) in blk_queue_io_opt() argument
482 blk_limits_io_opt(&q->limits, opt); in blk_queue_io_opt()
708 void blk_queue_dma_pad(struct request_queue *q, unsigned int mask) in blk_queue_dma_pad() argument
710 q->dma_pad_mask = mask; in blk_queue_dma_pad()
724 void blk_queue_update_dma_pad(struct request_queue *q, unsigned int mask) in blk_queue_update_dma_pad() argument
726 if (mask > q->dma_pad_mask) in blk_queue_update_dma_pad()
727 q->dma_pad_mask = mask; in blk_queue_update_dma_pad()
752 int blk_queue_dma_drain(struct request_queue *q, in blk_queue_dma_drain() argument
756 if (queue_max_segments(q) < 2) in blk_queue_dma_drain()
759 blk_queue_max_segments(q, queue_max_segments(q) - 1); in blk_queue_dma_drain()
760 q->dma_drain_needed = dma_drain_needed; in blk_queue_dma_drain()
761 q->dma_drain_buffer = buf; in blk_queue_dma_drain()
762 q->dma_drain_size = size; in blk_queue_dma_drain()
773 void blk_queue_segment_boundary(struct request_queue *q, unsigned long mask) in blk_queue_segment_boundary() argument
781 q->limits.seg_boundary_mask = mask; in blk_queue_segment_boundary()
790 void blk_queue_virt_boundary(struct request_queue *q, unsigned long mask) in blk_queue_virt_boundary() argument
792 q->limits.virt_boundary_mask = mask; in blk_queue_virt_boundary()
806 void blk_queue_dma_alignment(struct request_queue *q, int mask) in blk_queue_dma_alignment() argument
808 q->dma_alignment = mask; in blk_queue_dma_alignment()
826 void blk_queue_update_dma_alignment(struct request_queue *q, int mask) in blk_queue_update_dma_alignment() argument
830 if (mask > q->dma_alignment) in blk_queue_update_dma_alignment()
831 q->dma_alignment = mask; in blk_queue_update_dma_alignment()
844 void blk_queue_flush(struct request_queue *q, unsigned int flush) in blk_queue_flush() argument
851 q->flush_flags = flush & (REQ_FLUSH | REQ_FUA); in blk_queue_flush()
855 void blk_queue_flush_queueable(struct request_queue *q, bool queueable) in blk_queue_flush_queueable() argument
857 q->flush_not_queueable = !queueable; in blk_queue_flush_queueable()