Re: [PATCH 11/71] xfs: define the on-disk refcount btree format

Christoph Hellwig <[email protected]>
Newsgroups gmane.comp.file-systems.xfs.general
Message-ID <[email protected]>
On Thu, Aug 25, 2016 at 04:33:09PM -0700, Darrick J. Wong wrote:
> [hch: allocate the cursor with KM_NOFS to quiet lockdep]
> Signed-off-by: Christoph Hellwig <[email protected]>

feel free to drop mentioning this little fixlet..

> +/* Per-AG btree private information. */
> +union xfs_btree_cur_private {
> +	struct {
> +		unsigned long	nr_ops;		/* # record updates */
> +		int		shape_changes;	/* # of extent splits */
> +	} refc;
>  };
>  
>  /*
> @@ -247,6 +258,7 @@ typedef struct xfs_btree_cur
>  			struct xfs_buf	*agbp;	/* agf/agi buffer pointer */
>  			struct xfs_defer_ops *dfops;	/* deferred updates */
>  			xfs_agnumber_t	agno;	/* ag number */
> +			union xfs_btree_cur_private	priv;
>  		} a;

So we have a struct in a union in a struct in a union in a struct.
But I don't really see a good way around this..

But in general this looks fine:

Reviewed-by: Christoph Hellwig <[email protected]>

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.