diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-07-14 11:15:25 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-10-14 14:17:11 -0700 |
commit | e86a2b6118f2b221b41529e8ac784229459e1c0b (patch) | |
tree | 26cc9ddf41fb7c735af3545e2f51979d9cc9efda /fs/xfs/xfs_rtalloc.c | |
parent | a7da613603a4e7b3e6949973fdeb7994586a2809 (diff) |
xfs: allow inode-based btrees to reserve space in the data devicereserve-rt-metadata-space_2022-10-14
Create a new space reservation scheme so that btree metadata for the
realtime volume can reserve space in the data device to avoid space
underruns.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index f8f0557dc46c..7a94fb5b5a7f 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -1321,6 +1321,14 @@ error_cancel: goto out_free; error = xfs_rtgroup_update_secondary_sbs(mp); + if (error) + goto out_free; + + /* Reset the rt metadata btree space reservations. */ + xfs_rt_resv_free(mp); + error = xfs_rt_resv_init(mp); + if (error == -ENOSPC) + error = 0; out_free: /* @@ -1554,6 +1562,21 @@ xfs_rtalloc_reinit_frextents( return 0; } +/* Free space reservations for rt metadata inodes. */ +void +xfs_rt_resv_free( + struct xfs_mount *mp) +{ +} + +/* Reserve space for rt metadata inodes' space expansion. */ +int +xfs_rt_resv_init( + struct xfs_mount *mp) +{ + return 0; +} + static inline int __xfs_rt_iget( struct xfs_mount *mp, |