diff options
Diffstat (limited to 'include/linux/backing-dev.h')
| -rw-r--r-- | include/linux/backing-dev.h | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index aee5f6ce166e..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 | ||
| 47 | struct bdi_writeback { | 48 | struct 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 | ||
| 61 | struct backing_dev_info { | 62 | struct 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,10 +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 | unsigned long wb_mask; /* bitmask of registered tasks */ | ||
| 86 | unsigned int wb_cnt; /* number of registered tasks */ | ||
| 87 | 84 | ||
| 88 | struct list_head work_list; | 85 | struct list_head work_list; |
| 89 | 86 | ||
| @@ -105,11 +102,12 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent, | |||
| 105 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); | 102 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); |
| 106 | void bdi_unregister(struct backing_dev_info *bdi); | 103 | void bdi_unregister(struct backing_dev_info *bdi); |
| 107 | int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int); | 104 | int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int); |
| 108 | void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb, | 105 | void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages); |
| 109 | long nr_pages); | 106 | void bdi_start_background_writeback(struct backing_dev_info *bdi); |
| 110 | int bdi_writeback_task(struct bdi_writeback *wb); | 107 | int bdi_writeback_thread(void *data); |
| 111 | int bdi_has_dirty_io(struct backing_dev_info *bdi); | 108 | int bdi_has_dirty_io(struct backing_dev_info *bdi); |
| 112 | void bdi_arm_supers_timer(void); | 109 | void bdi_arm_supers_timer(void); |
| 110 | void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); | ||
| 113 | 111 | ||
| 114 | extern spinlock_t bdi_lock; | 112 | extern spinlock_t bdi_lock; |
| 115 | extern struct list_head bdi_list; | 113 | extern struct list_head bdi_list; |
