[PATCH 11/71] xfs: define the on-disk refcount btree format
Christoph Hellwig
hch at infradead.org
Tue Sep 6 10:06:15 CDT 2016
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 <hch at lst.de>
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 <hch at lst.de>
More information about the xfs
mailing list