]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: initialize the in-core mount context for refcount btrees
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 25 Oct 2016 22:14:30 +0000 (15:14 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 26 Oct 2016 18:13:00 +0000 (11:13 -0700)
Initialize the refcount btree maxlevel field of the mount context.
This helps us to detect overly tall trees.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
include/libxfs.h
libxfs/init.c

index cf59d6ca3d7eaf61e4fc29db67b8514e3d00ab24..ec8f6abc905c9e4a480c5cd6aa93f1bc534da80e 100644 (file)
@@ -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]))
index 828ae3ec742b13a75d87f7b556b7eb5e508871f7..c962d3e1ffe128a23cb87ece07fdd8163813bf5f 100644 (file)
@@ -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