aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-04-18 16:21:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-04-18 16:21:18 -0400
commit8a83f33100c691f5a576dba259cc05502dc358f0 (patch)
treec10c74bd28026cefdb8caa1362a0ccc30ea695a5 /include
parent5d5b1b9f79ebad81215d11e208e9bfa9679a4ddd (diff)
parent24ecfbe27f65563909b14492afda2f1c21f7c044 (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.h12
-rw-r--r--include/linux/device-mapper.h1
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);
196typedef int (make_request_fn) (struct request_queue *q, struct bio *bio); 196typedef int (make_request_fn) (struct request_queue *q, struct bio *bio);
197typedef int (prep_rq_fn) (struct request_queue *, struct request *); 197typedef int (prep_rq_fn) (struct request_queue *, struct request *);
198typedef void (unprep_rq_fn) (struct request_queue *, struct request *); 198typedef void (unprep_rq_fn) (struct request_queue *, struct request *);
199typedef void (unplugged_fn) (struct request_queue *);
200 199
201struct bio_vec; 200struct bio_vec;
202struct bvec_merge_data { 201struct 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);
699extern void blk_stop_queue(struct request_queue *q); 697extern void blk_stop_queue(struct request_queue *q);
700extern void blk_sync_queue(struct request_queue *q); 698extern void blk_sync_queue(struct request_queue *q);
701extern void __blk_stop_queue(struct request_queue *q); 699extern void __blk_stop_queue(struct request_queue *q);
702extern void __blk_run_queue(struct request_queue *q, bool force_kblockd); 700extern void __blk_run_queue(struct request_queue *q);
703extern void blk_run_queue(struct request_queue *); 701extern void blk_run_queue(struct request_queue *);
704extern int blk_rq_map_user(struct request_queue *, struct request *, 702extern 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);
843extern void blk_queue_update_dma_alignment(struct request_queue *, int); 841extern void blk_queue_update_dma_alignment(struct request_queue *, int);
844extern void blk_queue_softirq_done(struct request_queue *, softirq_done_fn *); 842extern void blk_queue_softirq_done(struct request_queue *, softirq_done_fn *);
845extern void blk_queue_rq_timed_out(struct request_queue *, rq_timed_out_fn *); 843extern void blk_queue_rq_timed_out(struct request_queue *, rq_timed_out_fn *);
846extern void blk_queue_unplugged(struct request_queue *, unplugged_fn *);
847extern void blk_queue_rq_timeout(struct request_queue *, unsigned int); 844extern void blk_queue_rq_timeout(struct request_queue *, unsigned int);
848extern void blk_queue_flush(struct request_queue *q, unsigned int flush); 845extern void blk_queue_flush(struct request_queue *q, unsigned int flush);
849extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); 846extern 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 *);
860struct blk_plug { 857struct 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};
863struct blk_plug_cb {
864 struct list_head list;
865 void (*callback)(struct blk_plug_cb *);
866};
865 867
866extern void blk_start_plug(struct blk_plug *); 868extern void blk_start_plug(struct blk_plug *);
867extern void blk_finish_plug(struct blk_plug *); 869extern 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 {
197struct dm_target_callbacks { 197struct 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
203int dm_register_target(struct target_type *t); 202int dm_register_target(struct target_type *t);