aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/writeback.h
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-08-04 08:05:07 -0400
committerMichal Marek <mmarek@suse.cz>2010-08-04 08:05:07 -0400
commit7a996d3ab150bb0e1b71fa182f70199a703efdd1 (patch)
tree96a36947d90c9b96580899abd38cb3b70cd9d40b /include/linux/writeback.h
parent7cf3d73b4360e91b14326632ab1aeda4cb26308d (diff)
parent9fe6206f400646a2322096b56c59891d530e8d51 (diff)
Merge commit 'v2.6.35' into kbuild/kconfig
Conflicts: scripts/kconfig/Makefile
Diffstat (limited to 'include/linux/writeback.h')
-rw-r--r--include/linux/writeback.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 76e8903cd204..c24eca71e80c 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -27,13 +27,12 @@ enum writeback_sync_modes {
27 * in a manner such that unspecified fields are set to zero. 27 * in a manner such that unspecified fields are set to zero.
28 */ 28 */
29struct writeback_control { 29struct writeback_control {
30 struct backing_dev_info *bdi; /* If !NULL, only write back this
31 queue */
32 struct super_block *sb; /* if !NULL, only write inodes from
33 this super_block */
34 enum writeback_sync_modes sync_mode; 30 enum writeback_sync_modes sync_mode;
35 unsigned long *older_than_this; /* If !NULL, only write back inodes 31 unsigned long *older_than_this; /* If !NULL, only write back inodes
36 older than this */ 32 older than this */
33 unsigned long wb_start; /* Time writeback_inodes_wb was
34 called. This is needed to avoid
35 extra jobs and livelock */
37 long nr_to_write; /* Write this many pages, and decrement 36 long nr_to_write; /* Write this many pages, and decrement
38 this for each page written */ 37 this for each page written */
39 long pages_skipped; /* Pages which were not written */ 38 long pages_skipped; /* Pages which were not written */
@@ -53,15 +52,6 @@ struct writeback_control {
53 unsigned for_reclaim:1; /* Invoked from the page allocator */ 52 unsigned for_reclaim:1; /* Invoked from the page allocator */
54 unsigned range_cyclic:1; /* range_start is cyclic */ 53 unsigned range_cyclic:1; /* range_start is cyclic */
55 unsigned more_io:1; /* more io to be dispatched */ 54 unsigned more_io:1; /* more io to be dispatched */
56 /*
57 * write_cache_pages() won't update wbc->nr_to_write and
58 * mapping->writeback_index if no_nrwrite_index_update
59 * is set. write_cache_pages() may write more than we
60 * requested and we want to make sure nr_to_write and
61 * writeback_index are updated in a consistent manner
62 * so we use a single control to update them
63 */
64 unsigned no_nrwrite_index_update:1;
65}; 55};
66 56
67/* 57/*
@@ -72,7 +62,8 @@ int inode_wait(void *);
72void writeback_inodes_sb(struct super_block *); 62void writeback_inodes_sb(struct super_block *);
73int writeback_inodes_sb_if_idle(struct super_block *); 63int writeback_inodes_sb_if_idle(struct super_block *);
74void sync_inodes_sb(struct super_block *); 64void sync_inodes_sb(struct super_block *);
75void writeback_inodes_wbc(struct writeback_control *wbc); 65void writeback_inodes_wb(struct bdi_writeback *wb,
66 struct writeback_control *wbc);
76long wb_do_writeback(struct bdi_writeback *wb, int force_wait); 67long wb_do_writeback(struct bdi_writeback *wb, int force_wait);
77void wakeup_flusher_threads(long nr_pages); 68void wakeup_flusher_threads(long nr_pages);
78 69
@@ -93,8 +84,14 @@ static inline void inode_sync_wait(struct inode *inode)
93/* 84/*
94 * mm/page-writeback.c 85 * mm/page-writeback.c
95 */ 86 */
96void laptop_io_completion(void); 87#ifdef CONFIG_BLOCK
88void laptop_io_completion(struct backing_dev_info *info);
97void laptop_sync_completion(void); 89void laptop_sync_completion(void);
90void laptop_mode_sync(struct work_struct *work);
91void laptop_mode_timer_fn(unsigned long data);
92#else
93static inline void laptop_sync_completion(void) { }
94#endif
98void throttle_vm_writeout(gfp_t gfp_mask); 95void throttle_vm_writeout(gfp_t gfp_mask);
99 96
100/* These are exported to sysctl. */ 97/* These are exported to sysctl. */