#define xfs_trans_roll libxfs_trans_roll
#define xfs_trim_extent libxfs_trim_extent
+#define xfs_update_secondary_sbs libxfs_update_secondary_sbs
+
#define xfs_validate_stripe_geometry libxfs_validate_stripe_geometry
#define xfs_verify_agbno libxfs_verify_agbno
#define xfs_verify_agino libxfs_verify_agino
int rt_spec; /* Realtime dev specified as option */
int convert_lazy_count; /* Convert lazy-count mode on/off */
int lazy_count; /* What to set if to if converting */
+bool features_changed; /* did we change superblock feature bits? */
bool add_inobtcount; /* add inode btree counts to AGI */
bool add_bigtime; /* add support for timestamps up to 2486 */
extern int rt_spec; /* Realtime dev specified as option */
extern int convert_lazy_count; /* Convert lazy-count mode on/off */
extern int lazy_count; /* What to set if to if converting */
+extern bool features_changed; /* did we change superblock feature bits? */
extern bool add_inobtcount; /* add inode btree counts to AGI */
extern bool add_bigtime; /* add support for timestamps up to 2486 */
error);
libxfs_buf_relse(bp);
+ features_changed = true;
}
/*
libxfs_buf_mark_dirty(sbp);
libxfs_buf_relse(sbp);
+ /*
+ * If we upgraded V5 filesystem features, we need to update the
+ * secondary superblocks to include the new feature bits. Don't set
+ * NEEDSREPAIR on the secondaries.
+ */
+ if (features_changed) {
+ mp->m_sb.sb_features_incompat &=
+ ~XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR;
+ error = -libxfs_update_secondary_sbs(mp);
+ if (error)
+ do_error(_("upgrading features of secondary supers"));
+ mp->m_sb.sb_features_incompat |=
+ XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR;
+ }
+
/*
* Done. Flush all cached buffers and inodes first to ensure all
* verifiers are run (where we discover the max metadata LSN), reformat