linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 03/34] xfs: devirtualize ->node_hdr_from_disk
Date: Mon, 4 Nov 2019 10:37:22 -0800	[thread overview]
Message-ID: <20191104183722.GD4153244@magnolia> (raw)
In-Reply-To: <20191101220719.29100-4-hch@lst.de>

On Fri, Nov 01, 2019 at 03:06:48PM -0700, Christoph Hellwig wrote:
> Replace the ->node_hdr_from_disk dir ops method with a directly called
> xfs_da_node_hdr_from_disk helper that takes care of the v4 vs v5
> difference.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Seems like a nice cleanup,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  fs/xfs/libxfs/xfs_attr_leaf.c |  2 +-
>  fs/xfs/libxfs/xfs_da_btree.c  | 84 ++++++++++++++++++++++-------------
>  fs/xfs/libxfs/xfs_da_btree.h  |  3 ++
>  fs/xfs/libxfs/xfs_da_format.c | 33 --------------
>  fs/xfs/libxfs/xfs_dir2.h      |  2 -
>  fs/xfs/scrub/dabtree.c        |  2 +-
>  fs/xfs/xfs_attr_inactive.c    |  2 +-
>  fs/xfs/xfs_attr_list.c        |  2 +-
>  8 files changed, 60 insertions(+), 70 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c
> index 56e62b3d9bb7..131fef677896 100644
> --- a/fs/xfs/libxfs/xfs_attr_leaf.c
> +++ b/fs/xfs/libxfs/xfs_attr_leaf.c
> @@ -1185,7 +1185,7 @@ xfs_attr3_leaf_to_node(
>  	if (error)
>  		goto out;
>  	node = bp1->b_addr;
> -	dp->d_ops->node_hdr_from_disk(&icnodehdr, node);
> +	xfs_da3_node_hdr_from_disk(mp, &icnodehdr, node);
>  	btree = dp->d_ops->node_tree_p(node);
>  
>  	leaf = bp2->b_addr;
> diff --git a/fs/xfs/libxfs/xfs_da_btree.c b/fs/xfs/libxfs/xfs_da_btree.c
> index 4fd1223c1bd5..f7ddc91ed099 100644
> --- a/fs/xfs/libxfs/xfs_da_btree.c
> +++ b/fs/xfs/libxfs/xfs_da_btree.c
> @@ -110,6 +110,31 @@ xfs_da_state_free(xfs_da_state_t *state)
>  	kmem_zone_free(xfs_da_state_zone, state);
>  }
>  
> +void
> +xfs_da3_node_hdr_from_disk(
> +	struct xfs_mount		*mp,
> +	struct xfs_da3_icnode_hdr	*to,
> +	struct xfs_da_intnode		*from)
> +{
> +	if (xfs_sb_version_hascrc(&mp->m_sb)) {
> +		struct xfs_da3_intnode	*from3 = (struct xfs_da3_intnode *)from;
> +
> +		to->forw = be32_to_cpu(from3->hdr.info.hdr.forw);
> +		to->back = be32_to_cpu(from3->hdr.info.hdr.back);
> +		to->magic = be16_to_cpu(from3->hdr.info.hdr.magic);
> +		to->count = be16_to_cpu(from3->hdr.__count);
> +		to->level = be16_to_cpu(from3->hdr.__level);
> +		ASSERT(to->magic == XFS_DA3_NODE_MAGIC);
> +	} else {
> +		to->forw = be32_to_cpu(from->hdr.info.forw);
> +		to->back = be32_to_cpu(from->hdr.info.back);
> +		to->magic = be16_to_cpu(from->hdr.info.magic);
> +		to->count = be16_to_cpu(from->hdr.__count);
> +		to->level = be16_to_cpu(from->hdr.__level);
> +		ASSERT(to->magic == XFS_DA_NODE_MAGIC);
> +	}
> +}
> +
>  /*
>   * Verify an xfs_da3_blkinfo structure. Note that the da3 fields are only
>   * accessible on v5 filesystems. This header format is common across da node,
> @@ -145,12 +170,9 @@ xfs_da3_node_verify(
>  	struct xfs_mount	*mp = bp->b_mount;
>  	struct xfs_da_intnode	*hdr = bp->b_addr;
>  	struct xfs_da3_icnode_hdr ichdr;
> -	const struct xfs_dir_ops *ops;
>  	xfs_failaddr_t		fa;
>  
> -	ops = xfs_dir_get_ops(mp, NULL);
> -
> -	ops->node_hdr_from_disk(&ichdr, hdr);
> +	xfs_da3_node_hdr_from_disk(mp, &ichdr, hdr);
>  
>  	fa = xfs_da3_blkinfo_verify(bp, bp->b_addr);
>  	if (fa)
> @@ -577,7 +599,7 @@ xfs_da3_root_split(
>  	    oldroot->hdr.info.magic == cpu_to_be16(XFS_DA3_NODE_MAGIC)) {
>  		struct xfs_da3_icnode_hdr icnodehdr;
>  
> -		dp->d_ops->node_hdr_from_disk(&icnodehdr, oldroot);
> +		xfs_da3_node_hdr_from_disk(dp->i_mount, &icnodehdr, oldroot);
>  		btree = dp->d_ops->node_tree_p(oldroot);
>  		size = (int)((char *)&btree[icnodehdr.count] - (char *)oldroot);
>  		level = icnodehdr.level;
> @@ -637,7 +659,7 @@ xfs_da3_root_split(
>  		return error;
>  
>  	node = bp->b_addr;
> -	dp->d_ops->node_hdr_from_disk(&nodehdr, node);
> +	xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr, node);
>  	btree = dp->d_ops->node_tree_p(node);
>  	btree[0].hashval = cpu_to_be32(blk1->hashval);
>  	btree[0].before = cpu_to_be32(blk1->blkno);
> @@ -686,7 +708,7 @@ xfs_da3_node_split(
>  	trace_xfs_da_node_split(state->args);
>  
>  	node = oldblk->bp->b_addr;
> -	dp->d_ops->node_hdr_from_disk(&nodehdr, node);
> +	xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr, node);
>  
>  	/*
>  	 * With V2 dirs the extra block is data or freespace.
> @@ -733,7 +755,7 @@ xfs_da3_node_split(
>  	 * If we had double-split op below us, then add the extra block too.
>  	 */
>  	node = oldblk->bp->b_addr;
> -	dp->d_ops->node_hdr_from_disk(&nodehdr, node);
> +	xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr, node);
>  	if (oldblk->index <= nodehdr.count) {
>  		oldblk->index++;
>  		xfs_da3_node_add(state, oldblk, addblk);
> @@ -788,8 +810,8 @@ xfs_da3_node_rebalance(
>  
>  	node1 = blk1->bp->b_addr;
>  	node2 = blk2->bp->b_addr;
> -	dp->d_ops->node_hdr_from_disk(&nodehdr1, node1);
> -	dp->d_ops->node_hdr_from_disk(&nodehdr2, node2);
> +	xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr1, node1);
> +	xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr2, node2);
>  	btree1 = dp->d_ops->node_tree_p(node1);
>  	btree2 = dp->d_ops->node_tree_p(node2);
>  
> @@ -804,8 +826,8 @@ xfs_da3_node_rebalance(
>  		tmpnode = node1;
>  		node1 = node2;
>  		node2 = tmpnode;
> -		dp->d_ops->node_hdr_from_disk(&nodehdr1, node1);
> -		dp->d_ops->node_hdr_from_disk(&nodehdr2, node2);
> +		xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr1, node1);
> +		xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr2, node2);
>  		btree1 = dp->d_ops->node_tree_p(node1);
>  		btree2 = dp->d_ops->node_tree_p(node2);
>  		swap = 1;
> @@ -886,8 +908,8 @@ xfs_da3_node_rebalance(
>  	if (swap) {
>  		node1 = blk1->bp->b_addr;
>  		node2 = blk2->bp->b_addr;
> -		dp->d_ops->node_hdr_from_disk(&nodehdr1, node1);
> -		dp->d_ops->node_hdr_from_disk(&nodehdr2, node2);
> +		xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr1, node1);
> +		xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr2, node2);
>  		btree1 = dp->d_ops->node_tree_p(node1);
>  		btree2 = dp->d_ops->node_tree_p(node2);
>  	}
> @@ -921,7 +943,7 @@ xfs_da3_node_add(
>  	trace_xfs_da_node_add(state->args);
>  
>  	node = oldblk->bp->b_addr;
> -	dp->d_ops->node_hdr_from_disk(&nodehdr, node);
> +	xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr, node);
>  	btree = dp->d_ops->node_tree_p(node);
>  
>  	ASSERT(oldblk->index >= 0 && oldblk->index <= nodehdr.count);
> @@ -1092,7 +1114,7 @@ xfs_da3_root_join(
>  
>  	args = state->args;
>  	oldroot = root_blk->bp->b_addr;
> -	dp->d_ops->node_hdr_from_disk(&oldroothdr, oldroot);
> +	xfs_da3_node_hdr_from_disk(dp->i_mount, &oldroothdr, oldroot);
>  	ASSERT(oldroothdr.forw == 0);
>  	ASSERT(oldroothdr.back == 0);
>  
> @@ -1172,7 +1194,7 @@ xfs_da3_node_toosmall(
>  	blk = &state->path.blk[ state->path.active-1 ];
>  	info = blk->bp->b_addr;
>  	node = (xfs_da_intnode_t *)info;
> -	dp->d_ops->node_hdr_from_disk(&nodehdr, node);
> +	xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr, node);
>  	if (nodehdr.count > (state->args->geo->node_ents >> 1)) {
>  		*action = 0;	/* blk over 50%, don't try to join */
>  		return 0;	/* blk over 50%, don't try to join */
> @@ -1230,7 +1252,7 @@ xfs_da3_node_toosmall(
>  			return error;
>  
>  		node = bp->b_addr;
> -		dp->d_ops->node_hdr_from_disk(&thdr, node);
> +		xfs_da3_node_hdr_from_disk(dp->i_mount, &thdr, node);
>  		xfs_trans_brelse(state->args->trans, bp);
>  
>  		if (count - thdr.count >= 0)
> @@ -1277,7 +1299,7 @@ xfs_da3_node_lasthash(
>  	struct xfs_da3_icnode_hdr nodehdr;
>  
>  	node = bp->b_addr;
> -	dp->d_ops->node_hdr_from_disk(&nodehdr, node);
> +	xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr, node);
>  	if (count)
>  		*count = nodehdr.count;
>  	if (!nodehdr.count)
> @@ -1328,7 +1350,7 @@ xfs_da3_fixhashpath(
>  		struct xfs_da3_icnode_hdr nodehdr;
>  
>  		node = blk->bp->b_addr;
> -		dp->d_ops->node_hdr_from_disk(&nodehdr, node);
> +		xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr, node);
>  		btree = dp->d_ops->node_tree_p(node);
>  		if (be32_to_cpu(btree[blk->index].hashval) == lasthash)
>  			break;
> @@ -1360,7 +1382,7 @@ xfs_da3_node_remove(
>  	trace_xfs_da_node_remove(state->args);
>  
>  	node = drop_blk->bp->b_addr;
> -	dp->d_ops->node_hdr_from_disk(&nodehdr, node);
> +	xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr, node);
>  	ASSERT(drop_blk->index < nodehdr.count);
>  	ASSERT(drop_blk->index >= 0);
>  
> @@ -1416,8 +1438,8 @@ xfs_da3_node_unbalance(
>  
>  	drop_node = drop_blk->bp->b_addr;
>  	save_node = save_blk->bp->b_addr;
> -	dp->d_ops->node_hdr_from_disk(&drop_hdr, drop_node);
> -	dp->d_ops->node_hdr_from_disk(&save_hdr, save_node);
> +	xfs_da3_node_hdr_from_disk(dp->i_mount, &drop_hdr, drop_node);
> +	xfs_da3_node_hdr_from_disk(dp->i_mount, &save_hdr, save_node);
>  	drop_btree = dp->d_ops->node_tree_p(drop_node);
>  	save_btree = dp->d_ops->node_tree_p(save_node);
>  	tp = state->args->trans;
> @@ -1550,7 +1572,7 @@ xfs_da3_node_lookup_int(
>  		 * Search an intermediate node for a match.
>  		 */
>  		node = blk->bp->b_addr;
> -		dp->d_ops->node_hdr_from_disk(&nodehdr, node);
> +		xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr, node);
>  		btree = dp->d_ops->node_tree_p(node);
>  
>  		/* Tree taller than we can handle; bail out! */
> @@ -1678,8 +1700,8 @@ xfs_da3_node_order(
>  
>  	node1 = node1_bp->b_addr;
>  	node2 = node2_bp->b_addr;
> -	dp->d_ops->node_hdr_from_disk(&node1hdr, node1);
> -	dp->d_ops->node_hdr_from_disk(&node2hdr, node2);
> +	xfs_da3_node_hdr_from_disk(dp->i_mount, &node1hdr, node1);
> +	xfs_da3_node_hdr_from_disk(dp->i_mount, &node2hdr, node2);
>  	btree1 = dp->d_ops->node_tree_p(node1);
>  	btree2 = dp->d_ops->node_tree_p(node2);
>  
> @@ -1902,7 +1924,7 @@ xfs_da3_path_shift(
>  	level = (path->active-1) - 1;	/* skip bottom layer in path */
>  	for (blk = &path->blk[level]; level >= 0; blk--, level--) {
>  		node = blk->bp->b_addr;
> -		dp->d_ops->node_hdr_from_disk(&nodehdr, node);
> +		xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr, node);
>  		btree = dp->d_ops->node_tree_p(node);
>  
>  		if (forward && (blk->index < nodehdr.count - 1)) {
> @@ -1963,7 +1985,7 @@ xfs_da3_path_shift(
>  		case XFS_DA3_NODE_MAGIC:
>  			blk->magic = XFS_DA_NODE_MAGIC;
>  			node = (xfs_da_intnode_t *)info;
> -			dp->d_ops->node_hdr_from_disk(&nodehdr, node);
> +			xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr, node);
>  			btree = dp->d_ops->node_tree_p(node);
>  			blk->hashval = be32_to_cpu(btree[nodehdr.count - 1].hashval);
>  			if (forward)
> @@ -2248,7 +2270,7 @@ xfs_da3_swap_lastblock(
>  		struct xfs_da3_icnode_hdr deadhdr;
>  
>  		dead_node = (xfs_da_intnode_t *)dead_info;
> -		dp->d_ops->node_hdr_from_disk(&deadhdr, dead_node);
> +		xfs_da3_node_hdr_from_disk(dp->i_mount, &deadhdr, dead_node);
>  		btree = dp->d_ops->node_tree_p(dead_node);
>  		dead_level = deadhdr.level;
>  		dead_hash = be32_to_cpu(btree[deadhdr.count - 1].hashval);
> @@ -2308,7 +2330,7 @@ xfs_da3_swap_lastblock(
>  		if (error)
>  			goto done;
>  		par_node = par_buf->b_addr;
> -		dp->d_ops->node_hdr_from_disk(&par_hdr, par_node);
> +		xfs_da3_node_hdr_from_disk(dp->i_mount, &par_hdr, par_node);
>  		if (level >= 0 && level != par_hdr.level + 1) {
>  			XFS_ERROR_REPORT("xfs_da_swap_lastblock(4)",
>  					 XFS_ERRLEVEL_LOW, mp);
> @@ -2359,7 +2381,7 @@ xfs_da3_swap_lastblock(
>  		if (error)
>  			goto done;
>  		par_node = par_buf->b_addr;
> -		dp->d_ops->node_hdr_from_disk(&par_hdr, par_node);
> +		xfs_da3_node_hdr_from_disk(dp->i_mount, &par_hdr, par_node);
>  		if (par_hdr.level != level) {
>  			XFS_ERROR_REPORT("xfs_da_swap_lastblock(7)",
>  					 XFS_ERRLEVEL_LOW, mp);
> diff --git a/fs/xfs/libxfs/xfs_da_btree.h b/fs/xfs/libxfs/xfs_da_btree.h
> index 02f7a21ab3a5..eb15b9e76bc8 100644
> --- a/fs/xfs/libxfs/xfs_da_btree.h
> +++ b/fs/xfs/libxfs/xfs_da_btree.h
> @@ -215,6 +215,9 @@ enum xfs_dacmp xfs_da_compname(struct xfs_da_args *args,
>  xfs_da_state_t *xfs_da_state_alloc(void);
>  void xfs_da_state_free(xfs_da_state_t *state);
>  
> +void	xfs_da3_node_hdr_from_disk(struct xfs_mount *mp,
> +		struct xfs_da3_icnode_hdr *to, struct xfs_da_intnode *from);
> +
>  extern struct kmem_zone *xfs_da_state_zone;
>  extern const struct xfs_nameops xfs_default_nameops;
>  
> diff --git a/fs/xfs/libxfs/xfs_da_format.c b/fs/xfs/libxfs/xfs_da_format.c
> index 31bb250c1899..267aca857126 100644
> --- a/fs/xfs/libxfs/xfs_da_format.c
> +++ b/fs/xfs/libxfs/xfs_da_format.c
> @@ -510,19 +510,6 @@ xfs_da3_node_tree_p(struct xfs_da_intnode *dap)
>  	return ((struct xfs_da3_intnode *)dap)->__btree;
>  }
>  
> -static void
> -xfs_da2_node_hdr_from_disk(
> -	struct xfs_da3_icnode_hdr	*to,
> -	struct xfs_da_intnode		*from)
> -{
> -	ASSERT(from->hdr.info.magic == cpu_to_be16(XFS_DA_NODE_MAGIC));
> -	to->forw = be32_to_cpu(from->hdr.info.forw);
> -	to->back = be32_to_cpu(from->hdr.info.back);
> -	to->magic = be16_to_cpu(from->hdr.info.magic);
> -	to->count = be16_to_cpu(from->hdr.__count);
> -	to->level = be16_to_cpu(from->hdr.__level);
> -}
> -
>  static void
>  xfs_da2_node_hdr_to_disk(
>  	struct xfs_da_intnode		*to,
> @@ -536,21 +523,6 @@ xfs_da2_node_hdr_to_disk(
>  	to->hdr.__level = cpu_to_be16(from->level);
>  }
>  
> -static void
> -xfs_da3_node_hdr_from_disk(
> -	struct xfs_da3_icnode_hdr	*to,
> -	struct xfs_da_intnode		*from)
> -{
> -	struct xfs_da3_node_hdr *hdr3 = (struct xfs_da3_node_hdr *)from;
> -
> -	ASSERT(from->hdr.info.magic == cpu_to_be16(XFS_DA3_NODE_MAGIC));
> -	to->forw = be32_to_cpu(hdr3->info.hdr.forw);
> -	to->back = be32_to_cpu(hdr3->info.hdr.back);
> -	to->magic = be16_to_cpu(hdr3->info.hdr.magic);
> -	to->count = be16_to_cpu(hdr3->__count);
> -	to->level = be16_to_cpu(hdr3->__level);
> -}
> -
>  static void
>  xfs_da3_node_hdr_to_disk(
>  	struct xfs_da_intnode		*to,
> @@ -727,7 +699,6 @@ static const struct xfs_dir_ops xfs_dir2_ops = {
>  
>  	.node_hdr_size = sizeof(struct xfs_da_node_hdr),
>  	.node_hdr_to_disk = xfs_da2_node_hdr_to_disk,
> -	.node_hdr_from_disk = xfs_da2_node_hdr_from_disk,
>  	.node_tree_p = xfs_da2_node_tree_p,
>  
>  	.free_hdr_size = sizeof(struct xfs_dir2_free_hdr),
> @@ -777,7 +748,6 @@ static const struct xfs_dir_ops xfs_dir2_ftype_ops = {
>  
>  	.node_hdr_size = sizeof(struct xfs_da_node_hdr),
>  	.node_hdr_to_disk = xfs_da2_node_hdr_to_disk,
> -	.node_hdr_from_disk = xfs_da2_node_hdr_from_disk,
>  	.node_tree_p = xfs_da2_node_tree_p,
>  
>  	.free_hdr_size = sizeof(struct xfs_dir2_free_hdr),
> @@ -827,7 +797,6 @@ static const struct xfs_dir_ops xfs_dir3_ops = {
>  
>  	.node_hdr_size = sizeof(struct xfs_da3_node_hdr),
>  	.node_hdr_to_disk = xfs_da3_node_hdr_to_disk,
> -	.node_hdr_from_disk = xfs_da3_node_hdr_from_disk,
>  	.node_tree_p = xfs_da3_node_tree_p,
>  
>  	.free_hdr_size = sizeof(struct xfs_dir3_free_hdr),
> @@ -842,14 +811,12 @@ static const struct xfs_dir_ops xfs_dir3_ops = {
>  static const struct xfs_dir_ops xfs_dir2_nondir_ops = {
>  	.node_hdr_size = sizeof(struct xfs_da_node_hdr),
>  	.node_hdr_to_disk = xfs_da2_node_hdr_to_disk,
> -	.node_hdr_from_disk = xfs_da2_node_hdr_from_disk,
>  	.node_tree_p = xfs_da2_node_tree_p,
>  };
>  
>  static const struct xfs_dir_ops xfs_dir3_nondir_ops = {
>  	.node_hdr_size = sizeof(struct xfs_da3_node_hdr),
>  	.node_hdr_to_disk = xfs_da3_node_hdr_to_disk,
> -	.node_hdr_from_disk = xfs_da3_node_hdr_from_disk,
>  	.node_tree_p = xfs_da3_node_tree_p,
>  };
>  
> diff --git a/fs/xfs/libxfs/xfs_dir2.h b/fs/xfs/libxfs/xfs_dir2.h
> index e170792c0acc..573043f59c85 100644
> --- a/fs/xfs/libxfs/xfs_dir2.h
> +++ b/fs/xfs/libxfs/xfs_dir2.h
> @@ -84,8 +84,6 @@ struct xfs_dir_ops {
>  	int	node_hdr_size;
>  	void	(*node_hdr_to_disk)(struct xfs_da_intnode *to,
>  				    struct xfs_da3_icnode_hdr *from);
> -	void	(*node_hdr_from_disk)(struct xfs_da3_icnode_hdr *to,
> -				      struct xfs_da_intnode *from);
>  	struct xfs_da_node_entry *
>  		(*node_tree_p)(struct xfs_da_intnode *dap);
>  
> diff --git a/fs/xfs/scrub/dabtree.c b/fs/xfs/scrub/dabtree.c
> index d1248c223c7f..be19a48716b7 100644
> --- a/fs/xfs/scrub/dabtree.c
> +++ b/fs/xfs/scrub/dabtree.c
> @@ -410,7 +410,7 @@ xchk_da_btree_block(
>  				XFS_BLFT_DA_NODE_BUF);
>  		blk->magic = XFS_DA_NODE_MAGIC;
>  		node = blk->bp->b_addr;
> -		ip->d_ops->node_hdr_from_disk(&nodehdr, node);
> +		xfs_da3_node_hdr_from_disk(ip->i_mount, &nodehdr, node);
>  		btree = ip->d_ops->node_tree_p(node);
>  		*pmaxrecs = nodehdr.count;
>  		blk->hashval = be32_to_cpu(btree[*pmaxrecs - 1].hashval);
> diff --git a/fs/xfs/xfs_attr_inactive.c b/fs/xfs/xfs_attr_inactive.c
> index f83f11d929e4..c1ce06ccfab0 100644
> --- a/fs/xfs/xfs_attr_inactive.c
> +++ b/fs/xfs/xfs_attr_inactive.c
> @@ -213,7 +213,7 @@ xfs_attr3_node_inactive(
>  	}
>  
>  	node = bp->b_addr;
> -	dp->d_ops->node_hdr_from_disk(&ichdr, node);
> +	xfs_da3_node_hdr_from_disk(dp->i_mount, &ichdr, node);
>  	parent_blkno = bp->b_bn;
>  	if (!ichdr.count) {
>  		xfs_trans_brelse(*trans, bp);
> diff --git a/fs/xfs/xfs_attr_list.c b/fs/xfs/xfs_attr_list.c
> index c02f22d50e45..5b5a3772ed24 100644
> --- a/fs/xfs/xfs_attr_list.c
> +++ b/fs/xfs/xfs_attr_list.c
> @@ -240,7 +240,7 @@ xfs_attr_node_list_lookup(
>  			goto out_corruptbuf;
>  		}
>  
> -		dp->d_ops->node_hdr_from_disk(&nodehdr, node);
> +		xfs_da3_node_hdr_from_disk(mp, &nodehdr, node);
>  
>  		/* Tree taller than we can handle; bail out! */
>  		if (nodehdr.level >= XFS_DA_NODE_MAXDEPTH)
> -- 
> 2.20.1
> 

  reply	other threads:[~2019-11-04 18:37 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-01 22:06 remove m_dirops Christoph Hellwig
2019-11-01 22:06 ` [PATCH 01/34] xfs: move incore structures out of xfs_da_format.h Christoph Hellwig
2019-11-04 18:21   ` Darrick J. Wong
2019-11-01 22:06 ` [PATCH 02/34] xfs: refactor btree node scrubbing Christoph Hellwig
2019-11-04 18:36   ` Darrick J. Wong
2019-11-05  1:35     ` Christoph Hellwig
2019-11-01 22:06 ` [PATCH 03/34] xfs: devirtualize ->node_hdr_from_disk Christoph Hellwig
2019-11-04 18:37   ` Darrick J. Wong [this message]
2019-11-01 22:06 ` [PATCH 04/34] xfs: devirtualize ->node_hdr_to_disk Christoph Hellwig
2019-11-04 18:39   ` Darrick J. Wong
2019-11-01 22:06 ` [PATCH 05/34] xfs: add a btree entries pointer to struct xfs_da3_icnode_hdr Christoph Hellwig
2019-11-04 19:52   ` Darrick J. Wong
2019-11-05  1:38     ` Christoph Hellwig
2019-11-05  1:58       ` Darrick J. Wong
2019-11-01 22:06 ` [PATCH 06/34] xfs: move the node header size to struct xfs_da_geometry Christoph Hellwig
2019-11-04 19:58   ` Darrick J. Wong
2019-11-01 22:06 ` [PATCH 07/34] xfs: devirtualize ->leaf_hdr_from_disk Christoph Hellwig
2019-11-04 19:59   ` Darrick J. Wong
2019-11-01 22:06 ` [PATCH 08/34] xfs: devirtualize ->leaf_hdr_to_disk Christoph Hellwig
2019-11-04 20:00   ` Darrick J. Wong
2019-11-01 22:06 ` [PATCH 09/34] xfs: add a entries pointer to struct xfs_dir3_icleaf_hdr Christoph Hellwig
2019-11-04 20:04   ` Darrick J. Wong
2019-11-01 22:06 ` [PATCH 10/34] xfs: move the dir2 leaf header size to struct xfs_da_geometry Christoph Hellwig
2019-11-04 20:05   ` Darrick J. Wong
2019-11-01 22:06 ` [PATCH 11/34] xfs: move the max dir2 leaf entries count " Christoph Hellwig
2019-11-04 20:07   ` Darrick J. Wong
2019-11-05  1:42     ` Christoph Hellwig
2019-11-05  1:58       ` Darrick J. Wong
2019-11-01 22:06 ` [PATCH 12/34] xfs: devirtualize ->free_hdr_from_disk Christoph Hellwig
2019-11-04 20:08   ` Darrick J. Wong
2019-11-01 22:06 ` [PATCH 13/34] xfs: devirtualize ->free_hdr_to_disk Christoph Hellwig
2019-11-04 20:08   ` Darrick J. Wong
2019-11-01 22:06 ` [PATCH 14/34] xfs: make the xfs_dir3_icfree_hdr available to xfs_dir2_node_addname_int Christoph Hellwig
2019-11-04 20:25   ` Darrick J. Wong
2019-11-05  1:52     ` Christoph Hellwig
2019-11-05  1:59       ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 15/34] xfs: add a bests pointer to struct xfs_dir3_icfree_hdr Christoph Hellwig
2019-11-04 20:21   ` Darrick J. Wong
2019-11-05  1:44     ` Christoph Hellwig
2019-11-05  2:05       ` Darrick J. Wong
2019-11-05 16:44         ` Christoph Hellwig
2019-11-01 22:07 ` [PATCH 16/34] xfs: move the dir2 free header size to struct xfs_da_geometry Christoph Hellwig
2019-11-04 20:22   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 17/34] xfs: move the max dir2 free bests count " Christoph Hellwig
2019-11-04 20:23   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 18/34] xfs: devirtualize ->db_to_fdb and ->db_to_fdindex Christoph Hellwig
2019-11-04 20:26   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 19/34] xfs: devirtualize ->sf_get_parent_ino and ->sf_put_parent_ino Christoph Hellwig
2019-11-04 20:26   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 20/34] xfs: devirtualize ->sf_entsize and ->sf_nextentry Christoph Hellwig
2019-11-04 20:28   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 21/34] xfs: devirtualize ->sf_get_ino and ->sf_put_ino Christoph Hellwig
2019-11-04 20:33   ` Darrick J. Wong
2019-11-07  1:05     ` Darrick J. Wong
2019-11-07  8:29       ` Christoph Hellwig
2019-11-01 22:07 ` [PATCH 22/34] xfs: devirtualize ->sf_get_ftype and ->sf_put_ftype Christoph Hellwig
2019-11-04 20:34   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 23/34] xfs: remove the ->data_dot_entry_p and ->data_dotdot_entry_p methods Christoph Hellwig
2019-11-04 20:37   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 24/34] xfs: remove the unused ->data_first_entry_p method Christoph Hellwig
2019-11-04 20:38   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 25/34] xfs: remove the ->data_entry_entry_p method Christoph Hellwig
2019-11-04 20:41   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 26/34] xfs: devirtualize ->data_entsize Christoph Hellwig
2019-11-04 20:45   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 27/34] xfs: devirtualize ->data_entry_tag_p Christoph Hellwig
2019-11-04 20:45   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 28/34] xfs: move the dir2 data block fixed offsets to struct xfs_da_geometry Christoph Hellwig
2019-11-04 20:46   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 29/34] xfs: cleanup xfs_dir2_data_entsize Christoph Hellwig
2019-11-04 20:48   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 30/34] xfs: devirtualize ->data_bestfree_p Christoph Hellwig
2019-11-04 20:49   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 31/34] xfs: devirtualize ->data_get_ftype and ->data_put_ftype Christoph Hellwig
2019-11-04 20:50   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 32/34] xfs: remove the now unused dir ops infrastructure Christoph Hellwig
2019-11-04 20:50   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 33/34] xfs: merge xfs_dir2_data_freescan and xfs_dir2_data_freescan_int Christoph Hellwig
2019-11-04 20:51   ` Darrick J. Wong
2019-11-01 22:07 ` [PATCH 34/34] xfs: always pass a valid hdr to xfs_dir3_leaf_check_int Christoph Hellwig
2019-11-04 20:53   ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191104183722.GD4153244@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).