Patchwork [1/5] UBIFS: define journal head numbers in ubifs-media.h

login
register
mail settings
Submitter Artem Bityutskiy
Date Sept. 17, 2009, 12:19 p.m.
Message ID <1253189996-14191-2-git-send-email-dedekind@infradead.org>
Download mbox | patch
Permalink /patch/33776/
State Accepted
Commit d6d140097beb554daa967d3fb576e94ad2f82dcd
Headers show

Comments

Artem Bityutskiy - Sept. 17, 2009, 12:19 p.m.
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

The journal head names and numbers are part of the UBIFS format, so
they should be in the ubifs-media.h.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
 fs/ubifs/ubifs-media.h |    7 +++++++
 fs/ubifs/ubifs.h       |   10 ++++------
 2 files changed, 11 insertions(+), 6 deletions(-)

Patch

diff --git a/fs/ubifs/ubifs-media.h b/fs/ubifs/ubifs-media.h
index 3eee07e..191ca78 100644
--- a/fs/ubifs/ubifs-media.h
+++ b/fs/ubifs/ubifs-media.h
@@ -135,6 +135,13 @@ 
 /* The key is always at the same position in all keyed nodes */
 #define UBIFS_KEY_OFFSET offsetof(struct ubifs_ino_node, key)
 
+/* Garbage collector journal head number */
+#define UBIFS_GC_HEAD   0
+/* Base journal head number */
+#define UBIFS_BASE_HEAD 1
+/* Data journal head number */
+#define UBIFS_DATA_HEAD 2
+
 /*
  * LEB Properties Tree node types.
  *
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index 9782e7c..8ca441f 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -105,12 +105,10 @@ 
 /* Number of non-data journal heads */
 #define NONDATA_JHEADS_CNT 2
 
-/* Garbage collector head */
-#define GCHD   0
-/* Base journal head number */
-#define BASEHD 1
-/* First "general purpose" journal head */
-#define DATAHD 2
+/* Shorter names for journal head numbers for internal usage */
+#define GCHD   UBIFS_GC_HEAD
+#define BASEHD UBIFS_BASE_HEAD
+#define DATAHD UBIFS_DATA_HEAD
 
 /* 'No change' value for 'ubifs_change_lp()' */
 #define LPROPS_NC 0x80000001