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.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
index 35b00746c712..96f4094b706d 100644
--- a/include/linux/backing-dev.h
+++ b/include/linux/backing-dev.h
@@ -66,8 +66,6 @@ struct backing_dev_info {
66 unsigned int capabilities; /* Device capabilities */ 66 unsigned int capabilities; /* Device capabilities */
67 congested_fn *congested_fn; /* Function pointer if device is md/dm */ 67 congested_fn *congested_fn; /* Function pointer if device is md/dm */
68 void *congested_data; /* Pointer to aux data for congested func */ 68 void *congested_data; /* Pointer to aux data for congested func */
69 void (*unplug_io_fn)(struct backing_dev_info *, struct page *);
70 void *unplug_io_data;
71 69
72 char *name; 70 char *name;
73 71
@@ -111,6 +109,7 @@ void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi);
111 109
112extern spinlock_t bdi_lock; 110extern spinlock_t bdi_lock;
113extern struct list_head bdi_list; 111extern struct list_head bdi_list;
112extern struct list_head bdi_pending_list;
114 113
115static inline int wb_has_dirty_io(struct bdi_writeback *wb) 114static inline int wb_has_dirty_io(struct bdi_writeback *wb)
116{ 115{
@@ -250,7 +249,6 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio);
250 249
251extern struct backing_dev_info default_backing_dev_info; 250extern struct backing_dev_info default_backing_dev_info;
252extern struct backing_dev_info noop_backing_dev_info; 251extern struct backing_dev_info noop_backing_dev_info;
253void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page);
254 252
255int writeback_in_progress(struct backing_dev_info *bdi); 253int writeback_in_progress(struct backing_dev_info *bdi);
256 254
@@ -285,7 +283,7 @@ enum {
285void clear_bdi_congested(struct backing_dev_info *bdi, int sync); 283void clear_bdi_congested(struct backing_dev_info *bdi, int sync);
286void set_bdi_congested(struct backing_dev_info *bdi, int sync); 284void set_bdi_congested(struct backing_dev_info *bdi, int sync);
287long congestion_wait(int sync, long timeout); 285long congestion_wait(int sync, long timeout);
288 286long wait_iff_congested(struct zone *zone, int sync, long timeout);
289 287
290static inline bool bdi_cap_writeback_dirty(struct backing_dev_info *bdi) 288static inline bool bdi_cap_writeback_dirty(struct backing_dev_info *bdi)
291{ 289{
@@ -335,17 +333,4 @@ static inline int bdi_sched_wait(void *word)
335 return 0; 333 return 0;
336} 334}
337 335
338static inline void blk_run_backing_dev(struct backing_dev_info *bdi,
339 struct page *page)
340{
341 if (bdi && bdi->unplug_io_fn)
342 bdi->unplug_io_fn(bdi, page);
343}
344
345static inline void blk_run_address_space(struct address_space *mapping)
346{
347 if (mapping)
348 blk_run_backing_dev(mapping->backing_dev_info, NULL);
349}
350
351#endif /* _LINUX_BACKING_DEV_H */ 336#endif /* _LINUX_BACKING_DEV_H */