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.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
index e9aec0d099df..35b00746c712 100644
--- a/include/linux/backing-dev.h
+++ b/include/linux/backing-dev.h
@@ -31,6 +31,7 @@ enum bdi_state {
31 BDI_async_congested, /* The async (write) queue is getting full */ 31 BDI_async_congested, /* The async (write) queue is getting full */
32 BDI_sync_congested, /* The sync queue is getting full */ 32 BDI_sync_congested, /* The sync queue is getting full */
33 BDI_registered, /* bdi_register() was done */ 33 BDI_registered, /* bdi_register() was done */
34 BDI_writeback_running, /* Writeback is in progress */
34 BDI_unused, /* Available bits start here */ 35 BDI_unused, /* Available bits start here */
35}; 36};
36 37
@@ -45,22 +46,21 @@ enum bdi_stat_item {
45#define BDI_STAT_BATCH (8*(1+ilog2(nr_cpu_ids))) 46#define BDI_STAT_BATCH (8*(1+ilog2(nr_cpu_ids)))
46 47
47struct bdi_writeback { 48struct bdi_writeback {
48 struct list_head list; /* hangs off the bdi */ 49 struct backing_dev_info *bdi; /* our parent bdi */
49
50 struct backing_dev_info *bdi; /* our parent bdi */
51 unsigned int nr; 50 unsigned int nr;
52 51
53 unsigned long last_old_flush; /* last old data flush */ 52 unsigned long last_old_flush; /* last old data flush */
53 unsigned long last_active; /* last time bdi thread was active */
54 54
55 struct task_struct *task; /* writeback task */ 55 struct task_struct *task; /* writeback thread */
56 struct list_head b_dirty; /* dirty inodes */ 56 struct timer_list wakeup_timer; /* used for delayed bdi thread wakeup */
57 struct list_head b_io; /* parked for writeback */ 57 struct list_head b_dirty; /* dirty inodes */
58 struct list_head b_more_io; /* parked for more writeback */ 58 struct list_head b_io; /* parked for writeback */
59 struct list_head b_more_io; /* parked for more writeback */
59}; 60};
60 61
61struct backing_dev_info { 62struct backing_dev_info {
62 struct list_head bdi_list; 63 struct list_head bdi_list;
63 struct rcu_head rcu_head;
64 unsigned long ra_pages; /* max readahead in PAGE_CACHE_SIZE units */ 64 unsigned long ra_pages; /* max readahead in PAGE_CACHE_SIZE units */
65 unsigned long state; /* Always use atomic bitops on this */ 65 unsigned long state; /* Always use atomic bitops on this */
66 unsigned int capabilities; /* Device capabilities */ 66 unsigned int capabilities; /* Device capabilities */
@@ -80,8 +80,7 @@ struct backing_dev_info {
80 unsigned int max_ratio, max_prop_frac; 80 unsigned int max_ratio, max_prop_frac;
81 81
82 struct bdi_writeback wb; /* default writeback info for this bdi */ 82 struct bdi_writeback wb; /* default writeback info for this bdi */
83 spinlock_t wb_lock; /* protects update side of wb_list */ 83 spinlock_t wb_lock; /* protects work_list */
84 struct list_head wb_list; /* the flusher threads hanging off this bdi */
85 84
86 struct list_head work_list; 85 struct list_head work_list;
87 86
@@ -105,9 +104,10 @@ void bdi_unregister(struct backing_dev_info *bdi);
105int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int); 104int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int);
106void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages); 105void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages);
107void bdi_start_background_writeback(struct backing_dev_info *bdi); 106void bdi_start_background_writeback(struct backing_dev_info *bdi);
108int bdi_writeback_task(struct bdi_writeback *wb); 107int bdi_writeback_thread(void *data);
109int bdi_has_dirty_io(struct backing_dev_info *bdi); 108int bdi_has_dirty_io(struct backing_dev_info *bdi);
110void bdi_arm_supers_timer(void); 109void bdi_arm_supers_timer(void);
110void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi);
111 111
112extern spinlock_t bdi_lock; 112extern spinlock_t bdi_lock;
113extern struct list_head bdi_list; 113extern struct list_head bdi_list;