diff options
Diffstat (limited to 'block/blk-settings.c')
-rw-r--r-- | block/blk-settings.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c index 8dd86418f35d..dfc77012843f 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c | |||
@@ -302,11 +302,10 @@ EXPORT_SYMBOL(blk_queue_stack_limits); | |||
302 | * @q: the request queue for the device | 302 | * @q: the request queue for the device |
303 | * @mask: pad mask | 303 | * @mask: pad mask |
304 | * | 304 | * |
305 | * Set pad mask. Direct IO requests are padded to the mask specified. | 305 | * Set dma pad mask. |
306 | * | 306 | * |
307 | * Appending pad buffer to a request modifies ->data_len such that it | 307 | * Appending pad buffer to a request modifies the last entry of a |
308 | * includes the pad buffer. The original requested data length can be | 308 | * scatter list such that it includes the pad buffer. |
309 | * obtained using blk_rq_raw_data_len(). | ||
310 | **/ | 309 | **/ |
311 | void blk_queue_dma_pad(struct request_queue *q, unsigned int mask) | 310 | void blk_queue_dma_pad(struct request_queue *q, unsigned int mask) |
312 | { | 311 | { |
@@ -315,6 +314,23 @@ void blk_queue_dma_pad(struct request_queue *q, unsigned int mask) | |||
315 | EXPORT_SYMBOL(blk_queue_dma_pad); | 314 | EXPORT_SYMBOL(blk_queue_dma_pad); |
316 | 315 | ||
317 | /** | 316 | /** |
317 | * blk_queue_update_dma_pad - update pad mask | ||
318 | * @q: the request queue for the device | ||
319 | * @mask: pad mask | ||
320 | * | ||
321 | * Update dma pad mask. | ||
322 | * | ||
323 | * Appending pad buffer to a request modifies the last entry of a | ||
324 | * scatter list such that it includes the pad buffer. | ||
325 | **/ | ||
326 | void blk_queue_update_dma_pad(struct request_queue *q, unsigned int mask) | ||
327 | { | ||
328 | if (mask > q->dma_pad_mask) | ||
329 | q->dma_pad_mask = mask; | ||
330 | } | ||
331 | EXPORT_SYMBOL(blk_queue_update_dma_pad); | ||
332 | |||
333 | /** | ||
318 | * blk_queue_dma_drain - Set up a drain buffer for excess dma. | 334 | * blk_queue_dma_drain - Set up a drain buffer for excess dma. |
319 | * @q: the request queue for the device | 335 | * @q: the request queue for the device |
320 | * @dma_drain_needed: fn which returns non-zero if drain is necessary | 336 | * @dma_drain_needed: fn which returns non-zero if drain is necessary |