From e7be63305a7fe7dcae2df94c0bd7cc53964741b5 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Tue, 25 Oct 2016 15:14:30 -0700 Subject: [PATCH] libxfs: initialize the in-core mount context for refcount btrees Initialize the refcount btree maxlevel field of the mount context. This helps us to detect overly tall trees. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- include/libxfs.h | 1 + libxfs/init.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/libxfs.h b/include/libxfs.h index cf59d6ca3..ec8f6abc9 100644 --- a/include/libxfs.h +++ b/include/libxfs.h @@ -79,6 +79,7 @@ extern uint32_t crc32c_le(uint32_t crc, unsigned char const *p, size_t len); #include "xfs_trans.h" #include "xfs_rmap_btree.h" #include "xfs_rmap.h" +#include "xfs_refcount_btree.h" #ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) diff --git a/libxfs/init.c b/libxfs/init.c index 828ae3ec7..c962d3e1f 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -32,6 +32,7 @@ #include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_rmap_btree.h" +#include "xfs_refcount_btree.h" #include "libxfs.h" /* for now */ @@ -689,6 +690,7 @@ libxfs_mount( xfs_bmap_compute_maxlevels(mp, XFS_ATTR_FORK); xfs_ialloc_compute_maxlevels(mp); xfs_rmapbt_compute_maxlevels(mp); + xfs_refcountbt_compute_maxlevels(mp); if (sbp->sb_imax_pct) { /* Make sure the maximum inode count is a multiple of the -- 2.47.2