aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/budget.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-08-20 04:56:33 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-09-30 04:12:55 -0400
commit948cfb219bbbc3c8e1b10a671ca88219fa42a052 (patch)
treeffe2196bfeea90616c9dab8061132868a59f94ed /fs/ubifs/budget.c
parent94aca1dac6f6d21f4b07e4864baf7768cabcc6e7 (diff)
UBIFS: add a print, fix comments and more minor stuff
This commit adds a reserved pool size print and tweaks the prints to make them look nicer. It also fixes and cleans-up some comments. Additionally, it deletes some blank lines to make the code look a little nicer. In other words, nothing essential. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/budget.c')
-rw-r--r--fs/ubifs/budget.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c
index 73db464cd08b..1a4973e10664 100644
--- a/fs/ubifs/budget.c
+++ b/fs/ubifs/budget.c
@@ -414,19 +414,21 @@ static int do_budget_space(struct ubifs_info *c)
414 * @c->lst.empty_lebs + @c->freeable_cnt + @c->idx_gc_cnt - 414 * @c->lst.empty_lebs + @c->freeable_cnt + @c->idx_gc_cnt -
415 * @c->lst.taken_empty_lebs 415 * @c->lst.taken_empty_lebs
416 * 416 *
417 * @empty_lebs are available because they are empty. @freeable_cnt are 417 * @c->lst.empty_lebs are available because they are empty.
418 * available because they contain only free and dirty space and the 418 * @c->freeable_cnt are available because they contain only free and
419 * index allocation always occurs after wbufs are synch'ed. 419 * dirty space, @c->idx_gc_cnt are available because they are index
420 * @idx_gc_cnt are available because they are index LEBs that have been 420 * LEBs that have been garbage collected and are awaiting the commit
421 * garbage collected (including trivial GC) and are awaiting the commit 421 * before they can be used. And the in-the-gaps method will grab these
422 * before they can be unmapped - note that the in-the-gaps method will 422 * if it needs them. @c->lst.taken_empty_lebs are empty LEBs that have
423 * grab these if it needs them. @taken_empty_lebs are empty_lebs that 423 * already been allocated for some purpose.
424 * have already been allocated for some purpose (also includes those
425 * LEBs on the @idx_gc list).
426 * 424 *
427 * Note, @taken_empty_lebs may temporarily be higher by one because of 425 * Note, @c->idx_gc_cnt is included to both @c->lst.empty_lebs (because
428 * the way we serialize LEB allocations and budgeting. See a comment in 426 * these LEBs are empty) and to @c->lst.taken_empty_lebs (because they
429 * 'ubifs_find_free_space()'. 427 * are taken until after the commit).
428 *
429 * Note, @c->lst.taken_empty_lebs may temporarily be higher by one
430 * because of the way we serialize LEB allocations and budgeting. See a
431 * comment in 'ubifs_find_free_space()'.
430 */ 432 */
431 lebs = c->lst.empty_lebs + c->freeable_cnt + c->idx_gc_cnt - 433 lebs = c->lst.empty_lebs + c->freeable_cnt + c->idx_gc_cnt -
432 c->lst.taken_empty_lebs; 434 c->lst.taken_empty_lebs;