nilfs2: move definition of struct nilfs_btree_node
PATCH 1/1 nilfs2: move definition of struct nilfs_btree_node
Hi,
This is a trivial patch to expose struct nilfs_fs_btree_node. The struct sould be exposed outside of kernel, for it is disk format.
--- fs/nilfs2/btree.h | 22 ---------------------- include/linux/nilfs2_fs.h | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 22 deletions(-)
fs/nilfs2/btree.h +0 -22
@@ -34,28 +34,6 @@ 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 */
include/linux/nilfs2_fs.h +23 -0
@@ -773,6 +773,29 @@ struct nilfs_bdesc {__u32 bd_pad; }; +/** +* 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 + +#define NILFS_IOCTL_IDENT 'n'#define NILFS_IOCTL_CHANGE_CPMODE \
Signature · 1 line
1.5.6.5
A message that is not in the archive (sent off-list or not yet received): 87zl6xv194.wl%[email protected]
Hi,
2009/11/8 Jiro SEKIBA <[email protected]>:
Quoted 6 lines
Hi,
This is a trivial patch to expose struct
nilfs_fs_btree_node. The struct sould be exposed outside of kernel, for it is disk format.Signed-off-by Jiro SEKIBA <[email protected]>
Thank you for this patch.
Quoted 73 lines
---
fs/nilfs2/btree.h | 22 ----------------------include/linux/nilfs2_fs.h| 23 +++++++++++++++++++++++2 files changed, 23 insertions(+), 22 deletions(-)fs/nilfs2/btree.h +0
-22@@ -34,28 +34,6 @@ 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 */ include/linux/nilfs2_fs.h +23
-1@@ -773,6 +773,29 @@ struct nilfs_bdesc { __u32 bd_pad; }; +/** +* 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 + + #define NILFS_IOCTL_IDENT 'n' #define NILFS_IOCTL_CHANGE_CPMODE \ --
Quoted 1 line
1.5.6.5
Seems that the nilfs_btree_node struct was moved into the middle of ioctl related declarations.
I think it should come before the definition of nilfs_palloc_group_desc struct or so.
Thanks,
Ryusuke Konishi
A message that is not in the archive (sent off-list or not yet received): c4a7c9420911080226q57dcd7aexdde32dd55d108b1a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Hi,
At Sun, 8 Nov 2009 19:26:16 +0900,
Quoted 90 lines · Ryusuke Konishi
Hi,
2009/11/8 Jiro SEKIBA <[email protected]>:Quoted 6 lines
Hi,
This is a trivial patch to expose struct
nilfs_fs_btree_node. The struct sould be exposed outside of kernel, for it is disk format.Signed-off-by Jiro SEKIBA <[email protected]>Thank you for this patch.
Quoted 73 lines
---
fs/nilfs2/btree.h | 22 ----------------------include/linux/nilfs2_fs.h| 23 +++++++++++++++++++++++2 files changed, 23 insertions(+), 22 deletions(-)fs/nilfs2/btree.h +0
-22@@ -34,28 +34,6 @@ 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 */ include/linux/nilfs2_fs.h +23
-1@@ -773,6 +773,29 @@ struct nilfs_bdesc { __u32 bd_pad; }; +/** +* 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 + + #define NILFS_IOCTL_IDENT 'n' #define NILFS_IOCTL_CHANGE_CPMODE \ --Quoted 1 line
1.5.6.5
Seems that the
nilfs_btree_nodestruct was moved into the middle of ioctl related declarations.
Quoted 2 lines
I think it should come before the definition of
nilfs_palloc_group_descstruct or so.
Grr, I'll revise and resend the patch.
Thank you for the review.
Quoted 9 lines
Thanks,
Ryusuke Konishi
_______________________________________________
users mailing list
[email protected]
https://www.nilfs.org/mailman/listinfo/users
Signature · 1 line
Jiro SEKIBA <[email protected]>