8 #ifndef _LINUX_BACKING_DEV_H
9 #define _LINUX_BACKING_DEV_H
14 #include <linux/kernel.h>
16 #include <linux/sched.h>
20 #include <linux/sysctl.h>
49 #define BDI_STAT_BATCH (8*(1+ilog2(nr_cpu_ids)))
108 #ifdef CONFIG_DEBUG_FS
110 struct dentry *debug_stats;
118 const char *
fmt, ...);
136 return !list_empty(&wb->
b_dirty) ||
137 !list_empty(&wb->
b_io) ||
150 __add_bdi_stat(bdi, item, 1);
159 __inc_bdi_stat(bdi, item);
166 __add_bdi_stat(bdi, item, -1);
175 __dec_bdi_stat(bdi, item);
182 return percpu_counter_read_positive(&bdi->
bdi_stat[item]);
188 return percpu_counter_sum_positive(&bdi->
bdi_stat[item]);
198 sum = __bdi_stat_sum(bdi, item);
247 #define BDI_CAP_NO_ACCT_DIRTY 0x00000001
248 #define BDI_CAP_NO_WRITEBACK 0x00000002
249 #define BDI_CAP_MAP_COPY 0x00000004
250 #define BDI_CAP_MAP_DIRECT 0x00000008
251 #define BDI_CAP_READ_MAP 0x00000010
252 #define BDI_CAP_WRITE_MAP 0x00000020
253 #define BDI_CAP_EXEC_MAP 0x00000040
254 #define BDI_CAP_NO_ACCT_WB 0x00000080
255 #define BDI_CAP_SWAP_BACKED 0x00000100
257 #define BDI_CAP_VMFLAGS \
258 (BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP)
260 #define BDI_CAP_NO_ACCT_AND_WRITEBACK \
261 (BDI_CAP_NO_WRITEBACK | BDI_CAP_NO_ACCT_DIRTY | BDI_CAP_NO_ACCT_WB)
263 #if defined(VM_MAYREAD) && \
264 (BDI_CAP_READ_MAP != VM_MAYREAD || \
265 BDI_CAP_WRITE_MAP != VM_MAYWRITE || \
266 BDI_CAP_EXEC_MAP != VM_MAYEXEC)
267 #error please change backing_dev_info::capabilities flags
279 return (bdi->
state & bdi_bits);
308 void __user *
buffer,
size_t *lenp, loff_t *ppos);
352 static inline int bdi_sched_wait(
void *
word)