Skip to content

Commit 7249c95

Browse files
committed
xfs: make xfs_growfs_rt update secondary superblocks
When we call growfs on the data device, we update the secondary superblocks to reflect the updated filesystem geometry. We need to do this for growfs on the realtime volume too, because a future xfs_repair run could try to fix the filesystem using a backup superblock. This was observed by the online superblock scrubbers while running xfs/233. One can also trigger this by growing an rt volume, cycling the mount, and creating new rt files. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
1 parent f4c32e8 commit 7249c95

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

fs/xfs/xfs_rtalloc.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "xfs_trans_space.h"
1919
#include "xfs_icache.h"
2020
#include "xfs_rtalloc.h"
21-
21+
#include "xfs_sb.h"
2222

2323
/*
2424
* Read and return the summary information for a given extent size,
@@ -1102,7 +1102,13 @@ xfs_growfs_rt(
11021102
if (error)
11031103
break;
11041104
}
1105+
if (error)
1106+
goto out_free;
1107+
1108+
/* Update secondary superblocks now the physical grow has completed */
1109+
error = xfs_update_secondary_sbs(mp);
11051110

1111+
out_free:
11061112
/*
11071113
* Free the fake mp structure.
11081114
*/

0 commit comments

Comments
 (0)