diff options
Diffstat (limited to 'include/linux/backing-dev.h')
| -rw-r--r-- | include/linux/backing-dev.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 96f4094b706d..3b2f9cb82986 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
| 17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
| 18 | #include <linux/writeback.h> | 18 | #include <linux/writeback.h> |
| 19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
| 20 | 20 | ||
| 21 | struct page; | 21 | struct page; |
| 22 | struct device; | 22 | struct device; |
| @@ -40,6 +40,7 @@ typedef int (congested_fn)(void *, int); | |||
| 40 | enum bdi_stat_item { | 40 | enum bdi_stat_item { |
| 41 | BDI_RECLAIMABLE, | 41 | BDI_RECLAIMABLE, |
| 42 | BDI_WRITEBACK, | 42 | BDI_WRITEBACK, |
| 43 | BDI_WRITTEN, | ||
| 43 | NR_BDI_STAT_ITEMS | 44 | NR_BDI_STAT_ITEMS |
| 44 | }; | 45 | }; |
| 45 | 46 | ||
| @@ -57,6 +58,7 @@ struct bdi_writeback { | |||
| 57 | struct list_head b_dirty; /* dirty inodes */ | 58 | struct list_head b_dirty; /* dirty inodes */ |
| 58 | struct list_head b_io; /* parked for writeback */ | 59 | struct list_head b_io; /* parked for writeback */ |
| 59 | struct list_head b_more_io; /* parked for more writeback */ | 60 | struct list_head b_more_io; /* parked for more writeback */ |
| 61 | spinlock_t list_lock; /* protects the b_* lists */ | ||
| 60 | }; | 62 | }; |
| 61 | 63 | ||
| 62 | struct backing_dev_info { | 64 | struct backing_dev_info { |
| @@ -71,6 +73,11 @@ struct backing_dev_info { | |||
| 71 | 73 | ||
| 72 | struct percpu_counter bdi_stat[NR_BDI_STAT_ITEMS]; | 74 | struct percpu_counter bdi_stat[NR_BDI_STAT_ITEMS]; |
| 73 | 75 | ||
| 76 | unsigned long bw_time_stamp; /* last time write bw is updated */ | ||
| 77 | unsigned long written_stamp; /* pages written at bw_time_stamp */ | ||
| 78 | unsigned long write_bandwidth; /* the estimated write bandwidth */ | ||
| 79 | unsigned long avg_write_bandwidth; /* further smoothed write bw */ | ||
| 80 | |||
| 74 | struct prop_local_percpu completions; | 81 | struct prop_local_percpu completions; |
| 75 | int dirty_exceeded; | 82 | int dirty_exceeded; |
| 76 | 83 | ||
| @@ -106,6 +113,7 @@ int bdi_writeback_thread(void *data); | |||
| 106 | int bdi_has_dirty_io(struct backing_dev_info *bdi); | 113 | int bdi_has_dirty_io(struct backing_dev_info *bdi); |
| 107 | void bdi_arm_supers_timer(void); | 114 | void bdi_arm_supers_timer(void); |
| 108 | void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); | 115 | void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); |
| 116 | void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2); | ||
| 109 | 117 | ||
| 110 | extern spinlock_t bdi_lock; | 118 | extern spinlock_t bdi_lock; |
| 111 | extern struct list_head bdi_list; | 119 | extern struct list_head bdi_list; |
