]> git.sesse.net Git - bcachefs-tools-debian/blob - include/linux/backing-dev.h
add missing include
[bcachefs-tools-debian] / include / linux / backing-dev.h
1 #ifndef _LINUX_BACKING_DEV_H
2 #define _LINUX_BACKING_DEV_H
3
4 typedef int (congested_fn)(void *, int);
5
6 enum wb_congested_state {
7         WB_async_congested,     /* The async (write) queue is getting full */
8         WB_sync_congested,      /* The sync queue is getting full */
9 };
10
11 struct backing_dev_info {
12         struct list_head bdi_list;
13         unsigned        ra_pages;
14         unsigned        capabilities;
15
16         congested_fn    *congested_fn;
17         void            *congested_data;
18 };
19
20 #define BDI_CAP_NO_ACCT_DIRTY   0x00000001
21 #define BDI_CAP_NO_WRITEBACK    0x00000002
22 #define BDI_CAP_NO_ACCT_WB      0x00000004
23 #define BDI_CAP_STABLE_WRITES   0x00000008
24 #define BDI_CAP_STRICTLIMIT     0x00000010
25 #define BDI_CAP_CGROUP_WRITEBACK 0x00000020
26
27 static inline int bdi_congested(struct backing_dev_info *bdi, int cong_bits)
28 {
29         return 0;
30 }
31
32 static inline int __must_check bdi_setup_and_register(struct backing_dev_info *bdi,
33                                                       char *name)
34 {
35         bdi->capabilities = 0;
36         return 0;
37 }
38
39 static inline void bdi_destroy(struct backing_dev_info *bdi) {}
40
41 #define VM_MAX_READAHEAD        128     /* kbytes */
42
43 #endif  /* _LINUX_BACKING_DEV_H */