diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-01 11:15:56 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-10-22 16:40:57 -0700 |
commit | 0548a5ad7bb1c576db0046fc48e4da8c43a93386 (patch) | |
tree | 3c7231f7515f8f7379f28260bd83672872d2c18e /fs/xfs/xfs_rtalloc.c | |
parent | ba7fcdaf10158e959c21f79658b2d73706ffaa6a (diff) |
xfs: allow inode-based btrees to reserve space in the data devicereserve-rt-metadata-space_2021-10-22
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 51e3c57cef98..0fa5dd8c6433 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -1138,6 +1138,14 @@ error_cancel: /* Update secondary superblocks now the physical grow has completed */ error = xfs_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: /* @@ -1283,6 +1291,21 @@ xfs_rtmount_init( 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; +} + /* * Realtime metadata files are not quite regular files because userspace can't * access the realtime bitmap directly, and because we take the ILOCK of the rt |