aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiro SEKIBA <jir@unicus.jp>2009-11-09 05:10:11 -0500
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-11-19 20:05:46 -0500
commit6600b9dd8e0d4a60c610f216b78d992a598bc52a (patch)
tree9c1b718ab0c5d8dea2f200eaa1b8296e655e4657
parent9b945d537db86557e5b5820b4b52df94c35b3829 (diff)
nilfs2: move definition of struct nilfs_btree_node
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>
-rw-r--r--fs/nilfs2/btree.h22
-rw-r--r--include/linux/nilfs2_fs.h22
2 files changed, 22 insertions, 22 deletions
diff --git a/fs/nilfs2/btree.h b/fs/nilfs2/btree.h
index 0e72bbbc6b64..4b82d84ade75 100644
--- a/fs/nilfs2/btree.h
+++ b/fs/nilfs2/btree.h
@@ -34,28 +34,6 @@ struct nilfs_btree;
34struct nilfs_btree_path; 34struct nilfs_btree_path;
35 35
36/** 36/**
37 * struct nilfs_btree_node - B-tree node
38 * @bn_flags: flags
39 * @bn_level: level
40 * @bn_nchildren: number of children
41 * @bn_pad: padding
42 */
43struct nilfs_btree_node {
44 __u8 bn_flags;
45 __u8 bn_level;
46 __le16 bn_nchildren;
47 __le32 bn_pad;
48};
49
50/* flags */
51#define NILFS_BTREE_NODE_ROOT 0x01
52
53/* level */
54#define NILFS_BTREE_LEVEL_DATA 0
55#define NILFS_BTREE_LEVEL_NODE_MIN (NILFS_BTREE_LEVEL_DATA + 1)
56#define NILFS_BTREE_LEVEL_MAX 14
57
58/**
59 * struct nilfs_btree - B-tree structure 37 * struct nilfs_btree - B-tree structure
60 * @bt_bmap: bmap base structure 38 * @bt_bmap: bmap base structure
61 */ 39 */
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h
index ce520402e840..72289d2bb341 100644
--- a/include/linux/nilfs2_fs.h
+++ b/include/linux/nilfs2_fs.h
@@ -403,6 +403,28 @@ struct nilfs_segment_summary {
403#define NILFS_SS_GC 0x0010 /* segment written for cleaner operation */ 403#define NILFS_SS_GC 0x0010 /* segment written for cleaner operation */
404 404
405/** 405/**
406 * struct nilfs_btree_node - B-tree node
407 * @bn_flags: flags
408 * @bn_level: level
409 * @bn_nchildren: number of children
410 * @bn_pad: padding
411 */
412struct nilfs_btree_node {
413 __u8 bn_flags;
414 __u8 bn_level;
415 __le16 bn_nchildren;
416 __le32 bn_pad;
417};
418
419/* flags */
420#define NILFS_BTREE_NODE_ROOT 0x01
421
422/* level */
423#define NILFS_BTREE_LEVEL_DATA 0
424#define NILFS_BTREE_LEVEL_NODE_MIN (NILFS_BTREE_LEVEL_DATA + 1)
425#define NILFS_BTREE_LEVEL_MAX 14
426
427/**
406 * struct nilfs_palloc_group_desc - block group descriptor 428 * struct nilfs_palloc_group_desc - block group descriptor
407 * @pg_nfrees: number of free entries in block group 429 * @pg_nfrees: number of free entries in block group
408 */ 430 */