On Tue, Nov 05, 2019 at 02:38:32AM +0100, Christoph Hellwig wrote: > On Mon, Nov 04, 2019 at 11:52:33AM -0800, Darrick J. Wong wrote: > > On Fri, Nov 01, 2019 at 03:06:50PM -0700, Christoph Hellwig wrote: > > > All but two callers of the ->node_tree_p dir operation already have a > > > xfs_da3_icnode_hdr from a previous call to xfs_da3_node_hdr_from_disk at > > > hand. Add a pointer to the btree entries to struct xfs_da3_icnode_hdr > > > to clean up this pattern. The two remaining callers now expand the > > > whole header as well, but that isn't very expensive and not in a super > > > hot path anyway. > > > > > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > > > --- > > > fs/xfs/libxfs/xfs_attr_leaf.c | 6 ++-- > > > fs/xfs/libxfs/xfs_da_btree.c | 68 ++++++++++++++++------------------- > > > fs/xfs/libxfs/xfs_da_btree.h | 1 + > > > fs/xfs/libxfs/xfs_da_format.c | 21 ----------- > > > fs/xfs/libxfs/xfs_dir2.h | 2 -- > > > fs/xfs/scrub/dabtree.c | 6 ++-- > > > fs/xfs/xfs_attr_inactive.c | 34 +++++++++--------- > > > fs/xfs/xfs_attr_list.c | 2 +- > > > 8 files changed, 55 insertions(+), 85 deletions(-) > > > > > > > <snip> > > > > > diff --git a/fs/xfs/libxfs/xfs_da_btree.h b/fs/xfs/libxfs/xfs_da_btree.h > > > index 69ebf6a50d85..63ed45057fa5 100644 > > > --- a/fs/xfs/libxfs/xfs_da_btree.h > > > +++ b/fs/xfs/libxfs/xfs_da_btree.h > > > @@ -135,6 +135,7 @@ struct xfs_da3_icnode_hdr { > > > uint16_t magic; > > > uint16_t count; > > > uint16_t level; > > > + struct xfs_da_node_entry *btree; > > > > This adds to the incore node header structure a pointer to raw disk > > structures, right? Can we make this a little more explicit by naming > > the field "raw_entries" or something? > > Hmm, is that really so much of an issue? Even something that a comment > wouldn't help? I'd kinda hate making identifiers extremely long, but > if that's what is needed I can change it. Same for the other patches > doing something similar. <shrug> I think a comment would work. Or just "__btree"...? --D