aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/backing-dev.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/backing-dev.h')
-rw-r--r--include/linux/backing-dev.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
index f41ca8486e02..e54e7e0033eb 100644
--- a/include/linux/backing-dev.h
+++ b/include/linux/backing-dev.h
@@ -93,7 +93,7 @@ extern void wb_writeout_inc(struct bdi_writeback *wb);
93/* 93/*
94 * maximal error of a stat counter. 94 * maximal error of a stat counter.
95 */ 95 */
96static inline unsigned long wb_stat_error(struct bdi_writeback *wb) 96static inline unsigned long wb_stat_error(void)
97{ 97{
98#ifdef CONFIG_SMP 98#ifdef CONFIG_SMP
99 return nr_cpu_ids * WB_STAT_BATCH; 99 return nr_cpu_ids * WB_STAT_BATCH;
@@ -122,6 +122,8 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio);
122 * BDI_CAP_STRICTLIMIT: Keep number of dirty pages below bdi threshold. 122 * BDI_CAP_STRICTLIMIT: Keep number of dirty pages below bdi threshold.
123 * 123 *
124 * BDI_CAP_CGROUP_WRITEBACK: Supports cgroup-aware writeback. 124 * BDI_CAP_CGROUP_WRITEBACK: Supports cgroup-aware writeback.
125 * BDI_CAP_SYNCHRONOUS_IO: Device is so fast that asynchronous IO would be
126 * inefficient.
125 */ 127 */
126#define BDI_CAP_NO_ACCT_DIRTY 0x00000001 128#define BDI_CAP_NO_ACCT_DIRTY 0x00000001
127#define BDI_CAP_NO_WRITEBACK 0x00000002 129#define BDI_CAP_NO_WRITEBACK 0x00000002
@@ -129,6 +131,7 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio);
129#define BDI_CAP_STABLE_WRITES 0x00000008 131#define BDI_CAP_STABLE_WRITES 0x00000008
130#define BDI_CAP_STRICTLIMIT 0x00000010 132#define BDI_CAP_STRICTLIMIT 0x00000010
131#define BDI_CAP_CGROUP_WRITEBACK 0x00000020 133#define BDI_CAP_CGROUP_WRITEBACK 0x00000020
134#define BDI_CAP_SYNCHRONOUS_IO 0x00000040
132 135
133#define BDI_CAP_NO_ACCT_AND_WRITEBACK \ 136#define BDI_CAP_NO_ACCT_AND_WRITEBACK \
134 (BDI_CAP_NO_WRITEBACK | BDI_CAP_NO_ACCT_DIRTY | BDI_CAP_NO_ACCT_WB) 137 (BDI_CAP_NO_WRITEBACK | BDI_CAP_NO_ACCT_DIRTY | BDI_CAP_NO_ACCT_WB)
@@ -174,6 +177,11 @@ static inline int wb_congested(struct bdi_writeback *wb, int cong_bits)
174long congestion_wait(int sync, long timeout); 177long congestion_wait(int sync, long timeout);
175long wait_iff_congested(struct pglist_data *pgdat, int sync, long timeout); 178long wait_iff_congested(struct pglist_data *pgdat, int sync, long timeout);
176 179
180static inline bool bdi_cap_synchronous_io(struct backing_dev_info *bdi)
181{
182 return bdi->capabilities & BDI_CAP_SYNCHRONOUS_IO;
183}
184
177static inline bool bdi_cap_stable_pages_required(struct backing_dev_info *bdi) 185static inline bool bdi_cap_stable_pages_required(struct backing_dev_info *bdi)
178{ 186{
179 return bdi->capabilities & BDI_CAP_STABLE_WRITES; 187 return bdi->capabilities & BDI_CAP_STABLE_WRITES;