@@ -594,7 +594,7 @@ struct xfs_scrub_rmap_ownedby_info {
* document why they need to do so.
*/
if (force_log) {
- error = xfs_scrub_checkpoint_log(mp);
+ error = xfs_log_checkpoint(mp);
if (error)
return error;
}
@@ -606,20 +606,6 @@ struct xfs_scrub_rmap_ownedby_info {
return xfs_scrub_ag_init(sc, sc->sm->sm_agno, &sc->sa);
}
-/* Push everything out of the log onto disk. */
-int
-xfs_scrub_checkpoint_log(
- struct xfs_mount *mp)
-{
- int error;
-
- error = xfs_log_force(mp, XFS_LOG_SYNC);
- if (error)
- return error;
- xfs_ail_push_all_sync(mp->m_ail);
- return 0;
-}
-
/*
* Given an inode and the scrub control structure, grab either the
* inode referenced in the control structure or the inode passed in.
@@ -83,7 +83,6 @@ void xfs_scrub_fblock_set_warning(struct xfs_scrub_context *sc, int whichfork,
xfs_fileoff_t offset);
void xfs_scrub_set_incomplete(struct xfs_scrub_context *sc);
-int xfs_scrub_checkpoint_log(struct xfs_mount *mp);
/* Are we set up for a cross-referencing check? */
bool xfs_scrub_should_check_xref(struct xfs_scrub_context *sc, int *error,
@@ -4095,3 +4095,17 @@ struct xlog_ticket *
return valid;
}
+
+/* Push everything out of the log onto disk. */
+int
+xfs_log_checkpoint(
+ struct xfs_mount *mp)
+{
+ int error;
+
+ error = xfs_log_force(mp, XFS_LOG_SYNC);
+ if (error)
+ return error;
+ xfs_ail_push_all_sync(mp->m_ail);
+ return 0;
+}
@@ -165,5 +165,6 @@ void xfs_log_commit_cil(struct xfs_mount *mp, struct xfs_trans *tp,
void xfs_log_work_queue(struct xfs_mount *mp);
void xfs_log_quiesce(struct xfs_mount *mp);
bool xfs_log_check_lsn(struct xfs_mount *, xfs_lsn_t);
+int xfs_log_checkpoint(struct xfs_mount *mp);
#endif /* __XFS_LOG_H__ */
The upcoming online label patch will require forcing the superblock change from the log to the actual on-disk superblock, so move this log checkpoint function out for general use. Signed-off-by: Eric Sandeen <sandeen@redhat.com> --- fs/xfs/scrub/common.c | 16 +--------------- fs/xfs/scrub/common.h | 1 - fs/xfs/xfs_log.c | 14 ++++++++++++++ fs/xfs/xfs_log.h | 1 + 4 files changed, 16 insertions(+), 16 deletions(-)