aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/backing-dev.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 7690ec77c722..6dc4580df2af 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -49,10 +49,10 @@ static int bdi_debug_stats_show(struct seq_file *m, void *v)
49 unsigned long background_thresh; 49 unsigned long background_thresh;
50 unsigned long dirty_thresh; 50 unsigned long dirty_thresh;
51 unsigned long bdi_thresh; 51 unsigned long bdi_thresh;
52 unsigned long nr_dirty, nr_io, nr_more_io; 52 unsigned long nr_dirty, nr_io, nr_more_io, nr_dirty_time;
53 struct inode *inode; 53 struct inode *inode;
54 54
55 nr_dirty = nr_io = nr_more_io = 0; 55 nr_dirty = nr_io = nr_more_io = nr_dirty_time = 0;
56 spin_lock(&wb->list_lock); 56 spin_lock(&wb->list_lock);
57 list_for_each_entry(inode, &wb->b_dirty, i_wb_list) 57 list_for_each_entry(inode, &wb->b_dirty, i_wb_list)
58 nr_dirty++; 58 nr_dirty++;
@@ -60,6 +60,9 @@ static int bdi_debug_stats_show(struct seq_file *m, void *v)
60 nr_io++; 60 nr_io++;
61 list_for_each_entry(inode, &wb->b_more_io, i_wb_list) 61 list_for_each_entry(inode, &wb->b_more_io, i_wb_list)
62 nr_more_io++; 62 nr_more_io++;
63 list_for_each_entry(inode, &wb->b_dirty_time, i_wb_list)
64 if (inode->i_state & I_DIRTY_TIME)
65 nr_dirty_time++;
63 spin_unlock(&wb->list_lock); 66 spin_unlock(&wb->list_lock);
64 67
65 global_dirty_limits(&background_thresh, &dirty_thresh); 68 global_dirty_limits(&background_thresh, &dirty_thresh);
@@ -78,6 +81,7 @@ static int bdi_debug_stats_show(struct seq_file *m, void *v)
78 "b_dirty: %10lu\n" 81 "b_dirty: %10lu\n"
79 "b_io: %10lu\n" 82 "b_io: %10lu\n"
80 "b_more_io: %10lu\n" 83 "b_more_io: %10lu\n"
84 "b_dirty_time: %10lu\n"
81 "bdi_list: %10u\n" 85 "bdi_list: %10u\n"
82 "state: %10lx\n", 86 "state: %10lx\n",
83 (unsigned long) K(bdi_stat(bdi, BDI_WRITEBACK)), 87 (unsigned long) K(bdi_stat(bdi, BDI_WRITEBACK)),
@@ -91,6 +95,7 @@ static int bdi_debug_stats_show(struct seq_file *m, void *v)
91 nr_dirty, 95 nr_dirty,
92 nr_io, 96 nr_io,
93 nr_more_io, 97 nr_more_io,
98 nr_dirty_time,
94 !list_empty(&bdi->bdi_list), bdi->state); 99 !list_empty(&bdi->bdi_list), bdi->state);
95#undef K 100#undef K
96 101
@@ -380,6 +385,7 @@ static void bdi_wb_init(struct bdi_writeback *wb, struct backing_dev_info *bdi)
380 INIT_LIST_HEAD(&wb->b_dirty); 385 INIT_LIST_HEAD(&wb->b_dirty);
381 INIT_LIST_HEAD(&wb->b_io); 386 INIT_LIST_HEAD(&wb->b_io);
382 INIT_LIST_HEAD(&wb->b_more_io); 387 INIT_LIST_HEAD(&wb->b_more_io);
388 INIT_LIST_HEAD(&wb->b_dirty_time);
383 spin_lock_init(&wb->list_lock); 389 spin_lock_init(&wb->list_lock);
384 INIT_DELAYED_WORK(&wb->dwork, bdi_writeback_workfn); 390 INIT_DELAYED_WORK(&wb->dwork, bdi_writeback_workfn);
385} 391}