aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/debug.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-03-29 11:04:05 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-05-13 12:23:53 -0400
commitb137545c44fc0c80fb778abb0c582bda5601e8f8 (patch)
treefb3da759a3c64587bee8bacf408cf774adb8b09a /fs/ubifs/debug.c
parentcc64f774b4acd4954abe54f5919f50d78aba1e5f (diff)
UBIFS: introduce a separate structure for budgeting info
This patch separates out all the budgeting-related information from 'struct ubifs_info' to 'struct ubifs_budg_info'. This way the code looks a bit cleaner. However, the main driver for this is that we want to save budgeting information and print it later, so a separate data structure for this is helpful. This patch is a preparation for the further debugging output improvements. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/debug.c')
-rw-r--r--fs/ubifs/debug.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index fa65b2931034..c58867cbd019 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -614,14 +614,14 @@ void dbg_dump_budg(struct ubifs_info *c)
614 spin_lock(&dbg_lock); 614 spin_lock(&dbg_lock);
615 printk(KERN_DEBUG "(pid %d) Budgeting info: budg_data_growth %lld, " 615 printk(KERN_DEBUG "(pid %d) Budgeting info: budg_data_growth %lld, "
616 "budg_dd_growth %lld, budg_idx_growth %lld\n", current->pid, 616 "budg_dd_growth %lld, budg_idx_growth %lld\n", current->pid,
617 c->budg_data_growth, c->budg_dd_growth, c->budg_idx_growth); 617 c->bi.data_growth, c->bi.dd_growth, c->bi.idx_growth);
618 printk(KERN_DEBUG "\tdata budget sum %lld, total budget sum %lld, " 618 printk(KERN_DEBUG "\tdata budget sum %lld, total budget sum %lld, "
619 "freeable_cnt %d\n", c->budg_data_growth + c->budg_dd_growth, 619 "freeable_cnt %d\n", c->bi.data_growth + c->bi.dd_growth,
620 c->budg_data_growth + c->budg_dd_growth + c->budg_idx_growth, 620 c->bi.data_growth + c->bi.dd_growth + c->bi.idx_growth,
621 c->freeable_cnt); 621 c->freeable_cnt);
622 printk(KERN_DEBUG "\tmin_idx_lebs %d, old_idx_sz %lld, " 622 printk(KERN_DEBUG "\tmin_idx_lebs %d, old_idx_sz %lld, "
623 "calc_idx_sz %lld, idx_gc_cnt %d\n", c->min_idx_lebs, 623 "calc_idx_sz %lld, idx_gc_cnt %d\n", c->bi.min_idx_lebs,
624 c->old_idx_sz, c->calc_idx_sz, c->idx_gc_cnt); 624 c->bi.old_idx_sz, c->calc_idx_sz, c->idx_gc_cnt);
625 printk(KERN_DEBUG "\tdirty_pg_cnt %ld, dirty_zn_cnt %ld, " 625 printk(KERN_DEBUG "\tdirty_pg_cnt %ld, dirty_zn_cnt %ld, "
626 "clean_zn_cnt %ld\n", atomic_long_read(&c->dirty_pg_cnt), 626 "clean_zn_cnt %ld\n", atomic_long_read(&c->dirty_pg_cnt),
627 atomic_long_read(&c->dirty_zn_cnt), 627 atomic_long_read(&c->dirty_zn_cnt),
@@ -648,8 +648,8 @@ void dbg_dump_budg(struct ubifs_info *c)
648 printk(KERN_DEBUG "\tcommit state %d\n", c->cmt_state); 648 printk(KERN_DEBUG "\tcommit state %d\n", c->cmt_state);
649 649
650 /* Print budgeting predictions */ 650 /* Print budgeting predictions */
651 available = ubifs_calc_available(c, c->min_idx_lebs); 651 available = ubifs_calc_available(c, c->bi.min_idx_lebs);
652 outstanding = c->budg_data_growth + c->budg_dd_growth; 652 outstanding = c->bi.data_growth + c->bi.dd_growth;
653 free = ubifs_get_free_space_nolock(c); 653 free = ubifs_get_free_space_nolock(c);
654 printk(KERN_DEBUG "Budgeting predictions:\n"); 654 printk(KERN_DEBUG "Budgeting predictions:\n");
655 printk(KERN_DEBUG "\tavailable: %lld, outstanding %lld, free %lld\n", 655 printk(KERN_DEBUG "\tavailable: %lld, outstanding %lld, free %lld\n",