diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 18:25:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 18:25:33 -0400 |
commit | 6e80e8ed5eb92d0112674aabe82951266a6a1051 (patch) | |
tree | 4913d191cd088f355b92109af5ffa7d75e15ae4a /include/linux | |
parent | 6969a434737dd82f7343e3fcd529bc320508d9fc (diff) | |
parent | ee9a3607fb03e804ddf624544105f4e34260c380 (diff) |
Merge branch 'for-2.6.35' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.35' of git://git.kernel.dk/linux-2.6-block: (86 commits)
pipe: set lower and upper limit on max pages in the pipe page array
pipe: add support for shrinking and growing pipes
drbd: This is now equivalent to drbd release 8.3.8rc1
drbd: Do not free p_uuid early, this is done in the exit code of the receiver
drbd: Null pointer deref fix to the large "multi bio rewrite"
drbd: Fix: Do not detach, if a bio with a barrier fails
drbd: Ensure to not trigger late-new-UUID creation multiple times
drbd: Do not Oops when C_STANDALONE when uuid gets generated
writeback: fix mixed up arguments to bdi_start_writeback()
writeback: fix problem with !CONFIG_BLOCK compilation
block: improve automatic native capacity unlocking
block: use struct parsed_partitions *state universally in partition check code
block,ide: simplify bdops->set_capacity() to ->unlock_native_capacity()
block: restart partition scan after resizing a device
buffer: make invalidate_bdev() drain all percpu LRU add caches
block: remove all rcu head initializations
writeback: fixups for !dirty_writeback_centisecs
writeback: bdi_writeback_task() must set task state before calling schedule()
writeback: ensure that WB_SYNC_NONE writeback with sb pinned is sync
drivers/block/drbd: Use kzalloc
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/backing-dev.h | 6 | ||||
-rw-r--r-- | include/linux/blkdev.h | 70 | ||||
-rw-r--r-- | include/linux/drbd.h | 5 | ||||
-rw-r--r-- | include/linux/drbd_limits.h | 16 | ||||
-rw-r--r-- | include/linux/drbd_nl.h | 5 | ||||
-rw-r--r-- | include/linux/elevator.h | 6 | ||||
-rw-r--r-- | include/linux/fcntl.h | 6 | ||||
-rw-r--r-- | include/linux/fs.h | 1 | ||||
-rw-r--r-- | include/linux/ide.h | 2 | ||||
-rw-r--r-- | include/linux/pipe_fs_i.h | 13 | ||||
-rw-r--r-- | include/linux/splice.h | 7 | ||||
-rw-r--r-- | include/linux/writeback.h | 18 |
12 files changed, 134 insertions, 21 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index bd0e3c6f323f..e6e0cb5437e6 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/timer.h> | ||
17 | #include <linux/writeback.h> | 18 | #include <linux/writeback.h> |
18 | #include <asm/atomic.h> | 19 | #include <asm/atomic.h> |
19 | 20 | ||
@@ -88,6 +89,8 @@ struct backing_dev_info { | |||
88 | 89 | ||
89 | struct device *dev; | 90 | struct device *dev; |
90 | 91 | ||
92 | struct timer_list laptop_mode_wb_timer; | ||
93 | |||
91 | #ifdef CONFIG_DEBUG_FS | 94 | #ifdef CONFIG_DEBUG_FS |
92 | struct dentry *debug_dir; | 95 | struct dentry *debug_dir; |
93 | struct dentry *debug_stats; | 96 | struct dentry *debug_stats; |
@@ -103,9 +106,10 @@ int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); | |||
103 | void bdi_unregister(struct backing_dev_info *bdi); | 106 | void bdi_unregister(struct backing_dev_info *bdi); |
104 | int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int); | 107 | int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int); |
105 | void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb, | 108 | void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb, |
106 | long nr_pages); | 109 | long nr_pages, int sb_locked); |
107 | int bdi_writeback_task(struct bdi_writeback *wb); | 110 | int bdi_writeback_task(struct bdi_writeback *wb); |
108 | int bdi_has_dirty_io(struct backing_dev_info *bdi); | 111 | int bdi_has_dirty_io(struct backing_dev_info *bdi); |
112 | void bdi_arm_supers_timer(void); | ||
109 | 113 | ||
110 | extern spinlock_t bdi_lock; | 114 | extern spinlock_t bdi_lock; |
111 | extern struct list_head bdi_list; | 115 | extern struct list_head bdi_list; |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 6690e8bae7bb..be411c12ebbe 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -186,15 +186,19 @@ struct request { | |||
186 | }; | 186 | }; |
187 | 187 | ||
188 | /* | 188 | /* |
189 | * two pointers are available for the IO schedulers, if they need | 189 | * Three pointers are available for the IO schedulers, if they need |
190 | * more they have to dynamically allocate it. | 190 | * more they have to dynamically allocate it. |
191 | */ | 191 | */ |
192 | void *elevator_private; | 192 | void *elevator_private; |
193 | void *elevator_private2; | 193 | void *elevator_private2; |
194 | void *elevator_private3; | ||
194 | 195 | ||
195 | struct gendisk *rq_disk; | 196 | struct gendisk *rq_disk; |
196 | unsigned long start_time; | 197 | unsigned long start_time; |
197 | 198 | #ifdef CONFIG_BLK_CGROUP | |
199 | unsigned long long start_time_ns; | ||
200 | unsigned long long io_start_time_ns; /* when passed to hardware */ | ||
201 | #endif | ||
198 | /* Number of scatter-gather DMA addr+len pairs after | 202 | /* Number of scatter-gather DMA addr+len pairs after |
199 | * physical address coalescing is performed. | 203 | * physical address coalescing is performed. |
200 | */ | 204 | */ |
@@ -917,7 +921,12 @@ extern void blk_abort_queue(struct request_queue *); | |||
917 | */ | 921 | */ |
918 | extern struct request_queue *blk_init_queue_node(request_fn_proc *rfn, | 922 | extern struct request_queue *blk_init_queue_node(request_fn_proc *rfn, |
919 | spinlock_t *lock, int node_id); | 923 | spinlock_t *lock, int node_id); |
924 | extern struct request_queue *blk_init_allocated_queue_node(struct request_queue *, | ||
925 | request_fn_proc *, | ||
926 | spinlock_t *, int node_id); | ||
920 | extern struct request_queue *blk_init_queue(request_fn_proc *, spinlock_t *); | 927 | extern struct request_queue *blk_init_queue(request_fn_proc *, spinlock_t *); |
928 | extern struct request_queue *blk_init_allocated_queue(struct request_queue *, | ||
929 | request_fn_proc *, spinlock_t *); | ||
921 | extern void blk_cleanup_queue(struct request_queue *); | 930 | extern void blk_cleanup_queue(struct request_queue *); |
922 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); | 931 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); |
923 | extern void blk_queue_bounce_limit(struct request_queue *, u64); | 932 | extern void blk_queue_bounce_limit(struct request_queue *, u64); |
@@ -994,20 +1003,25 @@ static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt, | |||
994 | return NULL; | 1003 | return NULL; |
995 | return bqt->tag_index[tag]; | 1004 | return bqt->tag_index[tag]; |
996 | } | 1005 | } |
997 | 1006 | enum{ | |
998 | extern int blkdev_issue_flush(struct block_device *, sector_t *); | 1007 | BLKDEV_WAIT, /* wait for completion */ |
999 | #define DISCARD_FL_WAIT 0x01 /* wait for completion */ | 1008 | BLKDEV_BARRIER, /*issue request with barrier */ |
1000 | #define DISCARD_FL_BARRIER 0x02 /* issue DISCARD_BARRIER request */ | 1009 | }; |
1001 | extern int blkdev_issue_discard(struct block_device *, sector_t sector, | 1010 | #define BLKDEV_IFL_WAIT (1 << BLKDEV_WAIT) |
1002 | sector_t nr_sects, gfp_t, int flags); | 1011 | #define BLKDEV_IFL_BARRIER (1 << BLKDEV_BARRIER) |
1003 | 1012 | extern int blkdev_issue_flush(struct block_device *, gfp_t, sector_t *, | |
1013 | unsigned long); | ||
1014 | extern int blkdev_issue_discard(struct block_device *bdev, sector_t sector, | ||
1015 | sector_t nr_sects, gfp_t gfp_mask, unsigned long flags); | ||
1016 | extern int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector, | ||
1017 | sector_t nr_sects, gfp_t gfp_mask, unsigned long flags); | ||
1004 | static inline int sb_issue_discard(struct super_block *sb, | 1018 | static inline int sb_issue_discard(struct super_block *sb, |
1005 | sector_t block, sector_t nr_blocks) | 1019 | sector_t block, sector_t nr_blocks) |
1006 | { | 1020 | { |
1007 | block <<= (sb->s_blocksize_bits - 9); | 1021 | block <<= (sb->s_blocksize_bits - 9); |
1008 | nr_blocks <<= (sb->s_blocksize_bits - 9); | 1022 | nr_blocks <<= (sb->s_blocksize_bits - 9); |
1009 | return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_KERNEL, | 1023 | return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_KERNEL, |
1010 | DISCARD_FL_BARRIER); | 1024 | BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER); |
1011 | } | 1025 | } |
1012 | 1026 | ||
1013 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); | 1027 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); |
@@ -1196,6 +1210,39 @@ static inline void put_dev_sector(Sector p) | |||
1196 | struct work_struct; | 1210 | struct work_struct; |
1197 | int kblockd_schedule_work(struct request_queue *q, struct work_struct *work); | 1211 | int kblockd_schedule_work(struct request_queue *q, struct work_struct *work); |
1198 | 1212 | ||
1213 | #ifdef CONFIG_BLK_CGROUP | ||
1214 | static inline void set_start_time_ns(struct request *req) | ||
1215 | { | ||
1216 | req->start_time_ns = sched_clock(); | ||
1217 | } | ||
1218 | |||
1219 | static inline void set_io_start_time_ns(struct request *req) | ||
1220 | { | ||
1221 | req->io_start_time_ns = sched_clock(); | ||
1222 | } | ||
1223 | |||
1224 | static inline uint64_t rq_start_time_ns(struct request *req) | ||
1225 | { | ||
1226 | return req->start_time_ns; | ||
1227 | } | ||
1228 | |||
1229 | static inline uint64_t rq_io_start_time_ns(struct request *req) | ||
1230 | { | ||
1231 | return req->io_start_time_ns; | ||
1232 | } | ||
1233 | #else | ||
1234 | static inline void set_start_time_ns(struct request *req) {} | ||
1235 | static inline void set_io_start_time_ns(struct request *req) {} | ||
1236 | static inline uint64_t rq_start_time_ns(struct request *req) | ||
1237 | { | ||
1238 | return 0; | ||
1239 | } | ||
1240 | static inline uint64_t rq_io_start_time_ns(struct request *req) | ||
1241 | { | ||
1242 | return 0; | ||
1243 | } | ||
1244 | #endif | ||
1245 | |||
1199 | #define MODULE_ALIAS_BLOCKDEV(major,minor) \ | 1246 | #define MODULE_ALIAS_BLOCKDEV(major,minor) \ |
1200 | MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor)) | 1247 | MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor)) |
1201 | #define MODULE_ALIAS_BLOCKDEV_MAJOR(major) \ | 1248 | #define MODULE_ALIAS_BLOCKDEV_MAJOR(major) \ |
@@ -1283,8 +1330,7 @@ struct block_device_operations { | |||
1283 | int (*direct_access) (struct block_device *, sector_t, | 1330 | int (*direct_access) (struct block_device *, sector_t, |
1284 | void **, unsigned long *); | 1331 | void **, unsigned long *); |
1285 | int (*media_changed) (struct gendisk *); | 1332 | int (*media_changed) (struct gendisk *); |
1286 | unsigned long long (*set_capacity) (struct gendisk *, | 1333 | void (*unlock_native_capacity) (struct gendisk *); |
1287 | unsigned long long); | ||
1288 | int (*revalidate_disk) (struct gendisk *); | 1334 | int (*revalidate_disk) (struct gendisk *); |
1289 | int (*getgeo)(struct block_device *, struct hd_geometry *); | 1335 | int (*getgeo)(struct block_device *, struct hd_geometry *); |
1290 | struct module *owner; | 1336 | struct module *owner; |
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 4341b1a97a34..68530521ad00 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
@@ -53,10 +53,10 @@ | |||
53 | 53 | ||
54 | 54 | ||
55 | extern const char *drbd_buildtag(void); | 55 | extern const char *drbd_buildtag(void); |
56 | #define REL_VERSION "8.3.7" | 56 | #define REL_VERSION "8.3.8rc1" |
57 | #define API_VERSION 88 | 57 | #define API_VERSION 88 |
58 | #define PRO_VERSION_MIN 86 | 58 | #define PRO_VERSION_MIN 86 |
59 | #define PRO_VERSION_MAX 92 | 59 | #define PRO_VERSION_MAX 94 |
60 | 60 | ||
61 | 61 | ||
62 | enum drbd_io_error_p { | 62 | enum drbd_io_error_p { |
@@ -139,6 +139,7 @@ enum drbd_ret_codes { | |||
139 | ERR_DATA_NOT_CURRENT = 150, | 139 | ERR_DATA_NOT_CURRENT = 150, |
140 | ERR_CONNECTED = 151, /* DRBD 8.3 only */ | 140 | ERR_CONNECTED = 151, /* DRBD 8.3 only */ |
141 | ERR_PERM = 152, | 141 | ERR_PERM = 152, |
142 | ERR_NEED_APV_93 = 153, | ||
142 | 143 | ||
143 | /* insert new ones above this line */ | 144 | /* insert new ones above this line */ |
144 | AFTER_LAST_ERR_CODE | 145 | AFTER_LAST_ERR_CODE |
diff --git a/include/linux/drbd_limits.h b/include/linux/drbd_limits.h index 51f47a586ad8..440b42e38e89 100644 --- a/include/linux/drbd_limits.h +++ b/include/linux/drbd_limits.h | |||
@@ -133,5 +133,21 @@ | |||
133 | #define DRBD_MAX_BIO_BVECS_MAX 128 | 133 | #define DRBD_MAX_BIO_BVECS_MAX 128 |
134 | #define DRBD_MAX_BIO_BVECS_DEF 0 | 134 | #define DRBD_MAX_BIO_BVECS_DEF 0 |
135 | 135 | ||
136 | #define DRBD_DP_VOLUME_MIN 4 | ||
137 | #define DRBD_DP_VOLUME_MAX 1048576 | ||
138 | #define DRBD_DP_VOLUME_DEF 16384 | ||
139 | |||
140 | #define DRBD_DP_INTERVAL_MIN 1 | ||
141 | #define DRBD_DP_INTERVAL_MAX 600 | ||
142 | #define DRBD_DP_INTERVAL_DEF 5 | ||
143 | |||
144 | #define DRBD_RS_THROTTLE_TH_MIN 1 | ||
145 | #define DRBD_RS_THROTTLE_TH_MAX 600 | ||
146 | #define DRBD_RS_THROTTLE_TH_DEF 20 | ||
147 | |||
148 | #define DRBD_RS_HOLD_OFF_TH_MIN 1 | ||
149 | #define DRBD_RS_HOLD_OFF_TH_MAX 6000 | ||
150 | #define DRBD_RS_HOLD_OFF_TH_DEF 100 | ||
151 | |||
136 | #undef RANGE | 152 | #undef RANGE |
137 | #endif | 153 | #endif |
diff --git a/include/linux/drbd_nl.h b/include/linux/drbd_nl.h index f7431a4ca608..ce77a746fc9d 100644 --- a/include/linux/drbd_nl.h +++ b/include/linux/drbd_nl.h | |||
@@ -71,12 +71,17 @@ NL_PACKET(disconnect, 6, ) | |||
71 | NL_PACKET(resize, 7, | 71 | NL_PACKET(resize, 7, |
72 | NL_INT64( 29, T_MAY_IGNORE, resize_size) | 72 | NL_INT64( 29, T_MAY_IGNORE, resize_size) |
73 | NL_BIT( 68, T_MAY_IGNORE, resize_force) | 73 | NL_BIT( 68, T_MAY_IGNORE, resize_force) |
74 | NL_BIT( 69, T_MANDATORY, no_resync) | ||
74 | ) | 75 | ) |
75 | 76 | ||
76 | NL_PACKET(syncer_conf, 8, | 77 | NL_PACKET(syncer_conf, 8, |
77 | NL_INTEGER( 30, T_MAY_IGNORE, rate) | 78 | NL_INTEGER( 30, T_MAY_IGNORE, rate) |
78 | NL_INTEGER( 31, T_MAY_IGNORE, after) | 79 | NL_INTEGER( 31, T_MAY_IGNORE, after) |
79 | NL_INTEGER( 32, T_MAY_IGNORE, al_extents) | 80 | NL_INTEGER( 32, T_MAY_IGNORE, al_extents) |
81 | NL_INTEGER( 71, T_MAY_IGNORE, dp_volume) | ||
82 | NL_INTEGER( 72, T_MAY_IGNORE, dp_interval) | ||
83 | NL_INTEGER( 73, T_MAY_IGNORE, throttle_th) | ||
84 | NL_INTEGER( 74, T_MAY_IGNORE, hold_off_th) | ||
80 | NL_STRING( 52, T_MAY_IGNORE, verify_alg, SHARED_SECRET_MAX) | 85 | NL_STRING( 52, T_MAY_IGNORE, verify_alg, SHARED_SECRET_MAX) |
81 | NL_STRING( 51, T_MAY_IGNORE, cpu_mask, 32) | 86 | NL_STRING( 51, T_MAY_IGNORE, cpu_mask, 32) |
82 | NL_STRING( 64, T_MAY_IGNORE, csums_alg, SHARED_SECRET_MAX) | 87 | NL_STRING( 64, T_MAY_IGNORE, csums_alg, SHARED_SECRET_MAX) |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 1cb3372e65d8..2c958f4fce1e 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -14,6 +14,9 @@ typedef void (elevator_merged_fn) (struct request_queue *, struct request *, int | |||
14 | 14 | ||
15 | typedef int (elevator_allow_merge_fn) (struct request_queue *, struct request *, struct bio *); | 15 | typedef int (elevator_allow_merge_fn) (struct request_queue *, struct request *, struct bio *); |
16 | 16 | ||
17 | typedef void (elevator_bio_merged_fn) (struct request_queue *, | ||
18 | struct request *, struct bio *); | ||
19 | |||
17 | typedef int (elevator_dispatch_fn) (struct request_queue *, int); | 20 | typedef int (elevator_dispatch_fn) (struct request_queue *, int); |
18 | 21 | ||
19 | typedef void (elevator_add_req_fn) (struct request_queue *, struct request *); | 22 | typedef void (elevator_add_req_fn) (struct request_queue *, struct request *); |
@@ -36,6 +39,7 @@ struct elevator_ops | |||
36 | elevator_merged_fn *elevator_merged_fn; | 39 | elevator_merged_fn *elevator_merged_fn; |
37 | elevator_merge_req_fn *elevator_merge_req_fn; | 40 | elevator_merge_req_fn *elevator_merge_req_fn; |
38 | elevator_allow_merge_fn *elevator_allow_merge_fn; | 41 | elevator_allow_merge_fn *elevator_allow_merge_fn; |
42 | elevator_bio_merged_fn *elevator_bio_merged_fn; | ||
39 | 43 | ||
40 | elevator_dispatch_fn *elevator_dispatch_fn; | 44 | elevator_dispatch_fn *elevator_dispatch_fn; |
41 | elevator_add_req_fn *elevator_add_req_fn; | 45 | elevator_add_req_fn *elevator_add_req_fn; |
@@ -103,6 +107,8 @@ extern int elv_merge(struct request_queue *, struct request **, struct bio *); | |||
103 | extern void elv_merge_requests(struct request_queue *, struct request *, | 107 | extern void elv_merge_requests(struct request_queue *, struct request *, |
104 | struct request *); | 108 | struct request *); |
105 | extern void elv_merged_request(struct request_queue *, struct request *, int); | 109 | extern void elv_merged_request(struct request_queue *, struct request *, int); |
110 | extern void elv_bio_merged(struct request_queue *q, struct request *, | ||
111 | struct bio *); | ||
106 | extern void elv_requeue_request(struct request_queue *, struct request *); | 112 | extern void elv_requeue_request(struct request_queue *, struct request *); |
107 | extern int elv_queue_empty(struct request_queue *); | 113 | extern int elv_queue_empty(struct request_queue *); |
108 | extern struct request *elv_former_request(struct request_queue *, struct request *); | 114 | extern struct request *elv_former_request(struct request_queue *, struct request *); |
diff --git a/include/linux/fcntl.h b/include/linux/fcntl.h index 86037400a6e3..afc00af3229b 100644 --- a/include/linux/fcntl.h +++ b/include/linux/fcntl.h | |||
@@ -22,6 +22,12 @@ | |||
22 | #define F_NOTIFY (F_LINUX_SPECIFIC_BASE+2) | 22 | #define F_NOTIFY (F_LINUX_SPECIFIC_BASE+2) |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * Set and get of pipe page size array | ||
26 | */ | ||
27 | #define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7) | ||
28 | #define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8) | ||
29 | |||
30 | /* | ||
25 | * Types of directory notifications that may be requested. | 31 | * Types of directory notifications that may be requested. |
26 | */ | 32 | */ |
27 | #define DN_ACCESS 0x00000001 /* File accessed */ | 33 | #define DN_ACCESS 0x00000001 /* File accessed */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4079ef99900f..1775d362732d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -651,6 +651,7 @@ struct block_device { | |||
651 | int bd_openers; | 651 | int bd_openers; |
652 | struct mutex bd_mutex; /* open/close mutex */ | 652 | struct mutex bd_mutex; /* open/close mutex */ |
653 | struct list_head bd_inodes; | 653 | struct list_head bd_inodes; |
654 | void * bd_claiming; | ||
654 | void * bd_holder; | 655 | void * bd_holder; |
655 | int bd_holders; | 656 | int bd_holders; |
656 | #ifdef CONFIG_SYSFS | 657 | #ifdef CONFIG_SYSFS |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 3239d1c10acb..b6d448048ae2 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -362,7 +362,7 @@ struct ide_drive_s; | |||
362 | struct ide_disk_ops { | 362 | struct ide_disk_ops { |
363 | int (*check)(struct ide_drive_s *, const char *); | 363 | int (*check)(struct ide_drive_s *, const char *); |
364 | int (*get_capacity)(struct ide_drive_s *); | 364 | int (*get_capacity)(struct ide_drive_s *); |
365 | u64 (*set_capacity)(struct ide_drive_s *, u64); | 365 | void (*unlock_native_capacity)(struct ide_drive_s *); |
366 | void (*setup)(struct ide_drive_s *); | 366 | void (*setup)(struct ide_drive_s *); |
367 | void (*flush)(struct ide_drive_s *); | 367 | void (*flush)(struct ide_drive_s *); |
368 | int (*init_media)(struct ide_drive_s *, struct gendisk *); | 368 | int (*init_media)(struct ide_drive_s *, struct gendisk *); |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index b43a9e039059..16de3933c45e 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #define PIPEFS_MAGIC 0x50495045 | 4 | #define PIPEFS_MAGIC 0x50495045 |
5 | 5 | ||
6 | #define PIPE_BUFFERS (16) | 6 | #define PIPE_DEF_BUFFERS 16 |
7 | 7 | ||
8 | #define PIPE_BUF_FLAG_LRU 0x01 /* page is on the LRU */ | 8 | #define PIPE_BUF_FLAG_LRU 0x01 /* page is on the LRU */ |
9 | #define PIPE_BUF_FLAG_ATOMIC 0x02 /* was atomically mapped */ | 9 | #define PIPE_BUF_FLAG_ATOMIC 0x02 /* was atomically mapped */ |
@@ -44,17 +44,17 @@ struct pipe_buffer { | |||
44 | **/ | 44 | **/ |
45 | struct pipe_inode_info { | 45 | struct pipe_inode_info { |
46 | wait_queue_head_t wait; | 46 | wait_queue_head_t wait; |
47 | unsigned int nrbufs, curbuf; | 47 | unsigned int nrbufs, curbuf, buffers; |
48 | struct page *tmp_page; | ||
49 | unsigned int readers; | 48 | unsigned int readers; |
50 | unsigned int writers; | 49 | unsigned int writers; |
51 | unsigned int waiting_writers; | 50 | unsigned int waiting_writers; |
52 | unsigned int r_counter; | 51 | unsigned int r_counter; |
53 | unsigned int w_counter; | 52 | unsigned int w_counter; |
53 | struct page *tmp_page; | ||
54 | struct fasync_struct *fasync_readers; | 54 | struct fasync_struct *fasync_readers; |
55 | struct fasync_struct *fasync_writers; | 55 | struct fasync_struct *fasync_writers; |
56 | struct inode *inode; | 56 | struct inode *inode; |
57 | struct pipe_buffer bufs[PIPE_BUFFERS]; | 57 | struct pipe_buffer *bufs; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | /* | 60 | /* |
@@ -139,6 +139,8 @@ void pipe_lock(struct pipe_inode_info *); | |||
139 | void pipe_unlock(struct pipe_inode_info *); | 139 | void pipe_unlock(struct pipe_inode_info *); |
140 | void pipe_double_lock(struct pipe_inode_info *, struct pipe_inode_info *); | 140 | void pipe_double_lock(struct pipe_inode_info *, struct pipe_inode_info *); |
141 | 141 | ||
142 | extern unsigned int pipe_max_pages; | ||
143 | |||
142 | /* Drop the inode semaphore and wait for a pipe event, atomically */ | 144 | /* Drop the inode semaphore and wait for a pipe event, atomically */ |
143 | void pipe_wait(struct pipe_inode_info *pipe); | 145 | void pipe_wait(struct pipe_inode_info *pipe); |
144 | 146 | ||
@@ -154,4 +156,7 @@ int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *); | |||
154 | int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *); | 156 | int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *); |
155 | void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *); | 157 | void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *); |
156 | 158 | ||
159 | /* for F_SETPIPE_SZ and F_GETPIPE_SZ */ | ||
160 | long pipe_fcntl(struct file *, unsigned int, unsigned long arg); | ||
161 | |||
157 | #endif | 162 | #endif |
diff --git a/include/linux/splice.h b/include/linux/splice.h index 18e7c7c0cae6..997c3b4c212b 100644 --- a/include/linux/splice.h +++ b/include/linux/splice.h | |||
@@ -82,4 +82,11 @@ extern ssize_t splice_to_pipe(struct pipe_inode_info *, | |||
82 | extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *, | 82 | extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *, |
83 | splice_direct_actor *); | 83 | splice_direct_actor *); |
84 | 84 | ||
85 | /* | ||
86 | * for dynamic pipe sizing | ||
87 | */ | ||
88 | extern int splice_grow_spd(struct pipe_inode_info *, struct splice_pipe_desc *); | ||
89 | extern void splice_shrink_spd(struct pipe_inode_info *, | ||
90 | struct splice_pipe_desc *); | ||
91 | |||
85 | #endif | 92 | #endif |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 36520ded3e06..cc97d6caf2b3 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -65,6 +65,15 @@ struct writeback_control { | |||
65 | * so we use a single control to update them | 65 | * so we use a single control to update them |
66 | */ | 66 | */ |
67 | unsigned no_nrwrite_index_update:1; | 67 | unsigned no_nrwrite_index_update:1; |
68 | |||
69 | /* | ||
70 | * For WB_SYNC_ALL, the sb must always be pinned. For WB_SYNC_NONE, | ||
71 | * the writeback code will pin the sb for the caller. However, | ||
72 | * for eg umount, the caller does WB_SYNC_NONE but already has | ||
73 | * the sb pinned. If the below is set, caller already has the | ||
74 | * sb pinned. | ||
75 | */ | ||
76 | unsigned sb_pinned:1; | ||
68 | }; | 77 | }; |
69 | 78 | ||
70 | /* | 79 | /* |
@@ -73,6 +82,7 @@ struct writeback_control { | |||
73 | struct bdi_writeback; | 82 | struct bdi_writeback; |
74 | int inode_wait(void *); | 83 | int inode_wait(void *); |
75 | void writeback_inodes_sb(struct super_block *); | 84 | void writeback_inodes_sb(struct super_block *); |
85 | void writeback_inodes_sb_locked(struct super_block *); | ||
76 | int writeback_inodes_sb_if_idle(struct super_block *); | 86 | int writeback_inodes_sb_if_idle(struct super_block *); |
77 | void sync_inodes_sb(struct super_block *); | 87 | void sync_inodes_sb(struct super_block *); |
78 | void writeback_inodes_wbc(struct writeback_control *wbc); | 88 | void writeback_inodes_wbc(struct writeback_control *wbc); |
@@ -96,8 +106,14 @@ static inline void inode_sync_wait(struct inode *inode) | |||
96 | /* | 106 | /* |
97 | * mm/page-writeback.c | 107 | * mm/page-writeback.c |
98 | */ | 108 | */ |
99 | void laptop_io_completion(void); | 109 | #ifdef CONFIG_BLOCK |
110 | void laptop_io_completion(struct backing_dev_info *info); | ||
100 | void laptop_sync_completion(void); | 111 | void laptop_sync_completion(void); |
112 | void laptop_mode_sync(struct work_struct *work); | ||
113 | void laptop_mode_timer_fn(unsigned long data); | ||
114 | #else | ||
115 | static inline void laptop_sync_completion(void) { } | ||
116 | #endif | ||
101 | void throttle_vm_writeout(gfp_t gfp_mask); | 117 | void throttle_vm_writeout(gfp_t gfp_mask); |
102 | 118 | ||
103 | /* These are exported to sysctl. */ | 119 | /* These are exported to sysctl. */ |