From: Jiro SEKIBA Subject: Re: [PATCH] nilfs2: move definition of struct nilfs_btree_node Date: Mon, 09 Nov 2009 03:13:42 +0900 Message-ID: <87r5s8vq95.wl%jir@sekiba.com> References: <87zl6xv194.wl%jir@sekiba.com> Reply-To: NILFS Users mailing list Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: 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 Cc: Ryusuke Konishi Hi, At Sun, 8 Nov 2009 19:26:16 +0900, Ryusuke Konishi wrote: > = > 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. Grr, I'll revise and resend the patch. Thank you for the review. > Thanks, > Ryusuke Konishi > _______________________________________________ > users mailing list > users-JrjvKiOkagjYtjvyW6yDsg@public.gmane.org > https://www.nilfs.org/mailman/listinfo/users > = > = > = -- = Jiro SEKIBA