diff options
Diffstat (limited to 'include/linux/writeback.h')
| -rw-r--r-- | include/linux/writeback.h | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 76e8903cd204..72a5d647a5f2 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 | */ |
| 29 | struct writeback_control { | 29 | struct 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 *); | |||
| 72 | void writeback_inodes_sb(struct super_block *); | 62 | void writeback_inodes_sb(struct super_block *); |
| 73 | int writeback_inodes_sb_if_idle(struct super_block *); | 63 | int writeback_inodes_sb_if_idle(struct super_block *); |
| 74 | void sync_inodes_sb(struct super_block *); | 64 | void sync_inodes_sb(struct super_block *); |
| 75 | void writeback_inodes_wbc(struct writeback_control *wbc); | 65 | void writeback_inodes_wb(struct bdi_writeback *wb, |
| 66 | struct writeback_control *wbc); | ||
| 76 | long wb_do_writeback(struct bdi_writeback *wb, int force_wait); | 67 | long wb_do_writeback(struct bdi_writeback *wb, int force_wait); |
| 77 | void wakeup_flusher_threads(long nr_pages); | 68 | void 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 | */ |
| 96 | void laptop_io_completion(void); | 87 | #ifdef CONFIG_BLOCK |
| 88 | void laptop_io_completion(struct backing_dev_info *info); | ||
| 97 | void laptop_sync_completion(void); | 89 | void laptop_sync_completion(void); |
| 90 | void laptop_mode_sync(struct work_struct *work); | ||
| 91 | void laptop_mode_timer_fn(unsigned long data); | ||
| 92 | #else | ||
| 93 | static inline void laptop_sync_completion(void) { } | ||
| 94 | #endif | ||
| 98 | void throttle_vm_writeout(gfp_t gfp_mask); | 95 | void throttle_vm_writeout(gfp_t gfp_mask); |
| 99 | 96 | ||
| 100 | /* These are exported to sysctl. */ | 97 | /* These are exported to sysctl. */ |
| @@ -127,8 +124,9 @@ struct ctl_table; | |||
| 127 | int dirty_writeback_centisecs_handler(struct ctl_table *, int, | 124 | int dirty_writeback_centisecs_handler(struct ctl_table *, int, |
| 128 | void __user *, size_t *, loff_t *); | 125 | void __user *, size_t *, loff_t *); |
| 129 | 126 | ||
| 130 | void get_dirty_limits(unsigned long *pbackground, unsigned long *pdirty, | 127 | void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty); |
| 131 | unsigned long *pbdi_dirty, struct backing_dev_info *bdi); | 128 | unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, |
| 129 | unsigned long dirty); | ||
| 132 | 130 | ||
| 133 | void page_writeback_init(void); | 131 | void page_writeback_init(void); |
| 134 | void balance_dirty_pages_ratelimited_nr(struct address_space *mapping, | 132 | void balance_dirty_pages_ratelimited_nr(struct address_space *mapping, |
