From: Ryusuke Konishi Subject: Re: [PATCH] nilfs2: move definition of struct nilfs_btree_node Date: Sun, 8 Nov 2009 19:26:16 +0900 Message-ID: References: <87zl6xv194.wl%jir@sekiba.com> Reply-To: NILFS Users mailing list Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <87zl6xv194.wl%jir-27yqGEOhnJbQT0dZR+AlfA@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: users-bounces-JrjvKiOkagjYtjvyW6yDsg@public.gmane.org Errors-To: users-bounces-JrjvKiOkagjYtjvyW6yDsg@public.gmane.org To: NILFS Users mailing list , Jiro SEKIBA Cc: Ryusuke Konishi Hi, 2009/11/8 Jiro SEKIBA : > 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 Thank you for this patch. > --- > =A0fs/nilfs2/btree.h =A0 =A0 =A0 =A0 | =A0 22 ---------------------- > =A0include/linux/nilfs2_fs.h | =A0 23 +++++++++++++++++++++++ > =A02 files changed, 23 insertions(+), 22 deletions(-) > > diff --git a/fs/nilfs2/btree.h b/fs/nilfs2/btree.h > index 0e72bbb..4b82d84 100644 > --- a/fs/nilfs2/btree.h > +++ b/fs/nilfs2/btree.h > @@ -34,28 +34,6 @@ struct nilfs_btree; > =A0struct nilfs_btree_path; > > =A0/** > - * 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 { > - =A0 =A0 =A0 __u8 bn_flags; > - =A0 =A0 =A0 __u8 bn_level; > - =A0 =A0 =A0 __le16 bn_nchildren; > - =A0 =A0 =A0 __le32 bn_pad; > -}; > - > -/* flags */ > -#define NILFS_BTREE_NODE_ROOT =A00x01 > - > -/* level */ > -#define NILFS_BTREE_LEVEL_DATA =A0 =A0 =A0 =A0 0 > -#define NILFS_BTREE_LEVEL_NODE_MIN =A0 =A0 (NILFS_BTREE_LEVEL_DATA + 1) > -#define NILFS_BTREE_LEVEL_MAX =A0 =A0 =A0 =A0 =A014 > - > -/** > =A0* struct nilfs_btree - B-tree structure > =A0* @bt_bmap: bmap base structure > =A0*/ > diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h > index 79fec6a..5e326de 100644 > --- a/include/linux/nilfs2_fs.h > +++ b/include/linux/nilfs2_fs.h > @@ -773,6 +773,29 @@ struct nilfs_bdesc { > =A0 =A0 =A0 =A0__u32 bd_pad; > =A0}; > > +/** > + * 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 { > + =A0 =A0 =A0 __u8 bn_flags; > + =A0 =A0 =A0 __u8 bn_level; > + =A0 =A0 =A0 __le16 bn_nchildren; > + =A0 =A0 =A0 __le32 bn_pad; > +}; > + > +/* flags */ > +#define NILFS_BTREE_NODE_ROOT =A0 0x01 > + > +/* level */ > +#define NILFS_BTREE_LEVEL_DATA =A0 =A0 =A0 =A0 =A00 > +#define NILFS_BTREE_LEVEL_NODE_MIN =A0 =A0 =A0(NILFS_BTREE_LEVEL_DATA + = 1) > +#define NILFS_BTREE_LEVEL_MAX =A0 =A0 =A0 =A0 =A0 14 > + > + > =A0#define NILFS_IOCTL_IDENT =A0 =A0 =A0 =A0 =A0 =A0 =A0'n' > > =A0#define NILFS_IOCTL_CHANGE_CPMODE =A0\ > -- > 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