28 * fs/fs-writeback.c |
28 * fs/fs-writeback.c |
29 */ |
29 */ |
30 enum writeback_sync_modes { |
30 enum writeback_sync_modes { |
31 WB_SYNC_NONE, /* Don't wait on anything */ |
31 WB_SYNC_NONE, /* Don't wait on anything */ |
32 WB_SYNC_ALL, /* Wait on every mapping */ |
32 WB_SYNC_ALL, /* Wait on every mapping */ |
33 WB_SYNC_HOLD, /* Hold the inode on sb_dirty for sys_sync() */ |
|
34 }; |
33 }; |
35 |
34 |
36 /* |
35 /* |
37 * A control structure which tells the writeback code what to do. These are |
36 * A control structure which tells the writeback code what to do. These are |
38 * always on the stack, and hence need no locking. They are always initialised |
37 * always on the stack, and hence need no locking. They are always initialised |
105 void laptop_sync_completion(void); |
104 void laptop_sync_completion(void); |
106 void throttle_vm_writeout(gfp_t gfp_mask); |
105 void throttle_vm_writeout(gfp_t gfp_mask); |
107 |
106 |
108 /* These are exported to sysctl. */ |
107 /* These are exported to sysctl. */ |
109 extern int dirty_background_ratio; |
108 extern int dirty_background_ratio; |
|
109 extern unsigned long dirty_background_bytes; |
110 extern int vm_dirty_ratio; |
110 extern int vm_dirty_ratio; |
|
111 extern unsigned long vm_dirty_bytes; |
111 extern int dirty_writeback_interval; |
112 extern int dirty_writeback_interval; |
112 extern int dirty_expire_interval; |
113 extern int dirty_expire_interval; |
113 extern int vm_highmem_is_dirtyable; |
114 extern int vm_highmem_is_dirtyable; |
114 extern int block_dump; |
115 extern int block_dump; |
115 extern int laptop_mode; |
116 extern int laptop_mode; |
116 |
117 |
117 extern unsigned long determine_dirtyable_memory(void); |
118 extern unsigned long determine_dirtyable_memory(void); |
118 |
119 |
|
120 extern int dirty_background_ratio_handler(struct ctl_table *table, int write, |
|
121 struct file *filp, void __user *buffer, size_t *lenp, |
|
122 loff_t *ppos); |
|
123 extern int dirty_background_bytes_handler(struct ctl_table *table, int write, |
|
124 struct file *filp, void __user *buffer, size_t *lenp, |
|
125 loff_t *ppos); |
119 extern int dirty_ratio_handler(struct ctl_table *table, int write, |
126 extern int dirty_ratio_handler(struct ctl_table *table, int write, |
|
127 struct file *filp, void __user *buffer, size_t *lenp, |
|
128 loff_t *ppos); |
|
129 extern int dirty_bytes_handler(struct ctl_table *table, int write, |
120 struct file *filp, void __user *buffer, size_t *lenp, |
130 struct file *filp, void __user *buffer, size_t *lenp, |
121 loff_t *ppos); |
131 loff_t *ppos); |
122 |
132 |
123 struct ctl_table; |
133 struct ctl_table; |
124 struct file; |
134 struct file; |
125 int dirty_writeback_centisecs_handler(struct ctl_table *, int, struct file *, |
135 int dirty_writeback_centisecs_handler(struct ctl_table *, int, struct file *, |
126 void __user *, size_t *, loff_t *); |
136 void __user *, size_t *, loff_t *); |
127 |
137 |
128 void get_dirty_limits(long *pbackground, long *pdirty, long *pbdi_dirty, |
138 void get_dirty_limits(unsigned long *pbackground, unsigned long *pdirty, |
129 struct backing_dev_info *bdi); |
139 unsigned long *pbdi_dirty, struct backing_dev_info *bdi); |
130 |
140 |
131 void page_writeback_init(void); |
141 void page_writeback_init(void); |
132 void balance_dirty_pages_ratelimited_nr(struct address_space *mapping, |
142 void balance_dirty_pages_ratelimited_nr(struct address_space *mapping, |
133 unsigned long nr_pages_dirtied); |
143 unsigned long nr_pages_dirtied); |
134 |
144 |