diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-08-15 12:35:27 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-11-09 19:07:57 -0800 |
commit | 16aaea027f36d2dcd0f4487aee9967f99caccb1f (patch) | |
tree | 5d901e88c272a8ed5ea4667c967433090e2aa9bc | |
parent | 704411ea482273e1f92a2c1a1d8fa6f282353046 (diff) |
xfs: always update secondary rt supers when we update secondary fs supers
Make sure that any update to the secondary superblocks in the data
section are also echoed to the secondary superblocks in the realtime
section.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
-rw-r--r-- | fs/xfs/xfs_fsops.c | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_ioctl.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index 13851c0d640b..2da86f05e0e5 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c @@ -21,6 +21,7 @@ #include "xfs_ag.h" #include "xfs_ag_resv.h" #include "xfs_trace.h" +#include "xfs_rtgroup.h" /* * Write new AG headers to disk. Non-transactional, but need to be @@ -306,6 +307,9 @@ xfs_growfs_data( /* Update secondary superblocks now the physical grow has completed */ error = xfs_update_secondary_sbs(mp); + if (error) + goto out_error; + error = xfs_rtgroup_update_secondary_sbs(mp); out_error: /* diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 0735090cb5d6..cc53f9d3bf0c 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -39,6 +39,7 @@ #include "xfs_ioctl.h" #include "xfs_xattr.h" #include "xfs_rtbitmap.h" +#include "xfs_rtgroup.h" #include <linux/mount.h> #include <linux/namei.h> @@ -1723,6 +1724,8 @@ xfs_ioc_setlabel( */ mutex_lock(&mp->m_growlock); error = xfs_update_secondary_sbs(mp); + if (!error) + error = xfs_rtgroup_update_secondary_sbs(mp); mutex_unlock(&mp->m_growlock); invalidate_bdev(bdev); |