diff options
Diffstat (limited to 'include/linux/backing-dev.h')
| -rw-r--r-- | include/linux/backing-dev.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 350459910fe1..c3881553f7d1 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/writeback.h> | 18 | #include <linux/writeback.h> |
| 19 | #include <linux/atomic.h> | 19 | #include <linux/atomic.h> |
| 20 | #include <linux/sysctl.h> | 20 | #include <linux/sysctl.h> |
| 21 | #include <linux/workqueue.h> | ||
| 21 | 22 | ||
| 22 | struct page; | 23 | struct page; |
| 23 | struct device; | 24 | struct device; |
| @@ -27,7 +28,6 @@ struct dentry; | |||
| 27 | * Bits in backing_dev_info.state | 28 | * Bits in backing_dev_info.state |
| 28 | */ | 29 | */ |
| 29 | enum bdi_state { | 30 | enum bdi_state { |
| 30 | BDI_pending, /* On its way to being activated */ | ||
| 31 | BDI_wb_alloc, /* Default embedded wb allocated */ | 31 | BDI_wb_alloc, /* Default embedded wb allocated */ |
| 32 | BDI_async_congested, /* The async (write) queue is getting full */ | 32 | BDI_async_congested, /* The async (write) queue is getting full */ |
| 33 | BDI_sync_congested, /* The sync queue is getting full */ | 33 | BDI_sync_congested, /* The sync queue is getting full */ |
| @@ -53,10 +53,8 @@ struct bdi_writeback { | |||
| 53 | unsigned int nr; | 53 | unsigned int nr; |
| 54 | 54 | ||
| 55 | unsigned long last_old_flush; /* last old data flush */ | 55 | unsigned long last_old_flush; /* last old data flush */ |
| 56 | unsigned long last_active; /* last time bdi thread was active */ | ||
| 57 | 56 | ||
| 58 | struct task_struct *task; /* writeback thread */ | 57 | struct delayed_work dwork; /* work item used for writeback */ |
| 59 | struct timer_list wakeup_timer; /* used for delayed bdi thread wakeup */ | ||
| 60 | struct list_head b_dirty; /* dirty inodes */ | 58 | struct list_head b_dirty; /* dirty inodes */ |
| 61 | struct list_head b_io; /* parked for writeback */ | 59 | struct list_head b_io; /* parked for writeback */ |
| 62 | struct list_head b_more_io; /* parked for more writeback */ | 60 | struct list_head b_more_io; /* parked for more writeback */ |
| @@ -123,14 +121,15 @@ int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int); | |||
| 123 | void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages, | 121 | void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages, |
| 124 | enum wb_reason reason); | 122 | enum wb_reason reason); |
| 125 | void bdi_start_background_writeback(struct backing_dev_info *bdi); | 123 | void bdi_start_background_writeback(struct backing_dev_info *bdi); |
| 126 | int bdi_writeback_thread(void *data); | 124 | void bdi_writeback_workfn(struct work_struct *work); |
| 127 | int bdi_has_dirty_io(struct backing_dev_info *bdi); | 125 | int bdi_has_dirty_io(struct backing_dev_info *bdi); |
| 128 | void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); | 126 | void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); |
| 129 | void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2); | 127 | void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2); |
| 130 | 128 | ||
| 131 | extern spinlock_t bdi_lock; | 129 | extern spinlock_t bdi_lock; |
| 132 | extern struct list_head bdi_list; | 130 | extern struct list_head bdi_list; |
| 133 | extern struct list_head bdi_pending_list; | 131 | |
| 132 | extern struct workqueue_struct *bdi_wq; | ||
| 134 | 133 | ||
| 135 | static inline int wb_has_dirty_io(struct bdi_writeback *wb) | 134 | static inline int wb_has_dirty_io(struct bdi_writeback *wb) |
| 136 | { | 135 | { |
| @@ -336,11 +335,6 @@ static inline bool bdi_cap_swap_backed(struct backing_dev_info *bdi) | |||
| 336 | return bdi->capabilities & BDI_CAP_SWAP_BACKED; | 335 | return bdi->capabilities & BDI_CAP_SWAP_BACKED; |
| 337 | } | 336 | } |
| 338 | 337 | ||
| 339 | static inline bool bdi_cap_flush_forker(struct backing_dev_info *bdi) | ||
| 340 | { | ||
| 341 | return bdi == &default_backing_dev_info; | ||
| 342 | } | ||
| 343 | |||
| 344 | static inline bool mapping_cap_writeback_dirty(struct address_space *mapping) | 338 | static inline bool mapping_cap_writeback_dirty(struct address_space *mapping) |
| 345 | { | 339 | { |
| 346 | return bdi_cap_writeback_dirty(mapping->backing_dev_info); | 340 | return bdi_cap_writeback_dirty(mapping->backing_dev_info); |
