aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/tnc_commit.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-06-03 01:53:35 -0400
committerArtem Bityutskiy <dedekind1@gmail.com>2011-07-04 03:54:28 -0400
commit8d7819b4af697eec45339cc24db7c3fe45fea0e7 (patch)
tree2a32526fbf5a4cac8a3056352efcd6b69c4785b6 /fs/ubifs/tnc_commit.c
parent2b1844a8c934723134ee1ff313e51d0d281cdef1 (diff)
UBIFS: lessen amount of debugging check types
We have too many different debugging checks - lessen the amount by merging all index-related checks into one. At the same time, move the "force in-the-gap" test to the "index checks" class, because it is too heavy for the "general" class. This patch merges TNC, Old index, and Index size check and calles this just "index checks". Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/tnc_commit.c')
-rw-r--r--fs/ubifs/tnc_commit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ubifs/tnc_commit.c b/fs/ubifs/tnc_commit.c
index 8959c726b024..4c15f07a8bb2 100644
--- a/fs/ubifs/tnc_commit.c
+++ b/fs/ubifs/tnc_commit.c
@@ -22,8 +22,8 @@
22 22
23/* This file implements TNC functions for committing */ 23/* This file implements TNC functions for committing */
24 24
25#include "ubifs.h"
26#include <linux/random.h> 25#include <linux/random.h>
26#include "ubifs.h"
27 27
28/** 28/**
29 * make_idx_node - make an index node for fill-the-gaps method of TNC commit. 29 * make_idx_node - make an index node for fill-the-gaps method of TNC commit.
@@ -382,7 +382,7 @@ static int layout_in_gaps(struct ubifs_info *c, int cnt)
382 c->gap_lebs = NULL; 382 c->gap_lebs = NULL;
383 return err; 383 return err;
384 } 384 }
385 if (!dbg_is_chk_gen(c)) { 385 if (!dbg_is_chk_index(c)) {
386 /* 386 /*
387 * Do not print scary warnings if the debugging 387 * Do not print scary warnings if the debugging
388 * option which forces in-the-gaps is enabled. 388 * option which forces in-the-gaps is enabled.
@@ -690,7 +690,7 @@ static int alloc_idx_lebs(struct ubifs_info *c, int cnt)
690 c->ilebs[c->ileb_cnt++] = lnum; 690 c->ilebs[c->ileb_cnt++] = lnum;
691 dbg_cmt("LEB %d", lnum); 691 dbg_cmt("LEB %d", lnum);
692 } 692 }
693 if (dbg_is_chk_gen(c) && !(random32() & 7)) 693 if (dbg_is_chk_index(c) && !(random32() & 7))
694 return -ENOSPC; 694 return -ENOSPC;
695 return 0; 695 return 0;
696} 696}