diff options
Diffstat (limited to 'block/blk-settings.c')
-rw-r--r-- | block/blk-settings.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c index dfc77012843f..539d873c820d 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c | |||
@@ -33,6 +33,23 @@ void blk_queue_prep_rq(struct request_queue *q, prep_rq_fn *pfn) | |||
33 | EXPORT_SYMBOL(blk_queue_prep_rq); | 33 | EXPORT_SYMBOL(blk_queue_prep_rq); |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * blk_queue_set_discard - set a discard_sectors function for queue | ||
37 | * @q: queue | ||
38 | * @dfn: prepare_discard function | ||
39 | * | ||
40 | * It's possible for a queue to register a discard callback which is used | ||
41 | * to transform a discard request into the appropriate type for the | ||
42 | * hardware. If none is registered, then discard requests are failed | ||
43 | * with %EOPNOTSUPP. | ||
44 | * | ||
45 | */ | ||
46 | void blk_queue_set_discard(struct request_queue *q, prepare_discard_fn *dfn) | ||
47 | { | ||
48 | q->prepare_discard_fn = dfn; | ||
49 | } | ||
50 | EXPORT_SYMBOL(blk_queue_set_discard); | ||
51 | |||
52 | /** | ||
36 | * blk_queue_merge_bvec - set a merge_bvec function for queue | 53 | * blk_queue_merge_bvec - set a merge_bvec function for queue |
37 | * @q: queue | 54 | * @q: queue |
38 | * @mbfn: merge_bvec_fn | 55 | * @mbfn: merge_bvec_fn |