long clean_cnt = 0, dirty_cnt = 0;
int err, last;
- if (!dbg_is_chk_tnc(c))
+ if (!dbg_is_chk_index(c))
return 0;
ubifs_assert(mutex_is_locked(&c->tnc_mutex));
int err;
long long calc = 0;
- if (!dbg_is_chk_idx_sz(c))
+ if (!dbg_is_chk_index(c))
return 0;
err = dbg_walk_index(c, NULL, add_size, &calc);
* Debugging check flags.
*
* UBIFS_CHK_GEN: general checks
- * UBIFS_CHK_TNC: check TNC
- * UBIFS_CHK_IDX_SZ: check index size
+ * UBIFS_CHK_INDEX: check the index
* UBIFS_CHK_ORPH: check orphans
- * UBIFS_CHK_OLD_IDX: check the old index
* UBIFS_CHK_LPROPS: check lprops
* UBIFS_CHK_FS: check the file-system
*/
enum {
UBIFS_CHK_GEN = 0x1,
- UBIFS_CHK_TNC = 0x2,
- UBIFS_CHK_IDX_SZ = 0x4,
+ UBIFS_CHK_INDEX = 0x2,
UBIFS_CHK_ORPH = 0x8,
- UBIFS_CHK_OLD_IDX = 0x10,
UBIFS_CHK_LPROPS = 0x20,
UBIFS_CHK_FS = 0x40,
};
{
return !!(ubifs_chk_flags & UBIFS_CHK_GEN);
}
-static inline int dbg_is_chk_tnc(const struct ubifs_info *c)
+static inline int dbg_is_chk_index(const struct ubifs_info *c)
{
- return !!(ubifs_chk_flags & UBIFS_CHK_TNC);
-}
-static inline int dbg_is_chk_idx_sz(const struct ubifs_info *c)
-{
- return !!(ubifs_chk_flags & UBIFS_CHK_IDX_SZ);
+ return !!(ubifs_chk_flags & UBIFS_CHK_INDEX);
}
static inline int dbg_is_chk_orph(const struct ubifs_info *c)
{
return !!(ubifs_chk_flags & UBIFS_CHK_ORPH);
}
-static inline int dbg_is_chk_old_idx(const struct ubifs_info *c)
-{
- return !!(ubifs_chk_flags & UBIFS_CHK_OLD_IDX);
-}
static inline int dbg_is_chk_lprops(const struct ubifs_info *c)
{
return !!(ubifs_chk_flags & UBIFS_CHK_LPROPS);
struct list_head *head) { return 0; }
static inline int dbg_is_chk_gen(const struct ubifs_info *c) { return 0; }
-static inline int dbg_is_chk_tnc(const struct ubifs_info *c) { return 0; }
-static inline int dbg_is_chk_idx_sz(const struct ubifs_info *c) { return 0; }
+static inline int dbg_is_chk_index(const struct ubifs_info *c) { return 0; }
static inline int dbg_is_chk_orph(const struct ubifs_info *c) { return 0; }
-static inline int dbg_is_chk_old_idx(const struct ubifs_info *c) { return 0; }
static inline int dbg_is_chk_lprops(const struct ubifs_info *c) { return 0; }
static inline int dbg_is_chk_fs(const struct ubifs_info *c) { return 0; }
static inline int dbg_is_tst_rcvry(const struct ubifs_info *c) { return 0; }
/* This file implements TNC functions for committing */
-#include "ubifs.h"
#include <linux/random.h>
+#include "ubifs.h"
/**
* make_idx_node - make an index node for fill-the-gaps method of TNC commit.
c->gap_lebs = NULL;
return err;
}
- if (!dbg_is_chk_gen(c)) {
+ if (!dbg_is_chk_index(c)) {
/*
* Do not print scary warnings if the debugging
* option which forces in-the-gaps is enabled.
c->ilebs[c->ileb_cnt++] = lnum;
dbg_cmt("LEB %d", lnum);
}
- if (dbg_is_chk_gen(c) && !(random32() & 7))
+ if (dbg_is_chk_index(c) && !(random32() & 7))
return -ENOSPC;
return 0;
}