diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-18 16:21:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-18 16:21:18 -0400 |
commit | 8a83f33100c691f5a576dba259cc05502dc358f0 (patch) | |
tree | c10c74bd28026cefdb8caa1362a0ccc30ea695a5 /include | |
parent | 5d5b1b9f79ebad81215d11e208e9bfa9679a4ddd (diff) | |
parent | 24ecfbe27f65563909b14492afda2f1c21f7c044 (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
block: add blk_run_queue_async
block: blk_delay_queue() should use kblockd workqueue
md: fix up raid1/raid10 unplugging.
md: incorporate new plugging into raid5.
md: provide generic support for handling unplug callbacks.
md - remove old plugging code.
md/dm - remove remains of plug_fn callback.
md: use new plugging interface for RAID IO.
block: drop queue lock before calling __blk_run_queue() for kblockd punt
Revert "block: add callback function for unplug notification"
block: Enhance new plugging support to support general callbacks
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev.h | 12 | ||||
-rw-r--r-- | include/linux/device-mapper.h | 1 |
2 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ec0357d8c4a5..cbbfd98ad4a3 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -196,7 +196,6 @@ typedef void (request_fn_proc) (struct request_queue *q); | |||
196 | typedef int (make_request_fn) (struct request_queue *q, struct bio *bio); | 196 | typedef int (make_request_fn) (struct request_queue *q, struct bio *bio); |
197 | typedef int (prep_rq_fn) (struct request_queue *, struct request *); | 197 | typedef int (prep_rq_fn) (struct request_queue *, struct request *); |
198 | typedef void (unprep_rq_fn) (struct request_queue *, struct request *); | 198 | typedef void (unprep_rq_fn) (struct request_queue *, struct request *); |
199 | typedef void (unplugged_fn) (struct request_queue *); | ||
200 | 199 | ||
201 | struct bio_vec; | 200 | struct bio_vec; |
202 | struct bvec_merge_data { | 201 | struct bvec_merge_data { |
@@ -284,7 +283,6 @@ struct request_queue | |||
284 | rq_timed_out_fn *rq_timed_out_fn; | 283 | rq_timed_out_fn *rq_timed_out_fn; |
285 | dma_drain_needed_fn *dma_drain_needed; | 284 | dma_drain_needed_fn *dma_drain_needed; |
286 | lld_busy_fn *lld_busy_fn; | 285 | lld_busy_fn *lld_busy_fn; |
287 | unplugged_fn *unplugged_fn; | ||
288 | 286 | ||
289 | /* | 287 | /* |
290 | * Dispatch queue sorting | 288 | * Dispatch queue sorting |
@@ -699,7 +697,7 @@ extern void blk_start_queue(struct request_queue *q); | |||
699 | extern void blk_stop_queue(struct request_queue *q); | 697 | extern void blk_stop_queue(struct request_queue *q); |
700 | extern void blk_sync_queue(struct request_queue *q); | 698 | extern void blk_sync_queue(struct request_queue *q); |
701 | extern void __blk_stop_queue(struct request_queue *q); | 699 | extern void __blk_stop_queue(struct request_queue *q); |
702 | extern void __blk_run_queue(struct request_queue *q, bool force_kblockd); | 700 | extern void __blk_run_queue(struct request_queue *q); |
703 | extern void blk_run_queue(struct request_queue *); | 701 | extern void blk_run_queue(struct request_queue *); |
704 | extern int blk_rq_map_user(struct request_queue *, struct request *, | 702 | extern int blk_rq_map_user(struct request_queue *, struct request *, |
705 | struct rq_map_data *, void __user *, unsigned long, | 703 | struct rq_map_data *, void __user *, unsigned long, |
@@ -843,7 +841,6 @@ extern void blk_queue_dma_alignment(struct request_queue *, int); | |||
843 | extern void blk_queue_update_dma_alignment(struct request_queue *, int); | 841 | extern void blk_queue_update_dma_alignment(struct request_queue *, int); |
844 | extern void blk_queue_softirq_done(struct request_queue *, softirq_done_fn *); | 842 | extern void blk_queue_softirq_done(struct request_queue *, softirq_done_fn *); |
845 | extern void blk_queue_rq_timed_out(struct request_queue *, rq_timed_out_fn *); | 843 | extern void blk_queue_rq_timed_out(struct request_queue *, rq_timed_out_fn *); |
846 | extern void blk_queue_unplugged(struct request_queue *, unplugged_fn *); | ||
847 | extern void blk_queue_rq_timeout(struct request_queue *, unsigned int); | 844 | extern void blk_queue_rq_timeout(struct request_queue *, unsigned int); |
848 | extern void blk_queue_flush(struct request_queue *q, unsigned int flush); | 845 | extern void blk_queue_flush(struct request_queue *q, unsigned int flush); |
849 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); | 846 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); |
@@ -860,8 +857,13 @@ extern void blk_put_queue(struct request_queue *); | |||
860 | struct blk_plug { | 857 | struct blk_plug { |
861 | unsigned long magic; | 858 | unsigned long magic; |
862 | struct list_head list; | 859 | struct list_head list; |
860 | struct list_head cb_list; | ||
863 | unsigned int should_sort; | 861 | unsigned int should_sort; |
864 | }; | 862 | }; |
863 | struct blk_plug_cb { | ||
864 | struct list_head list; | ||
865 | void (*callback)(struct blk_plug_cb *); | ||
866 | }; | ||
865 | 867 | ||
866 | extern void blk_start_plug(struct blk_plug *); | 868 | extern void blk_start_plug(struct blk_plug *); |
867 | extern void blk_finish_plug(struct blk_plug *); | 869 | extern void blk_finish_plug(struct blk_plug *); |
@@ -887,7 +889,7 @@ static inline bool blk_needs_flush_plug(struct task_struct *tsk) | |||
887 | { | 889 | { |
888 | struct blk_plug *plug = tsk->plug; | 890 | struct blk_plug *plug = tsk->plug; |
889 | 891 | ||
890 | return plug && !list_empty(&plug->list); | 892 | return plug && (!list_empty(&plug->list) || !list_empty(&plug->cb_list)); |
891 | } | 893 | } |
892 | 894 | ||
893 | /* | 895 | /* |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index e2768834f397..32a4423710f5 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -197,7 +197,6 @@ struct dm_target { | |||
197 | struct dm_target_callbacks { | 197 | struct dm_target_callbacks { |
198 | struct list_head list; | 198 | struct list_head list; |
199 | int (*congested_fn) (struct dm_target_callbacks *, int); | 199 | int (*congested_fn) (struct dm_target_callbacks *, int); |
200 | void (*unplug_fn)(struct dm_target_callbacks *); | ||
201 | }; | 200 | }; |
202 | 201 | ||
203 | int dm_register_target(struct target_type *t); | 202 | int dm_register_target(struct target_type *t); |