aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/journal.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-03-29 11:36:21 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-05-13 12:23:54 -0400
commitf1bd66afb14c25095cf6ff499c1388db423acc9e (patch)
tree9199aab4896fc9ed89213a407942bf4e49232fe0 /fs/ubifs/journal.c
parent8c3067e445fb25119761356c88abc39dacfb9524 (diff)
UBIFS: improve space checking debugging feature
This patch improves the 'dbg_check_space_info()' function which checks whether the amount of space before re-mounting and after re-mounting is the same (remounting from R/O to R/W modes and vice-versa). The problem is that 'dbg_check_space_info()' does not save the budgeting information before re-mounting, so when an error is reported, we do not know why the amount of free space changed. This patches makes the following changes: 1. Teaches 'dbg_dump_budg()' function to accept a 'struct ubifs_budg_info' argument and print out the this argument. This way we may ask it to print any saved budgeting info, no only the current one. 2. Accordingly changes all the callers of 'dbg_dump_budg()' to comply with the changed interface. 3. Introduce a 'saved_bi' (saved budgeting info) field to 'struct ubifs_debug_info' and save the budgeting info before re-mounting there. 4. Change 'dbg_check_space_info()' and make it print both old and new budgeting information. 5. Additionally, save 'c->igx_gc_cnt' and print it if and error happens. This value contributes to the amount of free space, so we have to print it. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/journal.c')
-rw-r--r--fs/ubifs/journal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c
index 65d485fc1eeb..ce55a4807cdc 100644
--- a/fs/ubifs/journal.c
+++ b/fs/ubifs/journal.c
@@ -381,7 +381,7 @@ out:
381 /* This are some budgeting problems, print useful information */ 381 /* This are some budgeting problems, print useful information */
382 down_write(&c->commit_sem); 382 down_write(&c->commit_sem);
383 dbg_dump_stack(); 383 dbg_dump_stack();
384 dbg_dump_budg(c); 384 dbg_dump_budg(c, &c->bi);
385 dbg_dump_lprops(c); 385 dbg_dump_lprops(c);
386 cmt_retries = dbg_check_lprops(c); 386 cmt_retries = dbg_check_lprops(c);
387 up_write(&c->commit_sem); 387 up_write(&c->commit_sem);