]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blobdiff - include/xfs_mount.h
libxlog: remove the verbose argument to xlog_is_dirty
[thirdparty/xfsprogs-dev.git] / include / xfs_mount.h
index f3c03833be677917678ff9e34d1d4b1c56b5df7e..99d1d9ab13cb09d322e4099a39b8f2383c425aab 100644 (file)
@@ -13,6 +13,16 @@ struct xfs_da_geometry;
 
 typedef void (*buf_writeback_fn)(struct xfs_buf *bp);
 
+/* dynamic preallocation free space thresholds, 5% down to 1% */
+enum {
+       XFS_LOWSP_1_PCNT = 0,
+       XFS_LOWSP_2_PCNT,
+       XFS_LOWSP_3_PCNT,
+       XFS_LOWSP_4_PCNT,
+       XFS_LOWSP_5_PCNT,
+       XFS_LOWSP_MAX,
+};
+
 /*
  * Define a user-level mount structure with all we need
  * in order to make use of the numerous XFS_* macros.
@@ -71,15 +81,17 @@ typedef struct xfs_mount {
        uint                    m_rmap_mnr[2];  /* min rmap btree records */
        uint                    m_refc_mxr[2];  /* max refc btree records */
        uint                    m_refc_mnr[2];  /* min refc btree records */
-       uint                    m_ag_maxlevels; /* XFS_AG_MAXLEVELS */
-       uint                    m_bm_maxlevels[2]; /* XFS_BM_MAXLEVELS */
+       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_refc_maxlevels; /* max refc btree levels */
+       unsigned int            m_agbtree_maxlevels; /* max level of all AG btrees */
        xfs_extlen_t            m_ag_prealloc_blocks; /* reserved ag blocks */
        uint                    m_alloc_set_aside; /* space we can't use */
        uint                    m_ag_max_usable; /* max space per AG */
        struct radix_tree_root  m_perag_tree;
        uint64_t                m_features;     /* active filesystem features */
+       uint64_t                m_low_space[XFS_LOWSP_MAX];
        unsigned long           m_opstate;      /* dynamic state flags */
        bool                    m_finobt_nores; /* no per-AG finobt resv. */
        uint                    m_qflags;       /* quota status flags */
@@ -153,6 +165,7 @@ typedef struct xfs_mount {
 #define XFS_FEAT_INOBTCNT      (1ULL << 23)    /* inobt block counts */
 #define XFS_FEAT_BIGTIME       (1ULL << 24)    /* large timestamps */
 #define XFS_FEAT_NEEDSREPAIR   (1ULL << 25)    /* needs xfs_repair */
+#define XFS_FEAT_NREXT64       (1ULL << 26)    /* large extent counters */
 
 #define __XFS_HAS_FEAT(name, NAME) \
 static inline bool xfs_has_ ## name (struct xfs_mount *mp) \
@@ -196,6 +209,7 @@ __XFS_HAS_FEAT(realtime, REALTIME)
 __XFS_HAS_FEAT(inobtcounts, INOBTCNT)
 __XFS_HAS_FEAT(bigtime, BIGTIME)
 __XFS_HAS_FEAT(needsrepair, NEEDSREPAIR)
+__XFS_HAS_FEAT(large_extent_counts, NREXT64)
 
 /* Kernel mount features that we don't support */
 #define __XFS_UNSUPP_FEAT(name) \
@@ -256,6 +270,7 @@ __XFS_UNSUPP_OPSTATE(shutdown)
 
 #define LIBXFS_BHASHSIZE(sbp)          (1<<10)
 
+void libxfs_compute_all_maxlevels(struct xfs_mount *mp);
 struct xfs_mount *libxfs_mount(struct xfs_mount *mp, struct xfs_sb *sb,
                dev_t dev, dev_t logdev, dev_t rtdev, unsigned int flags);
 int libxfs_flush_mount(struct xfs_mount *mp);
@@ -266,4 +281,21 @@ extern void        libxfs_rtmount_destroy (xfs_mount_t *);
 struct xfs_dquot {
        int             q_type;
 };
+
+typedef struct wait_queue_head {
+} wait_queue_head_t;
+
+static inline void wake_up(wait_queue_head_t *wq) {}
+
+struct xfs_defer_drain { /* empty */ };
+
+#define xfs_defer_drain_init(dr)               ((void)0)
+#define xfs_defer_drain_free(dr)               ((void)0)
+
+#define xfs_perag_intent_get(mp, agno)         xfs_perag_get((mp), (agno))
+#define xfs_perag_intent_put(pag)              xfs_perag_put(pag)
+
+static inline void xfs_perag_intent_hold(struct xfs_perag *pag) {}
+static inline void xfs_perag_intent_rele(struct xfs_perag *pag) {}
+
 #endif /* __XFS_MOUNT_H__ */