diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-25 13:33:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-25 13:33:36 -0400 |
commit | 096a705bbc080a4041636d07514560da8d78acbe (patch) | |
tree | 38c3c01225709ffa53419083ea6332f8a72610de /include | |
parent | fea80311a939a746533a6d7e7c3183729d6a3faf (diff) | |
parent | 5757a6d76cdf6dda2a492c09b985c015e86779b1 (diff) |
Merge branch 'for-3.1/core' of git://git.kernel.dk/linux-block
* 'for-3.1/core' of git://git.kernel.dk/linux-block: (24 commits)
block: strict rq_affinity
backing-dev: use synchronize_rcu_expedited instead of synchronize_rcu
block: fix patch import error in max_discard_sectors check
block: reorder request_queue to remove 64 bit alignment padding
CFQ: add think time check for group
CFQ: add think time check for service tree
CFQ: move think time check variables to a separate struct
fixlet: Remove fs_excl from struct task.
cfq: Remove special treatment for metadata rqs.
block: document blk_plug list access
block: avoid building too big plug list
compat_ioctl: fix make headers_check regression
block: eliminate potential for infinite loop in blkdev_issue_discard
compat_ioctl: fix warning caused by qemu
block: flush MEDIA_CHANGE from drivers on close(2)
blk-throttle: Make total_nr_queued unsigned
block: Add __attribute__((format(printf...) and fix fallout
fs/partitions/check.c: make local symbols static
block:remove some spare spaces in genhd.c
block:fix the comment error in blkdev.h
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev.h | 27 | ||||
-rw-r--r-- | include/linux/elevator.h | 2 | ||||
-rw-r--r-- | include/linux/fd.h | 22 | ||||
-rw-r--r-- | include/linux/fs.h | 4 | ||||
-rw-r--r-- | include/linux/genhd.h | 2 | ||||
-rw-r--r-- | include/linux/init_task.h | 1 | ||||
-rw-r--r-- | include/linux/iocontext.h | 14 | ||||
-rw-r--r-- | include/linux/sched.h | 1 |
8 files changed, 51 insertions, 22 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 1a23722e8878..0e67c45b3bc9 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -73,7 +73,7 @@ enum rq_cmd_type_bits { | |||
73 | 73 | ||
74 | /* | 74 | /* |
75 | * try to put the fields that are referenced together in the same cacheline. | 75 | * try to put the fields that are referenced together in the same cacheline. |
76 | * if you modify this structure, be sure to check block/blk-core.c:rq_init() | 76 | * if you modify this structure, be sure to check block/blk-core.c:blk_rq_init() |
77 | * as well! | 77 | * as well! |
78 | */ | 78 | */ |
79 | struct request { | 79 | struct request { |
@@ -260,8 +260,7 @@ struct queue_limits { | |||
260 | unsigned char discard_zeroes_data; | 260 | unsigned char discard_zeroes_data; |
261 | }; | 261 | }; |
262 | 262 | ||
263 | struct request_queue | 263 | struct request_queue { |
264 | { | ||
265 | /* | 264 | /* |
266 | * Together with queue_head for cacheline sharing | 265 | * Together with queue_head for cacheline sharing |
267 | */ | 266 | */ |
@@ -304,14 +303,14 @@ struct request_queue | |||
304 | void *queuedata; | 303 | void *queuedata; |
305 | 304 | ||
306 | /* | 305 | /* |
307 | * queue needs bounce pages for pages above this limit | 306 | * various queue flags, see QUEUE_* below |
308 | */ | 307 | */ |
309 | gfp_t bounce_gfp; | 308 | unsigned long queue_flags; |
310 | 309 | ||
311 | /* | 310 | /* |
312 | * various queue flags, see QUEUE_* below | 311 | * queue needs bounce pages for pages above this limit |
313 | */ | 312 | */ |
314 | unsigned long queue_flags; | 313 | gfp_t bounce_gfp; |
315 | 314 | ||
316 | /* | 315 | /* |
317 | * protects queue structures from reentrancy. ->__queue_lock should | 316 | * protects queue structures from reentrancy. ->__queue_lock should |
@@ -334,8 +333,8 @@ struct request_queue | |||
334 | unsigned int nr_congestion_off; | 333 | unsigned int nr_congestion_off; |
335 | unsigned int nr_batching; | 334 | unsigned int nr_batching; |
336 | 335 | ||
337 | void *dma_drain_buffer; | ||
338 | unsigned int dma_drain_size; | 336 | unsigned int dma_drain_size; |
337 | void *dma_drain_buffer; | ||
339 | unsigned int dma_pad_mask; | 338 | unsigned int dma_pad_mask; |
340 | unsigned int dma_alignment; | 339 | unsigned int dma_alignment; |
341 | 340 | ||
@@ -393,7 +392,7 @@ struct request_queue | |||
393 | #define QUEUE_FLAG_ELVSWITCH 6 /* don't use elevator, just do FIFO */ | 392 | #define QUEUE_FLAG_ELVSWITCH 6 /* don't use elevator, just do FIFO */ |
394 | #define QUEUE_FLAG_BIDI 7 /* queue supports bidi requests */ | 393 | #define QUEUE_FLAG_BIDI 7 /* queue supports bidi requests */ |
395 | #define QUEUE_FLAG_NOMERGES 8 /* disable merge attempts */ | 394 | #define QUEUE_FLAG_NOMERGES 8 /* disable merge attempts */ |
396 | #define QUEUE_FLAG_SAME_COMP 9 /* force complete on same CPU */ | 395 | #define QUEUE_FLAG_SAME_COMP 9 /* complete on same CPU-group */ |
397 | #define QUEUE_FLAG_FAIL_IO 10 /* fake timeout */ | 396 | #define QUEUE_FLAG_FAIL_IO 10 /* fake timeout */ |
398 | #define QUEUE_FLAG_STACKABLE 11 /* supports request stacking */ | 397 | #define QUEUE_FLAG_STACKABLE 11 /* supports request stacking */ |
399 | #define QUEUE_FLAG_NONROT 12 /* non-rotational device (SSD) */ | 398 | #define QUEUE_FLAG_NONROT 12 /* non-rotational device (SSD) */ |
@@ -403,6 +402,7 @@ struct request_queue | |||
403 | #define QUEUE_FLAG_NOXMERGES 15 /* No extended merges */ | 402 | #define QUEUE_FLAG_NOXMERGES 15 /* No extended merges */ |
404 | #define QUEUE_FLAG_ADD_RANDOM 16 /* Contributes to random pool */ | 403 | #define QUEUE_FLAG_ADD_RANDOM 16 /* Contributes to random pool */ |
405 | #define QUEUE_FLAG_SECDISCARD 17 /* supports SECDISCARD */ | 404 | #define QUEUE_FLAG_SECDISCARD 17 /* supports SECDISCARD */ |
405 | #define QUEUE_FLAG_SAME_FORCE 18 /* force complete on same CPU */ | ||
406 | 406 | ||
407 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ | 407 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ |
408 | (1 << QUEUE_FLAG_STACKABLE) | \ | 408 | (1 << QUEUE_FLAG_STACKABLE) | \ |
@@ -857,12 +857,21 @@ struct request_queue *blk_alloc_queue(gfp_t); | |||
857 | struct request_queue *blk_alloc_queue_node(gfp_t, int); | 857 | struct request_queue *blk_alloc_queue_node(gfp_t, int); |
858 | extern void blk_put_queue(struct request_queue *); | 858 | extern void blk_put_queue(struct request_queue *); |
859 | 859 | ||
860 | /* | ||
861 | * Note: Code in between changing the blk_plug list/cb_list or element of such | ||
862 | * lists is preemptable, but such code can't do sleep (or be very careful), | ||
863 | * otherwise data is corrupted. For details, please check schedule() where | ||
864 | * blk_schedule_flush_plug() is called. | ||
865 | */ | ||
860 | struct blk_plug { | 866 | struct blk_plug { |
861 | unsigned long magic; | 867 | unsigned long magic; |
862 | struct list_head list; | 868 | struct list_head list; |
863 | struct list_head cb_list; | 869 | struct list_head cb_list; |
864 | unsigned int should_sort; | 870 | unsigned int should_sort; |
871 | unsigned int count; | ||
865 | }; | 872 | }; |
873 | #define BLK_MAX_REQUEST_COUNT 16 | ||
874 | |||
866 | struct blk_plug_cb { | 875 | struct blk_plug_cb { |
867 | struct list_head list; | 876 | struct list_head list; |
868 | void (*callback)(struct blk_plug_cb *); | 877 | void (*callback)(struct blk_plug_cb *); |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 21a8ebf2dc3a..d800d5142184 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -146,7 +146,7 @@ extern struct request *elv_rb_latter_request(struct request_queue *, struct requ | |||
146 | /* | 146 | /* |
147 | * rb support functions. | 147 | * rb support functions. |
148 | */ | 148 | */ |
149 | extern struct request *elv_rb_add(struct rb_root *, struct request *); | 149 | extern void elv_rb_add(struct rb_root *, struct request *); |
150 | extern void elv_rb_del(struct rb_root *, struct request *); | 150 | extern void elv_rb_del(struct rb_root *, struct request *); |
151 | extern struct request *elv_rb_find(struct rb_root *, sector_t); | 151 | extern struct request *elv_rb_find(struct rb_root *, sector_t); |
152 | 152 | ||
diff --git a/include/linux/fd.h b/include/linux/fd.h index f5d194af07a8..72202b1b9a6a 100644 --- a/include/linux/fd.h +++ b/include/linux/fd.h | |||
@@ -377,4 +377,26 @@ struct floppy_raw_cmd { | |||
377 | #define FDEJECT _IO(2, 0x5a) | 377 | #define FDEJECT _IO(2, 0x5a) |
378 | /* eject the disk */ | 378 | /* eject the disk */ |
379 | 379 | ||
380 | |||
381 | #ifdef __KERNEL__ | ||
382 | #ifdef CONFIG_COMPAT | ||
383 | #include <linux/compat.h> | ||
384 | |||
385 | struct compat_floppy_struct { | ||
386 | compat_uint_t size; | ||
387 | compat_uint_t sect; | ||
388 | compat_uint_t head; | ||
389 | compat_uint_t track; | ||
390 | compat_uint_t stretch; | ||
391 | unsigned char gap; | ||
392 | unsigned char rate; | ||
393 | unsigned char spec1; | ||
394 | unsigned char fmt_gap; | ||
395 | const compat_caddr_t name; | ||
396 | }; | ||
397 | |||
398 | #define FDGETPRM32 _IOR(2, 0x04, struct compat_floppy_struct) | ||
399 | #endif | ||
400 | #endif | ||
401 | |||
380 | #endif | 402 | #endif |
diff --git a/include/linux/fs.h b/include/linux/fs.h index b224dc468a23..0c35d6e767d9 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1469,10 +1469,6 @@ enum { | |||
1469 | #define vfs_check_frozen(sb, level) \ | 1469 | #define vfs_check_frozen(sb, level) \ |
1470 | wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level))) | 1470 | wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level))) |
1471 | 1471 | ||
1472 | #define get_fs_excl() atomic_inc(¤t->fs_excl) | ||
1473 | #define put_fs_excl() atomic_dec(¤t->fs_excl) | ||
1474 | #define has_fs_excl() atomic_read(¤t->fs_excl) | ||
1475 | |||
1476 | /* | 1472 | /* |
1477 | * until VFS tracks user namespaces for inodes, just make all files | 1473 | * until VFS tracks user namespaces for inodes, just make all files |
1478 | * belong to init_user_ns | 1474 | * belong to init_user_ns |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 300d7582006e..02fa4697a0e5 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -420,7 +420,7 @@ static inline int get_disk_ro(struct gendisk *disk) | |||
420 | 420 | ||
421 | extern void disk_block_events(struct gendisk *disk); | 421 | extern void disk_block_events(struct gendisk *disk); |
422 | extern void disk_unblock_events(struct gendisk *disk); | 422 | extern void disk_unblock_events(struct gendisk *disk); |
423 | extern void disk_check_events(struct gendisk *disk); | 423 | extern void disk_flush_events(struct gendisk *disk, unsigned int mask); |
424 | extern unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask); | 424 | extern unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask); |
425 | 425 | ||
426 | /* drivers/char/random.c */ | 426 | /* drivers/char/random.c */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 580f70c02391..d14e058aaeed 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -176,7 +176,6 @@ extern struct cred init_cred; | |||
176 | .alloc_lock = __SPIN_LOCK_UNLOCKED(tsk.alloc_lock), \ | 176 | .alloc_lock = __SPIN_LOCK_UNLOCKED(tsk.alloc_lock), \ |
177 | .journal_info = NULL, \ | 177 | .journal_info = NULL, \ |
178 | .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ | 178 | .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ |
179 | .fs_excl = ATOMIC_INIT(0), \ | ||
180 | .pi_lock = __RAW_SPIN_LOCK_UNLOCKED(tsk.pi_lock), \ | 179 | .pi_lock = __RAW_SPIN_LOCK_UNLOCKED(tsk.pi_lock), \ |
181 | .timer_slack_ns = 50000, /* 50 usec default slack */ \ | 180 | .timer_slack_ns = 50000, /* 50 usec default slack */ \ |
182 | .pids = { \ | 181 | .pids = { \ |
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h index b2eee896dcbc..5037a0ad2312 100644 --- a/include/linux/iocontext.h +++ b/include/linux/iocontext.h | |||
@@ -5,6 +5,14 @@ | |||
5 | #include <linux/rcupdate.h> | 5 | #include <linux/rcupdate.h> |
6 | 6 | ||
7 | struct cfq_queue; | 7 | struct cfq_queue; |
8 | struct cfq_ttime { | ||
9 | unsigned long last_end_request; | ||
10 | |||
11 | unsigned long ttime_total; | ||
12 | unsigned long ttime_samples; | ||
13 | unsigned long ttime_mean; | ||
14 | }; | ||
15 | |||
8 | struct cfq_io_context { | 16 | struct cfq_io_context { |
9 | void *key; | 17 | void *key; |
10 | 18 | ||
@@ -12,11 +20,7 @@ struct cfq_io_context { | |||
12 | 20 | ||
13 | struct io_context *ioc; | 21 | struct io_context *ioc; |
14 | 22 | ||
15 | unsigned long last_end_request; | 23 | struct cfq_ttime ttime; |
16 | |||
17 | unsigned long ttime_total; | ||
18 | unsigned long ttime_samples; | ||
19 | unsigned long ttime_mean; | ||
20 | 24 | ||
21 | struct list_head queue_list; | 25 | struct list_head queue_list; |
22 | struct hlist_node cic_list; | 26 | struct hlist_node cic_list; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index ed766add9b23..20b03bf94748 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1512,7 +1512,6 @@ struct task_struct { | |||
1512 | short il_next; | 1512 | short il_next; |
1513 | short pref_node_fork; | 1513 | short pref_node_fork; |
1514 | #endif | 1514 | #endif |
1515 | atomic_t fs_excl; /* holding fs exclusive resources */ | ||
1516 | struct rcu_head rcu; | 1515 | struct rcu_head rcu; |
1517 | 1516 | ||
1518 | /* | 1517 | /* |