diff options
author | James Morris <jmorris@namei.org> | 2011-04-19 07:32:41 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2011-04-19 07:32:41 -0400 |
commit | d4ab4e6a23f805abb8fc3cc34525eec3788aeca1 (patch) | |
tree | eefd82c155bc27469a85667d759cd90facf4a6e3 /include/linux/blkdev.h | |
parent | c0fa797ae6cd02ff87c0bfe0d509368a3b45640e (diff) | |
parent | 96fd2d57b8252e16dfacf8941f7a74a6119197f5 (diff) |
Merge branch 'master'; commit 'v2.6.39-rc3' into next
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 16a902f099ac..cbbfd98ad4a3 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -697,7 +697,7 @@ extern void blk_start_queue(struct request_queue *q); | |||
697 | extern void blk_stop_queue(struct request_queue *q); | 697 | extern void blk_stop_queue(struct request_queue *q); |
698 | extern void blk_sync_queue(struct request_queue *q); | 698 | extern void blk_sync_queue(struct request_queue *q); |
699 | extern void __blk_stop_queue(struct request_queue *q); | 699 | extern void __blk_stop_queue(struct request_queue *q); |
700 | extern void __blk_run_queue(struct request_queue *q, bool force_kblockd); | 700 | extern void __blk_run_queue(struct request_queue *q); |
701 | extern void blk_run_queue(struct request_queue *); | 701 | extern void blk_run_queue(struct request_queue *); |
702 | extern int blk_rq_map_user(struct request_queue *, struct request *, | 702 | extern int blk_rq_map_user(struct request_queue *, struct request *, |
703 | struct rq_map_data *, void __user *, unsigned long, | 703 | struct rq_map_data *, void __user *, unsigned long, |
@@ -857,26 +857,39 @@ extern void blk_put_queue(struct request_queue *); | |||
857 | struct blk_plug { | 857 | struct blk_plug { |
858 | unsigned long magic; | 858 | unsigned long magic; |
859 | struct list_head list; | 859 | struct list_head list; |
860 | struct list_head cb_list; | ||
860 | unsigned int should_sort; | 861 | unsigned int should_sort; |
861 | }; | 862 | }; |
863 | struct blk_plug_cb { | ||
864 | struct list_head list; | ||
865 | void (*callback)(struct blk_plug_cb *); | ||
866 | }; | ||
862 | 867 | ||
863 | extern void blk_start_plug(struct blk_plug *); | 868 | extern void blk_start_plug(struct blk_plug *); |
864 | extern void blk_finish_plug(struct blk_plug *); | 869 | extern void blk_finish_plug(struct blk_plug *); |
865 | extern void __blk_flush_plug(struct task_struct *, struct blk_plug *); | 870 | extern void blk_flush_plug_list(struct blk_plug *, bool); |
866 | 871 | ||
867 | static inline void blk_flush_plug(struct task_struct *tsk) | 872 | static inline void blk_flush_plug(struct task_struct *tsk) |
868 | { | 873 | { |
869 | struct blk_plug *plug = tsk->plug; | 874 | struct blk_plug *plug = tsk->plug; |
870 | 875 | ||
871 | if (unlikely(plug)) | 876 | if (plug) |
872 | __blk_flush_plug(tsk, plug); | 877 | blk_flush_plug_list(plug, false); |
878 | } | ||
879 | |||
880 | static inline void blk_schedule_flush_plug(struct task_struct *tsk) | ||
881 | { | ||
882 | struct blk_plug *plug = tsk->plug; | ||
883 | |||
884 | if (plug) | ||
885 | blk_flush_plug_list(plug, true); | ||
873 | } | 886 | } |
874 | 887 | ||
875 | static inline bool blk_needs_flush_plug(struct task_struct *tsk) | 888 | static inline bool blk_needs_flush_plug(struct task_struct *tsk) |
876 | { | 889 | { |
877 | struct blk_plug *plug = tsk->plug; | 890 | struct blk_plug *plug = tsk->plug; |
878 | 891 | ||
879 | return plug && !list_empty(&plug->list); | 892 | return plug && (!list_empty(&plug->list) || !list_empty(&plug->cb_list)); |
880 | } | 893 | } |
881 | 894 | ||
882 | /* | 895 | /* |
@@ -1206,6 +1219,7 @@ struct blk_integrity { | |||
1206 | struct kobject kobj; | 1219 | struct kobject kobj; |
1207 | }; | 1220 | }; |
1208 | 1221 | ||
1222 | extern bool blk_integrity_is_initialized(struct gendisk *); | ||
1209 | extern int blk_integrity_register(struct gendisk *, struct blk_integrity *); | 1223 | extern int blk_integrity_register(struct gendisk *, struct blk_integrity *); |
1210 | extern void blk_integrity_unregister(struct gendisk *); | 1224 | extern void blk_integrity_unregister(struct gendisk *); |
1211 | extern int blk_integrity_compare(struct gendisk *, struct gendisk *); | 1225 | extern int blk_integrity_compare(struct gendisk *, struct gendisk *); |
@@ -1262,6 +1276,7 @@ queue_max_integrity_segments(struct request_queue *q) | |||
1262 | #define queue_max_integrity_segments(a) (0) | 1276 | #define queue_max_integrity_segments(a) (0) |
1263 | #define blk_integrity_merge_rq(a, b, c) (0) | 1277 | #define blk_integrity_merge_rq(a, b, c) (0) |
1264 | #define blk_integrity_merge_bio(a, b, c) (0) | 1278 | #define blk_integrity_merge_bio(a, b, c) (0) |
1279 | #define blk_integrity_is_initialized(a) (0) | ||
1265 | 1280 | ||
1266 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | 1281 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
1267 | 1282 | ||
@@ -1312,6 +1327,11 @@ static inline void blk_flush_plug(struct task_struct *task) | |||
1312 | { | 1327 | { |
1313 | } | 1328 | } |
1314 | 1329 | ||
1330 | static inline void blk_schedule_flush_plug(struct task_struct *task) | ||
1331 | { | ||
1332 | } | ||
1333 | |||
1334 | |||
1315 | static inline bool blk_needs_flush_plug(struct task_struct *tsk) | 1335 | static inline bool blk_needs_flush_plug(struct task_struct *tsk) |
1316 | { | 1336 | { |
1317 | return false; | 1337 | return false; |