All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: linux-xfs <linux-xfs@vger.kernel.org>
Subject: [PATCH 3/5] xfs: move xfs_scrub_checkpoint_log to xfs_log_checkpoint for general use
Date: Mon, 30 Apr 2018 10:45:13 -0500	[thread overview]
Message-ID: <c57f7f1e-f5f5-56f3-b85c-4c8f6edfba0c@sandeen.net> (raw)
In-Reply-To: <eb592fc3-3165-5ec7-3896-b798fc7f6502@redhat.com>

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(-)

diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c
index 8ed91d5..6044399 100644
--- a/fs/xfs/scrub/common.c
+++ b/fs/xfs/scrub/common.c
@@ -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.
diff --git a/fs/xfs/scrub/common.h b/fs/xfs/scrub/common.h
index deaf604..a88ae07 100644
--- a/fs/xfs/scrub/common.h
+++ b/fs/xfs/scrub/common.h
@@ -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,
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 2fcd9ed..326fbe8 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -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;
+}
diff --git a/fs/xfs/xfs_log.h b/fs/xfs/xfs_log.h
index fa8ad31..df2d5d2 100644
--- a/fs/xfs/xfs_log.h
+++ b/fs/xfs/xfs_log.h
@@ -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__ */
-- 
1.8.3.1


  parent reply	other threads:[~2018-04-30 15:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-30 15:40 [PATCH 0/5] xfs: add online relabel capabilities Eric Sandeen
2018-04-30 15:42 ` [PATCH 1/5] fs: hoist BTRFS_IOC_[SG]ET_FSLABEL to vfs Eric Sandeen
2018-05-02 14:30   ` Darrick J. Wong
2018-04-30 15:43 ` [PATCH 2/5] xfs: factor out secondary superblock updates Eric Sandeen
2018-05-01 14:17   ` Brian Foster
2018-05-01 14:19     ` Eric Sandeen
2018-05-02 14:29   ` Darrick J. Wong
2018-04-30 15:45 ` Eric Sandeen [this message]
2018-05-01 23:04   ` [PATCH 3/5] xfs: move xfs_scrub_checkpoint_log to xfs_log_checkpoint for general use Eric Sandeen
2018-04-30 15:46 ` [PATCH 4/5] xfs: implement online get/set fs label Eric Sandeen
2018-05-01 14:18   ` Brian Foster
2018-05-01 14:27     ` Eric Sandeen
2018-05-01 14:42       ` Brian Foster
2018-05-01 14:49         ` Darrick J. Wong
2018-05-01 15:01         ` Eric Sandeen
2018-05-01 22:11   ` Dave Chinner
2018-05-01 22:20     ` Eric Sandeen
2018-05-01 23:04   ` [PATCH 4/5 V2] " Eric Sandeen
2018-05-02 10:48     ` Brian Foster
2018-05-02 14:24     ` Darrick J. Wong
2018-05-02 14:28       ` Eric Sandeen
2018-05-02 14:38         ` Darrick J. Wong
2018-05-02 21:57         ` Dave Chinner
2018-04-30 15:48 ` [PATCH 5/5] xfs_io: add label command Eric Sandeen
2018-05-02 14:37   ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c57f7f1e-f5f5-56f3-b85c-4c8f6edfba0c@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.