1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef _LINUX_BACKING_DEV_H
13 #define _LINUX_BACKING_DEV_H
15 #include <asm/atomic.h>
24 typedef int (congested_fn)(void *, int);
26 struct backing_dev_info {
27 unsigned long ra_pages;
29 unsigned int capabilities;
30 congested_fn *congested_fn;
32 void (*unplug_io_fn)(struct backing_dev_info *, struct page *);
36 #define BDI_CAP_NO_ACCT_DIRTY 0x00000001
37 #define BDI_CAP_NO_WRITEBACK 0x00000002
38 #define BDI_CAP_MAP_COPY 0x00000004
39 #define BDI_CAP_MAP_DIRECT 0x00000008
40 #define BDI_CAP_READ_MAP 0x00000010
41 #define BDI_CAP_WRITE_MAP 0x00000020
42 #define BDI_CAP_EXEC_MAP 0x00000040
43 #define BDI_CAP_VMFLAGS (BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP)
45 #if defined(VM_MAYREAD) && BDI_CAP_READ_MAP != (VM_MAYREAD || BDI_CAP_WRITE_MAP != (VM_MAYWRITE || BDI_CAP_EXEC_MAP != VM_MAYEXEC))
46 #error please change backing_dev_info::capabilities flags
49 #define bdi_cap_writeback_dirty(bdi) (!((bdi)->capabilities & BDI_CAP_NO_WRITEBACK))
50 #define bdi_cap_account_dirty(bdi) (!((bdi)->capabilities & BDI_CAP_NO_ACCT_DIRTY))
51 #define mapping_cap_writeback_dirty(mapping) bdi_cap_writeback_dirty((mapping)->backing_dev_info)
52 #define mapping_cap_account_dirty(mapping) bdi_cap_account_dirty((mapping)->backing_dev_info)