diff options
| author | Michal Marek <mmarek@suse.cz> | 2011-03-09 10:15:44 -0500 |
|---|---|---|
| committer | Michal Marek <mmarek@suse.cz> | 2011-03-09 10:15:44 -0500 |
| commit | 2d8ad8719591fa803b0d589ed057fa46f49b7155 (patch) | |
| tree | 4ae051577dad1161c91dafbf4207bb10a9dc91bb /include/linux/writeback.h | |
| parent | 9b4ce7bce5f30712fd926ab4599a803314a07719 (diff) | |
| parent | c56eb8fb6dccb83d9fe62fd4dc00c834de9bc470 (diff) | |
Merge commit 'v2.6.38-rc1' into kbuild/packaging
Diffstat (limited to 'include/linux/writeback.h')
| -rw-r--r-- | include/linux/writeback.h | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 76e8903cd204..0ead399e08b5 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
| @@ -10,8 +10,6 @@ | |||
| 10 | struct backing_dev_info; | 10 | struct backing_dev_info; |
| 11 | 11 | ||
| 12 | extern spinlock_t inode_lock; | 12 | extern spinlock_t inode_lock; |
| 13 | extern struct list_head inode_in_use; | ||
| 14 | extern struct list_head inode_unused; | ||
| 15 | 13 | ||
| 16 | /* | 14 | /* |
| 17 | * fs/fs-writeback.c | 15 | * fs/fs-writeback.c |
| @@ -27,13 +25,12 @@ enum writeback_sync_modes { | |||
| 27 | * in a manner such that unspecified fields are set to zero. | 25 | * in a manner such that unspecified fields are set to zero. |
| 28 | */ | 26 | */ |
| 29 | struct writeback_control { | 27 | 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; | 28 | enum writeback_sync_modes sync_mode; |
| 35 | unsigned long *older_than_this; /* If !NULL, only write back inodes | 29 | unsigned long *older_than_this; /* If !NULL, only write back inodes |
| 36 | older than this */ | 30 | older than this */ |
| 31 | unsigned long wb_start; /* Time writeback_inodes_wb was | ||
| 32 | called. This is needed to avoid | ||
| 33 | extra jobs and livelock */ | ||
| 37 | long nr_to_write; /* Write this many pages, and decrement | 34 | long nr_to_write; /* Write this many pages, and decrement |
| 38 | this for each page written */ | 35 | this for each page written */ |
| 39 | long pages_skipped; /* Pages which were not written */ | 36 | long pages_skipped; /* Pages which were not written */ |
| @@ -53,15 +50,6 @@ struct writeback_control { | |||
| 53 | unsigned for_reclaim:1; /* Invoked from the page allocator */ | 50 | unsigned for_reclaim:1; /* Invoked from the page allocator */ |
| 54 | unsigned range_cyclic:1; /* range_start is cyclic */ | 51 | unsigned range_cyclic:1; /* range_start is cyclic */ |
| 55 | unsigned more_io:1; /* more io to be dispatched */ | 52 | 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 | }; | 53 | }; |
| 66 | 54 | ||
| 67 | /* | 55 | /* |
| @@ -70,9 +58,12 @@ struct writeback_control { | |||
| 70 | struct bdi_writeback; | 58 | struct bdi_writeback; |
| 71 | int inode_wait(void *); | 59 | int inode_wait(void *); |
| 72 | void writeback_inodes_sb(struct super_block *); | 60 | void writeback_inodes_sb(struct super_block *); |
| 61 | void writeback_inodes_sb_nr(struct super_block *, unsigned long nr); | ||
| 73 | int writeback_inodes_sb_if_idle(struct super_block *); | 62 | int writeback_inodes_sb_if_idle(struct super_block *); |
| 63 | int writeback_inodes_sb_nr_if_idle(struct super_block *, unsigned long nr); | ||
| 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, |
| @@ -145,12 +143,16 @@ typedef int (*writepage_t)(struct page *page, struct writeback_control *wbc, | |||
| 145 | 143 | ||
| 146 | int generic_writepages(struct address_space *mapping, | 144 | int generic_writepages(struct address_space *mapping, |
| 147 | struct writeback_control *wbc); | 145 | struct writeback_control *wbc); |
| 146 | void tag_pages_for_writeback(struct address_space *mapping, | ||
| 147 | pgoff_t start, pgoff_t end); | ||
| 148 | int write_cache_pages(struct address_space *mapping, | 148 | int write_cache_pages(struct address_space *mapping, |
| 149 | struct writeback_control *wbc, writepage_t writepage, | 149 | struct writeback_control *wbc, writepage_t writepage, |
| 150 | void *data); | 150 | void *data); |
| 151 | int do_writepages(struct address_space *mapping, struct writeback_control *wbc); | 151 | int do_writepages(struct address_space *mapping, struct writeback_control *wbc); |
| 152 | void set_page_dirty_balance(struct page *page, int page_mkwrite); | 152 | void set_page_dirty_balance(struct page *page, int page_mkwrite); |
| 153 | void writeback_set_ratelimit(void); | 153 | void writeback_set_ratelimit(void); |
| 154 | void tag_pages_for_writeback(struct address_space *mapping, | ||
| 155 | pgoff_t start, pgoff_t end); | ||
| 154 | 156 | ||
| 155 | /* pdflush.c */ | 157 | /* pdflush.c */ |
| 156 | extern int nr_pdflush_threads; /* Global so it can be exported to sysctl | 158 | extern int nr_pdflush_threads; /* Global so it can be exported to sysctl |
