]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
nilfs2: move definition of struct nilfs_btree_node
authorJiro SEKIBA <jir@unicus.jp>
Mon, 9 Nov 2009 10:10:11 +0000 (19:10 +0900)
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Fri, 20 Nov 2009 01:05:46 +0000 (10:05 +0900)
This is a trivial patch to expose struct nilfs_fs_btree_node.
The struct should be exposed outside of kernel, for it is disk format.

Signed-off-by: Jiro SEKIBA <jir@unicus.jp>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
fs/nilfs2/btree.h
include/linux/nilfs2_fs.h

index 0e72bbbc6b648bb1a420f735fedaafe11b3d29ab..4b82d84ade750e6e9e7f1d525428b916d5931219 100644 (file)
 struct nilfs_btree;
 struct nilfs_btree_path;
 
-/**
- * struct nilfs_btree_node - B-tree node
- * @bn_flags: flags
- * @bn_level: level
- * @bn_nchildren: number of children
- * @bn_pad: padding
- */
-struct nilfs_btree_node {
-       __u8 bn_flags;
-       __u8 bn_level;
-       __le16 bn_nchildren;
-       __le32 bn_pad;
-};
-
-/* flags */
-#define NILFS_BTREE_NODE_ROOT  0x01
-
-/* level */
-#define NILFS_BTREE_LEVEL_DATA         0
-#define NILFS_BTREE_LEVEL_NODE_MIN     (NILFS_BTREE_LEVEL_DATA + 1)
-#define NILFS_BTREE_LEVEL_MAX          14
-
 /**
  * struct nilfs_btree - B-tree structure
  * @bt_bmap: bmap base structure
index ce520402e840e7b46760b9655133da1cbc4f0700..72289d2bb3414d03171a32d888fe0b13864223e1 100644 (file)
@@ -402,6 +402,28 @@ struct nilfs_segment_summary {
 #define NILFS_SS_SYNDT  0x0008  /* includes data only updates */
 #define NILFS_SS_GC     0x0010  /* segment written for cleaner operation */
 
+/**
+ * struct nilfs_btree_node - B-tree node
+ * @bn_flags: flags
+ * @bn_level: level
+ * @bn_nchildren: number of children
+ * @bn_pad: padding
+ */
+struct nilfs_btree_node {
+       __u8 bn_flags;
+       __u8 bn_level;
+       __le16 bn_nchildren;
+       __le32 bn_pad;
+};
+
+/* flags */
+#define NILFS_BTREE_NODE_ROOT   0x01
+
+/* level */
+#define NILFS_BTREE_LEVEL_DATA          0
+#define NILFS_BTREE_LEVEL_NODE_MIN      (NILFS_BTREE_LEVEL_DATA + 1)
+#define NILFS_BTREE_LEVEL_MAX           14
+
 /**
  * struct nilfs_palloc_group_desc - block group descriptor
  * @pg_nfrees: number of free entries in block group