summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_mount.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_mount.h')
-rw-r--r--fs/xfs/xfs_mount.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index 3a4ce7be8d6b..f6bc51a7f985 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -59,6 +59,16 @@ struct xfs_hook_chain {
struct srcu_notifier_head head;
};
+/* metadata object block reservation data structure */
+struct xfs_ag_resv {
+ /* number of blocks originally reserved here */
+ xfs_filblks_t ar_orig_reserved;
+ /* number of blocks reserved here */
+ xfs_filblks_t ar_reserved;
+ /* number of blocks originally asked for */
+ xfs_filblks_t ar_asked;
+};
+
/*
* The struct xfsmount layout is optimised to separate read-mostly variables
* from variables that are frequently modified. We put the read-mostly variables
@@ -233,6 +243,9 @@ typedef struct xfs_mount {
* while a repair freeze is in progress.
*/
struct mutex m_scrub_freeze;
+
+ /* Blocks reserved for all kinds of inode-based (rt) metadata. */
+ struct xfs_ag_resv m_rtmeta_resv;
} xfs_mount_t;
#define M_IGEO(mp) (&(mp)->m_ino_geo)
@@ -319,16 +332,6 @@ xfs_daddr_to_agbno(struct xfs_mount *mp, xfs_daddr_t d)
return (xfs_agblock_t) do_div(ld, mp->m_sb.sb_agblocks);
}
-/* per-AG block reservation data structures*/
-struct xfs_ag_resv {
- /* number of blocks originally reserved here */
- xfs_filblks_t ar_orig_reserved;
- /* number of blocks reserved here */
- xfs_filblks_t ar_reserved;
- /* number of blocks originally asked for */
- xfs_filblks_t ar_asked;
-};
-
/*
* Per-ag incore structure, copies of information in agf and agi, to improve the
* performance of allocation group selection.
@@ -420,6 +423,8 @@ xfs_perag_resv(
return &pag->pag_meta_resv;
case XFS_AG_RESV_RMAPBT:
return &pag->pag_rmapbt_resv;
+ case XFS_AG_RESV_RTMETADATA:
+ return &pag->pag_mount->m_rtmeta_resv;
default:
return NULL;
}