]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs: repair secondary realtime group superblocks
authorDarrick J. Wong <djwong@kernel.org>
Tue, 7 Mar 2023 03:55:29 +0000 (19:55 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 22 Nov 2023 23:03:34 +0000 (15:03 -0800)
Repair secondary realtime group superblocks.  They're not critical for
anything, but some consistency would be a good idea.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libxfs/xfs_rtgroup.c
libxfs/xfs_rtgroup.h

index fff5c29e05cefe4b964885c7017e394abbfbcf42..b8cba85136bcd7457faa84902e18b8d97df222a1 100644 (file)
@@ -418,7 +418,7 @@ xfs_rtgroup_log_super(
 }
 
 /* Initialize a secondary realtime superblock. */
-static int
+int
 xfs_rtgroup_init_secondary_super(
        struct xfs_mount        *mp,
        xfs_rgnumber_t          rgno,
index 8e3a965f7f326d2f9abfd62d9dfbd44268a2ad1f..1f92a84fce91f10cf85337e3d67a7ddcba5f21e9 100644 (file)
@@ -221,6 +221,8 @@ void xfs_rtgroup_update_super(struct xfs_buf *rtsb_bp,
                const struct xfs_buf *sb_bp);
 void xfs_rtgroup_log_super(struct xfs_trans *tp, const struct xfs_buf *sb_bp);
 int xfs_rtgroup_update_secondary_sbs(struct xfs_mount *mp);
+int xfs_rtgroup_init_secondary_super(struct xfs_mount *mp, xfs_rgnumber_t rgno,
+               struct xfs_buf **bpp);
 
 /* Lock the rt bitmap inode in exclusive mode */
 #define XFS_RTGLOCK_BITMAP             (1U << 0)
@@ -241,6 +243,7 @@ int xfs_rtgroup_get_geometry(struct xfs_rtgroup *rtg,
 # define xfs_rtgroup_update_super(bp, sb_bp)   ((void)0)
 # define xfs_rtgroup_log_super(tp, sb_bp)      ((void)0)
 # define xfs_rtgroup_update_secondary_sbs(mp)  (0)
+# define xfs_rtgroup_init_secondary_super(mp, rgno, bpp)       (-EOPNOTSUPP)
 # define xfs_rtgroup_lock(tp, rtg, gf)         ((void)0)
 # define xfs_rtgroup_unlock(rtg, gf)           ((void)0)
 # define xfs_rtgroup_get_geometry(rtg, rgeo)   (-EOPNOTSUPP)