Commit 6600b9dd authored by Jiro SEKIBA's avatar Jiro SEKIBA Committed by Ryusuke Konishi

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: default avatarJiro SEKIBA <jir@unicus.jp>
Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
parent 9b945d53
...@@ -33,28 +33,6 @@ ...@@ -33,28 +33,6 @@
struct nilfs_btree; struct nilfs_btree;
struct nilfs_btree_path; 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 * struct nilfs_btree - B-tree structure
* @bt_bmap: bmap base structure * @bt_bmap: bmap base structure
......
...@@ -402,6 +402,28 @@ struct nilfs_segment_summary { ...@@ -402,6 +402,28 @@ struct nilfs_segment_summary {
#define NILFS_SS_SYNDT 0x0008 /* includes data only updates */ #define NILFS_SS_SYNDT 0x0008 /* includes data only updates */
#define NILFS_SS_GC 0x0010 /* segment written for cleaner operation */ #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 * struct nilfs_palloc_group_desc - block group descriptor
* @pg_nfrees: number of free entries in block group * @pg_nfrees: number of free entries in block group
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment