]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
fixup
authorChristoph Hellwig <hch@lst.de>
Thu, 15 Aug 2024 18:56:37 +0000 (11:56 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 16 Aug 2024 21:57:39 +0000 (14:57 -0700)
include/libxfs.h
include/xfs_mount.h
libxfs/Makefile
libxfs/init.c
libxfs/xfs_rtrmap_btree.c

index b1453345358749967319b2fd4fafbb4251a836fe..590ac92e9ddd150c10e84b9a738768f66469e809 100644 (file)
@@ -97,6 +97,7 @@ struct iomap;
 #include "xfs_metadir.h"
 #include "xfs_rtgroup.h"
 #include "xfs_rtbitmap.h"
+#include "xfs_rtrmap_btree.h"
 
 #ifndef ARRAY_SIZE
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
index 409587ab8d6061668f6b324df4146a6864a7c347..17252f193744f4ea4b2a28fc84807921276f6186 100644 (file)
@@ -78,11 +78,14 @@ typedef struct xfs_mount {
        uint                    m_bmap_dmnr[2]; /* XFS_BMAP_BLOCK_DMINRECS */
        uint                    m_rmap_mxr[2];  /* max rmap btree records */
        uint                    m_rmap_mnr[2];  /* min rmap btree records */
+       uint                    m_rtrmap_mxr[2]; /* max rtrmap btree records */
+       uint                    m_rtrmap_mnr[2]; /* min rtrmap btree records */
        uint                    m_refc_mxr[2];  /* max refc btree records */
        uint                    m_refc_mnr[2];  /* min refc btree records */
        uint                    m_alloc_maxlevels; /* max alloc btree levels */
        uint                    m_bm_maxlevels[2];  /* max bmap btree levels */
        uint                    m_rmap_maxlevels; /* max rmap btree levels */
+       uint                    m_rtrmap_maxlevels; /* max rtrmap btree level */
        uint                    m_refc_maxlevels; /* max refc btree levels */
        unsigned int            m_agbtree_maxlevels; /* max level of all AG btrees */
        unsigned int            m_rtbtree_maxlevels; /* max level of all rt btrees */
@@ -223,6 +226,12 @@ __XFS_HAS_FEAT(metadir, METADIR)
 __XFS_HAS_FEAT(rtgroups, RTGROUPS)
 __XFS_HAS_FEAT(rtsb, RTSB)
 
+static inline bool xfs_has_rtrmapbt(struct xfs_mount *mp)
+{
+       return xfs_has_rtgroups(mp) && xfs_has_realtime(mp) &&
+              xfs_has_rmapbt(mp);
+}
+
 /* Kernel mount features that we don't support */
 #define __XFS_UNSUPP_FEAT(name) \
 static inline bool xfs_has_ ## name (struct xfs_mount *mp) \
index 42660ddb7d5250356d32ac8c0ae49700f6338151..cfb703bc0673d752fdae5e87f41ee9cd77dc3798 100644 (file)
@@ -64,6 +64,7 @@ HFILES = \
        xfs_rmap_btree.h \
        xfs_rtbitmap.h \
        xfs_rtgroup.h \
+       xfs_rtrmap_btree.h \
        xfs_sb.h \
        xfs_shared.h \
        xfs_trans_resv.h \
@@ -124,6 +125,7 @@ CFILES = buf_mem.c \
        xfs_rmap_btree.c \
        xfs_rtbitmap.c \
        xfs_rtgroup.c \
+       xfs_rtrmap_btree.c \
        xfs_sb.c \
        xfs_symlink_remote.c \
        xfs_trans_inode.c \
index 8a86003ee20648591dcfc21acd8e0270a12d8c60..4d72b194408c3ba457f3dff9466acbe4617c8af8 100644 (file)
@@ -21,6 +21,7 @@
 #include "xfs_trans.h"
 #include "xfs_rmap_btree.h"
 #include "xfs_refcount_btree.h"
+#include "xfs_metafile.h"
 #include "libfrog/platform.h"
 #include "libxfs/xfile.h"
 #include "libxfs/buf_mem.h"
@@ -598,8 +599,7 @@ static inline void
 xfs_rtbtree_compute_maxlevels(
        struct xfs_mount        *mp)
 {
-       /* This will be filled in later. */
-       mp->m_rtbtree_maxlevels = 0;
+       mp->m_rtbtree_maxlevels = mp->m_rtrmap_maxlevels;
 }
 
 /* Compute maximum possible height of all btrees. */
@@ -615,6 +615,7 @@ libxfs_compute_all_maxlevels(
        igeo->attr_fork_offset = xfs_bmap_compute_attr_offset(mp);
        xfs_ialloc_setup_geometry(mp);
        xfs_rmapbt_compute_maxlevels(mp);
+       xfs_rtrmapbt_compute_maxlevels(mp);
        xfs_refcountbt_compute_maxlevels(mp);
 
        xfs_agbtree_compute_maxlevels(mp);
index defbe0569e50e0da441fe1abb0d67fd4b22c5bb3..a29fb6d5c9342a3f039065e1c2b092ae7bc66806 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright (c) 2018-2024 Oracle.  All Rights Reserved.
  * Author: Darrick J. Wong <djwong@kernel.org>
  */
-#include "xfs.h"
+#include "libxfs_priv.h"
 #include "xfs_fs.h"
 #include "xfs_shared.h"
 #include "xfs_format.h"
@@ -21,8 +21,6 @@
 #include "xfs_rtrmap_btree.h"
 #include "xfs_trace.h"
 #include "xfs_cksum.h"
-#include "xfs_error.h"
-#include "xfs_extent_busy.h"
 #include "xfs_rtgroup.h"
 
 static struct kmem_cache       *xfs_rtrmapbt_cur_cache;