linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] xfs-4.19: fix bogus summary counters on mount
@ 2018-07-18 23:39 Darrick J. Wong
  2018-07-18 23:39 ` [PATCH 1/3] xfs: detect and fix bad summary counts at mount Darrick J. Wong
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Darrick J. Wong @ 2018-07-18 23:39 UTC (permalink / raw)
  To: darrick.wong; +Cc: linux-xfs

Hi all,

This series enhances XFS' ability to detect and recover from obviously
incorrect summary counts.  Some of this is in response to recent bug
reports about xfs allowing mounts with obviously incorrect counts,
though the last two patches are intended to integrate with future online
fsck features.

The first patch detects obviously bad summary counters at mount time,
forces a recomputation of the counters after log recovery (if any)
completes, and fails the mount if the counts are still obviously bad.
The second and third patches deal with forcing a recalculation at the
next mount if the counts are found to be slightly incorrect, which is a
situation that will be detected by the fscounter online fsck in a
subsequent patch series.

This series sits on top of the cleanups I sent earlier today.

Comments and questions are, as always, welcome.

--D

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/3] xfs: detect and fix bad summary counts at mount
  2018-07-18 23:39 [PATCH 0/3] xfs-4.19: fix bogus summary counters on mount Darrick J. Wong
@ 2018-07-18 23:39 ` Darrick J. Wong
  2018-07-19 16:36   ` Christoph Hellwig
  2018-07-18 23:39 ` [PATCH 2/3] xfs: refactor unmount record write Darrick J. Wong
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Darrick J. Wong @ 2018-07-18 23:39 UTC (permalink / raw)
  To: darrick.wong; +Cc: linux-xfs, Filippo Giunchedi

From: Darrick J. Wong <darrick.wong@oracle.com>

Filippo Giunchedi complained that xfs doesn't even perform basic sanity
checks of the fs summary counters at mount time.  Therefore, recalculate
the summary counters from the AGFs after log recovery if the counts were
bad (or we had to recover the fs).  Enhance the recalculation routine to
fail the mount entirely if the new values are also obviously incorrect.

We use a mount state flag to record the "bad summary count" state so
that the (subsequent) online fsck patches can detect subtlely incorrect
counts and set the flag; clear it userspace asks for a repair; or force
a recalculation at the next mount if nobody fixes it by unmount time.

Reported-by: Filippo Giunchedi <fgiunchedi@wikimedia.org>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 fs/xfs/libxfs/xfs_sb.c |   21 +++++++++++--
 fs/xfs/xfs_mount.c     |   80 ++++++++++++++++++++++++++++++++----------------
 fs/xfs/xfs_mount.h     |    1 +
 3 files changed, 73 insertions(+), 29 deletions(-)


diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c
index 350119eeaecb..b3ad15956366 100644
--- a/fs/xfs/libxfs/xfs_sb.c
+++ b/fs/xfs/libxfs/xfs_sb.c
@@ -804,6 +804,7 @@ xfs_initialize_perag_data(
 	uint64_t	bfree = 0;
 	uint64_t	bfreelst = 0;
 	uint64_t	btree = 0;
+	uint64_t	fdblocks;
 	int		error;
 
 	for (index = 0; index < agcount; index++) {
@@ -827,17 +828,31 @@ xfs_initialize_perag_data(
 		btree += pag->pagf_btreeblks;
 		xfs_perag_put(pag);
 	}
+	fdblocks = bfree + bfreelst + btree;
+
+	/*
+	 * If the new summary counts are obviously incorrect, fail the
+	 * mount operation because that implies the AGFs are also corrupt.
+	 * Clear BAD_SUMMARY so that we don't unmount with a dirty log, which
+	 * will prevent xfs_repair from fixing anything.
+	 */
+	if (fdblocks > sbp->sb_dblocks || ifree > ialloc) {
+		xfs_alert(mp, "AGF corruption. Please run xfs_repair.");
+		error = -EFSCORRUPTED;
+		goto out;
+	}
 
 	/* Overwrite incore superblock counters with just-read data */
 	spin_lock(&mp->m_sb_lock);
 	sbp->sb_ifree = ifree;
 	sbp->sb_icount = ialloc;
-	sbp->sb_fdblocks = bfree + bfreelst + btree;
+	sbp->sb_fdblocks = fdblocks;
 	spin_unlock(&mp->m_sb_lock);
 
 	xfs_reinit_percpu_counters(mp);
-
-	return 0;
+out:
+	mp->m_flags &= ~XFS_MOUNT_BAD_SUMMARY;
+	return error;
 }
 
 /*
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index a3378252baa1..60462c35ad4b 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -606,6 +606,56 @@ xfs_default_resblks(xfs_mount_t *mp)
 	return resblks;
 }
 
+/* Ensure the summary counts are correct. */
+STATIC int
+xfs_check_summary_counts(
+	struct xfs_mount	*mp)
+{
+	/*
+	 * The AG0 superblock verifier rejects in-progress filesystems,
+	 * so we should never see the flag set this far into mounting.
+	 */
+	if (mp->m_sb.sb_inprogress) {
+		xfs_err(mp, "sb_inprogress set after log recovery??");
+		WARN_ON(1);
+		return -EFSCORRUPTED;
+	}
+
+	/*
+	 * Now the log is mounted, we know if it was an unclean shutdown or
+	 * not. If it was, with the first phase of recovery has completed, we
+	 * have consistent AG blocks on disk. We have not recovered EFIs yet,
+	 * but they are recovered transactionally in the second recovery phase
+	 * later.
+	 *
+	 * If the log was clean when we mounted, we can check the summary
+	 * counters.  If any of them are obviously incorrect, we can recompute
+	 * them from the AGF headers in the next step.
+	 */
+	if (XFS_LAST_UNMOUNT_WAS_CLEAN(mp) &&
+	    (mp->m_sb.sb_fdblocks > mp->m_sb.sb_dblocks ||
+	     mp->m_sb.sb_ifree > mp->m_sb.sb_icount))
+		mp->m_flags |= XFS_MOUNT_BAD_SUMMARY;
+
+	/*
+	 * We can safely re-initialise incore superblock counters from the
+	 * per-ag data. These may not be correct if the filesystem was not
+	 * cleanly unmounted, so we waited for recovery to finish before doing
+	 * this.
+	 *
+	 * If the filesystem was cleanly unmounted or the previous check did
+	 * not flag anything weird, then we can trust the values in the
+	 * superblock to be correct and we don't need to do anything here.
+	 * Otherwise, recalculate the summary counters.
+	 */
+	if ((!xfs_sb_version_haslazysbcount(&mp->m_sb) ||
+	     XFS_LAST_UNMOUNT_WAS_CLEAN(mp)) &&
+	    !(mp->m_flags & XFS_MOUNT_BAD_SUMMARY))
+		return 0;
+
+	return xfs_initialize_perag_data(mp, mp->m_sb.sb_agcount);
+}
+
 /*
  * This function does the following on an initial mount of a file system:
  *	- reads the superblock from disk and init the mount struct
@@ -831,32 +881,10 @@ xfs_mountfs(
 		goto out_fail_wait;
 	}
 
-	/*
-	 * Now the log is mounted, we know if it was an unclean shutdown or
-	 * not. If it was, with the first phase of recovery has completed, we
-	 * have consistent AG blocks on disk. We have not recovered EFIs yet,
-	 * but they are recovered transactionally in the second recovery phase
-	 * later.
-	 *
-	 * Hence we can safely re-initialise incore superblock counters from
-	 * the per-ag data. These may not be correct if the filesystem was not
-	 * cleanly unmounted, so we need to wait for recovery to finish before
-	 * doing this.
-	 *
-	 * If the filesystem was cleanly unmounted, then we can trust the
-	 * values in the superblock to be correct and we don't need to do
-	 * anything here.
-	 *
-	 * If we are currently making the filesystem, the initialisation will
-	 * fail as the perag data is in an undefined state.
-	 */
-	if (xfs_sb_version_haslazysbcount(&mp->m_sb) &&
-	    !XFS_LAST_UNMOUNT_WAS_CLEAN(mp) &&
-	     !mp->m_sb.sb_inprogress) {
-		error = xfs_initialize_perag_data(mp, sbp->sb_agcount);
-		if (error)
-			goto out_log_dealloc;
-	}
+	/* Make sure the summary counts are ok. */
+	error = xfs_check_summary_counts(mp);
+	if (error)
+		goto out_log_dealloc;
 
 	/*
 	 * Get and sanity-check the root inode.
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index 245349d1e23f..f08907db9c61 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -202,6 +202,7 @@ typedef struct xfs_mount {
 						   must be synchronous except
 						   for space allocations */
 #define XFS_MOUNT_UNMOUNTING	(1ULL << 1)	/* filesystem is unmounting */
+#define XFS_MOUNT_BAD_SUMMARY	(1ULL << 2)	/* summary counters are bad */
 #define XFS_MOUNT_WAS_CLEAN	(1ULL << 3)
 #define XFS_MOUNT_FS_SHUTDOWN	(1ULL << 4)	/* atomic stop of all filesystem
 						   operations, typically for


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/3] xfs: refactor unmount record write
  2018-07-18 23:39 [PATCH 0/3] xfs-4.19: fix bogus summary counters on mount Darrick J. Wong
  2018-07-18 23:39 ` [PATCH 1/3] xfs: detect and fix bad summary counts at mount Darrick J. Wong
@ 2018-07-18 23:39 ` Darrick J. Wong
  2018-07-19 16:39   ` Christoph Hellwig
  2018-07-19 17:41   ` [PATCH v2 " Darrick J. Wong
  2018-07-18 23:39 ` [PATCH 3/3] xfs: force summary counter recalc at next mount Darrick J. Wong
  2018-07-19 16:45 ` [RFC PATCH 4/3] xfstests: test mount time summary counter check and fix Darrick J. Wong
  3 siblings, 2 replies; 12+ messages in thread
From: Darrick J. Wong @ 2018-07-18 23:39 UTC (permalink / raw)
  To: darrick.wong; +Cc: linux-xfs

From: Darrick J. Wong <darrick.wong@oracle.com>

Refactor the writing of the unmount record into a separate helper.  No
functionality changes.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 fs/xfs/xfs_log.c |  130 ++++++++++++++++++++++++++++--------------------------
 1 file changed, 68 insertions(+), 62 deletions(-)


diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 5e56f3b93d4b..f114e9031af8 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -826,6 +826,73 @@ xfs_log_mount_cancel(
  * deallocation must not be done until source-end.
  */
 
+/* Actually write the unmount record to disk. */
+static void
+xfs_log_write_unmount_record(
+	struct xfs_mount	*mp)
+{
+	/* the data section must be 32 bit size aligned */
+	struct {
+		uint16_t magic;
+		uint16_t pad1;
+		uint32_t pad2; /* may as well make it 64 bits */
+	} magic = {
+		.magic = XLOG_UNMOUNT_TYPE,
+	};
+	struct xfs_log_iovec reg = {
+		.i_addr = &magic,
+		.i_len = sizeof(magic),
+		.i_type = XLOG_REG_TYPE_UNMOUNT,
+	};
+	struct xfs_log_vec vec = {
+		.lv_niovecs = 1,
+		.lv_iovecp = &reg,
+	};
+	struct xlog		*log = mp->m_log;
+	struct xlog_in_core	*iclog;
+	struct xlog_ticket	*tic = NULL;
+	xfs_lsn_t		lsn;
+	int			error;
+
+	error = xfs_log_reserve(mp, 600, 1, &tic, XFS_LOG, 0);
+	if (error)
+		goto out_err;
+
+	/* remove inited flag, and account for space used */
+	tic->t_flags = 0;
+	tic->t_curr_res -= sizeof(magic);
+	error = xlog_write(log, &vec, tic, &lsn, NULL, XLOG_UNMOUNT_TRANS);
+	/*
+	 * At this point, we're umounting anyway,
+	 * so there's no point in transitioning log state
+	 * to IOERROR. Just continue...
+	 */
+out_err:
+	if (error)
+		xfs_alert(mp, "%s: unmount record failed", __func__);
+
+	spin_lock(&log->l_icloglock);
+	iclog = log->l_iclog;
+	atomic_inc(&iclog->ic_refcnt);
+	xlog_state_want_sync(log, iclog);
+	spin_unlock(&log->l_icloglock);
+	error = xlog_state_release_iclog(log, iclog);
+
+	spin_lock(&log->l_icloglock);
+	if (!(iclog->ic_state == XLOG_STATE_ACTIVE ||
+	      iclog->ic_state == XLOG_STATE_DIRTY) &&
+	    !XLOG_FORCED_SHUTDOWN(log))
+		xlog_wait(&iclog->ic_force_wait, &log->l_icloglock);
+	else
+		spin_unlock(&log->l_icloglock);
+
+	if (tic) {
+		trace_xfs_log_umount_write(log, tic);
+		xlog_ungrant_log_space(log, tic);
+		xfs_log_ticket_put(tic);
+	}
+}
+
 /*
  * Unmount record used to have a string "Unmount filesystem--" in the
  * data section where the "Un" was really a magic number (XLOG_UNMOUNT_TYPE).
@@ -842,8 +909,6 @@ xfs_log_unmount_write(xfs_mount_t *mp)
 #ifdef DEBUG
 	xlog_in_core_t	 *first_iclog;
 #endif
-	xlog_ticket_t	*tic = NULL;
-	xfs_lsn_t	 lsn;
 	int		 error;
 
 	/*
@@ -870,66 +935,7 @@ xfs_log_unmount_write(xfs_mount_t *mp)
 	} while (iclog != first_iclog);
 #endif
 	if (! (XLOG_FORCED_SHUTDOWN(log))) {
-		error = xfs_log_reserve(mp, 600, 1, &tic, XFS_LOG, 0);
-		if (!error) {
-			/* the data section must be 32 bit size aligned */
-			struct {
-			    uint16_t magic;
-			    uint16_t pad1;
-			    uint32_t pad2; /* may as well make it 64 bits */
-			} magic = {
-				.magic = XLOG_UNMOUNT_TYPE,
-			};
-			struct xfs_log_iovec reg = {
-				.i_addr = &magic,
-				.i_len = sizeof(magic),
-				.i_type = XLOG_REG_TYPE_UNMOUNT,
-			};
-			struct xfs_log_vec vec = {
-				.lv_niovecs = 1,
-				.lv_iovecp = &reg,
-			};
-
-			/* remove inited flag, and account for space used */
-			tic->t_flags = 0;
-			tic->t_curr_res -= sizeof(magic);
-			error = xlog_write(log, &vec, tic, &lsn,
-					   NULL, XLOG_UNMOUNT_TRANS);
-			/*
-			 * At this point, we're umounting anyway,
-			 * so there's no point in transitioning log state
-			 * to IOERROR. Just continue...
-			 */
-		}
-
-		if (error)
-			xfs_alert(mp, "%s: unmount record failed", __func__);
-
-
-		spin_lock(&log->l_icloglock);
-		iclog = log->l_iclog;
-		atomic_inc(&iclog->ic_refcnt);
-		xlog_state_want_sync(log, iclog);
-		spin_unlock(&log->l_icloglock);
-		error = xlog_state_release_iclog(log, iclog);
-
-		spin_lock(&log->l_icloglock);
-		if (!(iclog->ic_state == XLOG_STATE_ACTIVE ||
-		      iclog->ic_state == XLOG_STATE_DIRTY)) {
-			if (!XLOG_FORCED_SHUTDOWN(log)) {
-				xlog_wait(&iclog->ic_force_wait,
-							&log->l_icloglock);
-			} else {
-				spin_unlock(&log->l_icloglock);
-			}
-		} else {
-			spin_unlock(&log->l_icloglock);
-		}
-		if (tic) {
-			trace_xfs_log_umount_write(log, tic);
-			xlog_ungrant_log_space(log, tic);
-			xfs_log_ticket_put(tic);
-		}
+		xfs_log_write_unmount_record(mp);
 	} else {
 		/*
 		 * We're already in forced_shutdown mode, couldn't


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/3] xfs: force summary counter recalc at next mount
  2018-07-18 23:39 [PATCH 0/3] xfs-4.19: fix bogus summary counters on mount Darrick J. Wong
  2018-07-18 23:39 ` [PATCH 1/3] xfs: detect and fix bad summary counts at mount Darrick J. Wong
  2018-07-18 23:39 ` [PATCH 2/3] xfs: refactor unmount record write Darrick J. Wong
@ 2018-07-18 23:39 ` Darrick J. Wong
  2018-07-19 16:40   ` Christoph Hellwig
  2018-07-19 16:45 ` [RFC PATCH 4/3] xfstests: test mount time summary counter check and fix Darrick J. Wong
  3 siblings, 1 reply; 12+ messages in thread
From: Darrick J. Wong @ 2018-07-18 23:39 UTC (permalink / raw)
  To: darrick.wong; +Cc: linux-xfs

From: Darrick J. Wong <darrick.wong@oracle.com>

Use the "bad summary count" mount flag from the previous patch to skip
writing the unmount record to force log recovery at the next mount,
which will recalculate the summary counters for us.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 fs/xfs/libxfs/xfs_errortag.h |    4 +++-
 fs/xfs/xfs_error.c           |    3 +++
 fs/xfs/xfs_log.c             |   16 +++++++++++++++-
 fs/xfs/xfs_mount.c           |   13 +++++++++++++
 fs/xfs/xfs_mount.h           |    1 +
 5 files changed, 35 insertions(+), 2 deletions(-)


diff --git a/fs/xfs/libxfs/xfs_errortag.h b/fs/xfs/libxfs/xfs_errortag.h
index b9974e7a8e6e..66077a105cbb 100644
--- a/fs/xfs/libxfs/xfs_errortag.h
+++ b/fs/xfs/libxfs/xfs_errortag.h
@@ -53,7 +53,8 @@
 #define XFS_ERRTAG_LOG_ITEM_PIN				30
 #define XFS_ERRTAG_BUF_LRU_REF				31
 #define XFS_ERRTAG_FORCE_SCRUB_REPAIR			32
-#define XFS_ERRTAG_MAX					33
+#define XFS_ERRTAG_FORCE_SUMMARY_RECALC			33
+#define XFS_ERRTAG_MAX					34
 
 /*
  * Random factors for above tags, 1 means always, 2 means 1/2 time, etc.
@@ -91,5 +92,6 @@
 #define XFS_RANDOM_LOG_ITEM_PIN				1
 #define XFS_RANDOM_BUF_LRU_REF				2
 #define XFS_RANDOM_FORCE_SCRUB_REPAIR			1
+#define XFS_RANDOM_FORCE_SUMMARY_RECALC			1
 
 #endif /* __XFS_ERRORTAG_H_ */
diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c
index 0470114a8d80..9866f542e77b 100644
--- a/fs/xfs/xfs_error.c
+++ b/fs/xfs/xfs_error.c
@@ -50,6 +50,7 @@ static unsigned int xfs_errortag_random_default[] = {
 	XFS_RANDOM_LOG_ITEM_PIN,
 	XFS_RANDOM_BUF_LRU_REF,
 	XFS_RANDOM_FORCE_SCRUB_REPAIR,
+	XFS_RANDOM_FORCE_SUMMARY_RECALC,
 };
 
 struct xfs_errortag_attr {
@@ -157,6 +158,7 @@ XFS_ERRORTAG_ATTR_RW(log_bad_crc,	XFS_ERRTAG_LOG_BAD_CRC);
 XFS_ERRORTAG_ATTR_RW(log_item_pin,	XFS_ERRTAG_LOG_ITEM_PIN);
 XFS_ERRORTAG_ATTR_RW(buf_lru_ref,	XFS_ERRTAG_BUF_LRU_REF);
 XFS_ERRORTAG_ATTR_RW(force_repair,	XFS_ERRTAG_FORCE_SCRUB_REPAIR);
+XFS_ERRORTAG_ATTR_RW(bad_summary,	XFS_ERRTAG_FORCE_SUMMARY_RECALC);
 
 static struct attribute *xfs_errortag_attrs[] = {
 	XFS_ERRORTAG_ATTR_LIST(noerror),
@@ -192,6 +194,7 @@ static struct attribute *xfs_errortag_attrs[] = {
 	XFS_ERRORTAG_ATTR_LIST(log_item_pin),
 	XFS_ERRORTAG_ATTR_LIST(buf_lru_ref),
 	XFS_ERRORTAG_ATTR_LIST(force_repair),
+	XFS_ERRORTAG_ATTR_LIST(bad_summary),
 	NULL,
 };
 
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index f114e9031af8..dc805f2973a0 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -852,16 +852,30 @@ xfs_log_write_unmount_record(
 	struct xlog_in_core	*iclog;
 	struct xlog_ticket	*tic = NULL;
 	xfs_lsn_t		lsn;
+	uint			flags = XLOG_UNMOUNT_TRANS;
 	int			error;
 
 	error = xfs_log_reserve(mp, 600, 1, &tic, XFS_LOG, 0);
 	if (error)
 		goto out_err;
 
+	/*
+	 * If we think the summary counters are bad, clear the unmount header
+	 * flag in the unmount record so that the summary counters will be
+	 * recalculated during log recovery at next mount.  Refer to
+	 * xlog_check_unmount_rec for more details.
+	 */
+	if (XFS_TEST_ERROR((mp->m_flags & XFS_MOUNT_BAD_SUMMARY), mp,
+			XFS_ERRTAG_FORCE_SUMMARY_RECALC)) {
+		xfs_alert(mp, "%s: will fix summary counters at next mount",
+				__func__);
+		flags &= ~XLOG_UNMOUNT_TRANS;
+	}
+
 	/* remove inited flag, and account for space used */
 	tic->t_flags = 0;
 	tic->t_curr_res -= sizeof(magic);
-	error = xlog_write(log, &vec, tic, &lsn, NULL, XLOG_UNMOUNT_TRANS);
+	error = xlog_write(log, &vec, tic, &lsn, NULL, flags);
 	/*
 	 * At this point, we're umounting anyway,
 	 * so there's no point in transitioning log state
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 60462c35ad4b..4fb361cde32a 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -1423,3 +1423,16 @@ xfs_dev_is_read_only(
 	}
 	return 0;
 }
+
+/* Force the summary counters to be recalculated at next mount. */
+void
+xfs_force_summary_recalc(
+	struct xfs_mount	*mp)
+{
+	if (!xfs_sb_version_haslazysbcount(&mp->m_sb))
+		return;
+
+	spin_lock(&mp->m_sb_lock);
+	mp->m_flags |= XFS_MOUNT_BAD_SUMMARY;
+	spin_unlock(&mp->m_sb_lock);
+}
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index f08907db9c61..540353a51478 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -435,5 +435,6 @@ int	xfs_zero_extent(struct xfs_inode *ip, xfs_fsblock_t start_fsb,
 
 struct xfs_error_cfg * xfs_error_get_cfg(struct xfs_mount *mp,
 		int error_class, int error);
+void xfs_force_summary_recalc(struct xfs_mount *mp);
 
 #endif	/* __XFS_MOUNT_H__ */


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] xfs: detect and fix bad summary counts at mount
  2018-07-18 23:39 ` [PATCH 1/3] xfs: detect and fix bad summary counts at mount Darrick J. Wong
@ 2018-07-19 16:36   ` Christoph Hellwig
  0 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2018-07-19 16:36 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs, Filippo Giunchedi

Looks fine:

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/3] xfs: refactor unmount record write
  2018-07-18 23:39 ` [PATCH 2/3] xfs: refactor unmount record write Darrick J. Wong
@ 2018-07-19 16:39   ` Christoph Hellwig
  2018-07-19 17:40     ` Darrick J. Wong
  2018-07-19 17:41   ` [PATCH v2 " Darrick J. Wong
  1 sibling, 1 reply; 12+ messages in thread
From: Christoph Hellwig @ 2018-07-19 16:39 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs

Looks generally fine, but some tiny nitpicks:

> +	/* the data section must be 32 bit size aligned */
> +	struct {
> +		uint16_t magic;
> +		uint16_t pad1;
> +		uint32_t pad2; /* may as well make it 64 bits */
> +	} magic = {
> +		.magic = XLOG_UNMOUNT_TYPE,
> +	};

Can we please give this structure type a name and move it to
xfs_log_format.h?  They way this had been done always irked me.

> +	/*
> +	 * At this point, we're umounting anyway,
> +	 * so there's no point in transitioning log state
> +	 * to IOERROR. Just continue...
> +	 */

Use up all 80 lines, please.

> +	if (!(iclog->ic_state == XLOG_STATE_ACTIVE ||
> +	      iclog->ic_state == XLOG_STATE_DIRTY) &&
> +	    !XLOG_FORCED_SHUTDOWN(log))
> +		xlog_wait(&iclog->ic_force_wait, &log->l_icloglock);
> +	else
> +		spin_unlock(&log->l_icloglock);

	switch (iclog->ic_state) {
	default:
		if (!XLOG_FORCED_SHUTDOWN(log)) {
			xlog_wait(&iclog->ic_force_wait, &log->l_icloglock);
			break;
		}
		/*FALLHRU*/
	case XLOG_STATE_ACTIVE:
	case XLOG_STATE_DIRTY:
		spin_unlock(&log->l_icloglock);
		break;


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/3] xfs: force summary counter recalc at next mount
  2018-07-18 23:39 ` [PATCH 3/3] xfs: force summary counter recalc at next mount Darrick J. Wong
@ 2018-07-19 16:40   ` Christoph Hellwig
  2018-07-19 16:44     ` Darrick J. Wong
  0 siblings, 1 reply; 12+ messages in thread
From: Christoph Hellwig @ 2018-07-19 16:40 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

I assume we are going to get a test case ASAP that is going to use this?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/3] xfs: force summary counter recalc at next mount
  2018-07-19 16:40   ` Christoph Hellwig
@ 2018-07-19 16:44     ` Darrick J. Wong
  0 siblings, 0 replies; 12+ messages in thread
From: Darrick J. Wong @ 2018-07-19 16:44 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-xfs

On Thu, Jul 19, 2018 at 09:40:29AM -0700, Christoph Hellwig wrote:
> Looks good:
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> I assume we are going to get a test case ASAP that is going to use this?

DOH.  I was planning to cram that on as patch 4/3 and forgot (blah blah
conference blah).  Will do that now.

--D

> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [RFC PATCH 4/3] xfstests: test mount time summary counter check and fix
  2018-07-18 23:39 [PATCH 0/3] xfs-4.19: fix bogus summary counters on mount Darrick J. Wong
                   ` (2 preceding siblings ...)
  2018-07-18 23:39 ` [PATCH 3/3] xfs: force summary counter recalc at next mount Darrick J. Wong
@ 2018-07-19 16:45 ` Darrick J. Wong
  3 siblings, 0 replies; 12+ messages in thread
From: Darrick J. Wong @ 2018-07-19 16:45 UTC (permalink / raw)
  To: linux-xfs

From: Darrick J. Wong <darrick.wong@oracle.com>

Tests to ensure that the xfs mount code can detect obviously bad fs
summary counters at mount time and fix them.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/xfs/722     |   58 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/722.out |    4 +++
 tests/xfs/723     |   58 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/723.out |    4 +++
 tests/xfs/724     |   66 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/724.out |    4 +++
 tests/xfs/group   |    3 ++
 7 files changed, 197 insertions(+)
 create mode 100755 tests/xfs/722
 create mode 100644 tests/xfs/722.out
 create mode 100755 tests/xfs/723
 create mode 100644 tests/xfs/723.out
 create mode 100755 tests/xfs/724
 create mode 100644 tests/xfs/724.out

diff --git a/tests/xfs/722 b/tests/xfs/722
new file mode 100755
index 00000000..1012bd58
--- /dev/null
+++ b/tests/xfs/722
@@ -0,0 +1,58 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2018 Oracle.  All Rights Reserved.
+#
+# FS QA Test 722
+#
+# Test detection & fixing of bad summary block counts at mount time.
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap '_cleanup; exit $status' 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+
+echo "Format and mount"
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
+echo "test file" > $SCRATCH_MNT/testfile
+
+echo "Fuzz fdblocks"
+_scratch_unmount
+dblocks=$(_scratch_xfs_get_metadata_field dblocks 'sb 0')
+_scratch_xfs_set_metadata_field fdblocks $((dblocks * 2)) 'sb 0' > $seqres.full 2>&1
+
+echo "Detection and Correction"
+_scratch_mount >> $seqres.full 2>&1
+avail=$(stat -c '%a' -f $SCRATCH_MNT)
+total=$(stat -c '%b' -f $SCRATCH_MNT)
+echo "avail: $avail" >> $seqres.full
+echo "total: $total" >> $seqres.full
+test "$avail" -gt "$total" && echo "free space bad: $avail > $total"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/722.out b/tests/xfs/722.out
new file mode 100644
index 00000000..8d1327b7
--- /dev/null
+++ b/tests/xfs/722.out
@@ -0,0 +1,4 @@
+QA output created by 722
+Format and mount
+Fuzz fdblocks
+Detection and Correction
diff --git a/tests/xfs/723 b/tests/xfs/723
new file mode 100755
index 00000000..c068e496
--- /dev/null
+++ b/tests/xfs/723
@@ -0,0 +1,58 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2018 Oracle.  All Rights Reserved.
+#
+# FS QA Test 723
+#
+# Test detection & fixing of bad summary inode counts at mount time.
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap '_cleanup; exit $status' 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+
+echo "Format and mount"
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
+echo "test file" > $SCRATCH_MNT/testfile
+
+echo "Fuzz ifree"
+_scratch_unmount
+icount=$(_scratch_xfs_get_metadata_field icount 'sb 0')
+_scratch_xfs_set_metadata_field ifree $((icount * 2)) 'sb 0' > $seqres.full 2>&1
+
+echo "Detection and Correction"
+_scratch_mount >> $seqres.full 2>&1
+avail=$(stat -c '%d' -f $SCRATCH_MNT)
+total=$(stat -c '%c' -f $SCRATCH_MNT)
+echo "avail: $avail" >> $seqres.full
+echo "total: $total" >> $seqres.full
+test "$avail" -gt "$total" && echo "free inodes bad: $avail > $total"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/723.out b/tests/xfs/723.out
new file mode 100644
index 00000000..e825855a
--- /dev/null
+++ b/tests/xfs/723.out
@@ -0,0 +1,4 @@
+QA output created by 723
+Format and mount
+Fuzz ifree
+Detection and Correction
diff --git a/tests/xfs/724 b/tests/xfs/724
new file mode 100755
index 00000000..f5e44fb6
--- /dev/null
+++ b/tests/xfs/724
@@ -0,0 +1,66 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2018 Oracle.  All Rights Reserved.
+#
+# FS QA Test 724
+#
+# Test detection & fixing of bad summary block counts at mount time.
+# Corrupt the AGFs to test mount failure when mount-fixing fails.
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap '_cleanup; exit $status' 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch_nocheck
+
+echo "Format and mount"
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
+echo "test file" > $SCRATCH_MNT/testfile
+
+echo "Fuzz fdblocks and btreeblks"
+_scratch_unmount
+dblocks=$(_scratch_xfs_get_metadata_field dblocks 'sb 0')
+_scratch_xfs_set_metadata_field fdblocks $((dblocks * 2)) 'sb 0' > $seqres.full 2>&1
+
+aglen=$(_scratch_xfs_get_metadata_field length 'agf 0')
+_scratch_xfs_set_metadata_field btreeblks $aglen 'agf 0' > $seqres.full 2>&1
+
+echo "Detection and Correction"
+if _try_scratch_mount >> $seqres.full 2>&1; then
+	echo "mount should have failed"
+	avail=$(stat -c '%a' -f $SCRATCH_MNT)
+	total=$(stat -c '%b' -f $SCRATCH_MNT)
+	echo "avail: $avail" >> $seqres.full
+	echo "total: $total" >> $seqres.full
+	test "$avail" -gt "$total" && echo "free space bad: $avail > $total"
+	_scratch_unmount
+fi
+_scratch_xfs_repair -n >> $seqres.full 2>&1 && echo "repair didn't find fuzz?"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/724.out b/tests/xfs/724.out
new file mode 100644
index 00000000..6571f9ed
--- /dev/null
+++ b/tests/xfs/724.out
@@ -0,0 +1,4 @@
+QA output created by 724
+Format and mount
+Fuzz fdblocks and btreeblks
+Detection and Correction
diff --git a/tests/xfs/group b/tests/xfs/group
index 65a67ab4..280b1ba1 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -497,4 +497,7 @@
 719 auto quick mkfs
 720 auto quick mkfs
 721 auto quick mkfs
+722 auto quick fuzz
+723 auto quick fuzz
+724 auto quick fuzz
 903 mount auto quick stress

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/3] xfs: refactor unmount record write
  2018-07-19 16:39   ` Christoph Hellwig
@ 2018-07-19 17:40     ` Darrick J. Wong
  0 siblings, 0 replies; 12+ messages in thread
From: Darrick J. Wong @ 2018-07-19 17:40 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-xfs

On Thu, Jul 19, 2018 at 09:39:47AM -0700, Christoph Hellwig wrote:
> Looks generally fine, but some tiny nitpicks:
> 
> > +	/* the data section must be 32 bit size aligned */
> > +	struct {
> > +		uint16_t magic;
> > +		uint16_t pad1;
> > +		uint32_t pad2; /* may as well make it 64 bits */
> > +	} magic = {
> > +		.magic = XLOG_UNMOUNT_TYPE,
> > +	};
> 
> Can we please give this structure type a name and move it to
> xfs_log_format.h?  They way this had been done always irked me.

Ok.  It gets written to disk, so that makes sense.

> > +	/*
> > +	 * At this point, we're umounting anyway,
> > +	 * so there's no point in transitioning log state
> > +	 * to IOERROR. Just continue...
> > +	 */
> 
> Use up all 80 lines, please.
> 
> > +	if (!(iclog->ic_state == XLOG_STATE_ACTIVE ||
> > +	      iclog->ic_state == XLOG_STATE_DIRTY) &&
> > +	    !XLOG_FORCED_SHUTDOWN(log))
> > +		xlog_wait(&iclog->ic_force_wait, &log->l_icloglock);
> > +	else
> > +		spin_unlock(&log->l_icloglock);
> 
> 	switch (iclog->ic_state) {
> 	default:
> 		if (!XLOG_FORCED_SHUTDOWN(log)) {
> 			xlog_wait(&iclog->ic_force_wait, &log->l_icloglock);
> 			break;
> 		}
> 		/*FALLHRU*/
> 	case XLOG_STATE_ACTIVE:
> 	case XLOG_STATE_DIRTY:
> 		spin_unlock(&log->l_icloglock);
> 		break;

<nod>

--D

> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2 2/3] xfs: refactor unmount record write
  2018-07-18 23:39 ` [PATCH 2/3] xfs: refactor unmount record write Darrick J. Wong
  2018-07-19 16:39   ` Christoph Hellwig
@ 2018-07-19 17:41   ` Darrick J. Wong
  2018-07-20 16:04     ` Christoph Hellwig
  1 sibling, 1 reply; 12+ messages in thread
From: Darrick J. Wong @ 2018-07-19 17:41 UTC (permalink / raw)
  To: linux-xfs; +Cc: Christoph Hellwig

From: Darrick J. Wong <darrick.wong@oracle.com>

Refactor the writing of the unmount record into a separate helper.  No
functionality changes.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
v2: various code cleanups and move the structure header definition
---
 fs/xfs/libxfs/xfs_log_format.h |   13 ++++
 fs/xfs/xfs_log.c               |  131 +++++++++++++++++++++-------------------
 2 files changed, 82 insertions(+), 62 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_log_format.h b/fs/xfs/libxfs/xfs_log_format.h
index 79bb79853c9f..e5f97c69b320 100644
--- a/fs/xfs/libxfs/xfs_log_format.h
+++ b/fs/xfs/libxfs/xfs_log_format.h
@@ -77,6 +77,19 @@ static inline uint xlog_get_cycle(char *ptr)
 
 #define XLOG_UNMOUNT_TYPE	0x556e	/* Un for Unmount */
 
+/*
+ * Log item for unmount records.
+ *
+ * The unmount record used to have a string "Unmount filesystem--" in the
+ * data section where the "Un" was really a magic number (XLOG_UNMOUNT_TYPE).
+ * We just write the magic number now; see xfs_log_unmount_write.
+ */
+struct xfs_unmount_log_format {
+	uint16_t	magic;	/* XLOG_UNMOUNT_TYPE */
+	uint16_t	pad1;
+	uint32_t	pad2;	/* may as well make it 64 bits */
+};
+
 /* Region types for iovec's i_type */
 #define XLOG_REG_TYPE_BFORMAT		1
 #define XLOG_REG_TYPE_BCHUNK		2
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 5e56f3b93d4b..bac586cbc54e 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -826,6 +826,74 @@ xfs_log_mount_cancel(
  * deallocation must not be done until source-end.
  */
 
+/* Actually write the unmount record to disk. */
+static void
+xfs_log_write_unmount_record(
+	struct xfs_mount	*mp)
+{
+	/* the data section must be 32 bit size aligned */
+	struct xfs_unmount_log_format magic = {
+		.magic = XLOG_UNMOUNT_TYPE,
+	};
+	struct xfs_log_iovec reg = {
+		.i_addr = &magic,
+		.i_len = sizeof(magic),
+		.i_type = XLOG_REG_TYPE_UNMOUNT,
+	};
+	struct xfs_log_vec vec = {
+		.lv_niovecs = 1,
+		.lv_iovecp = &reg,
+	};
+	struct xlog		*log = mp->m_log;
+	struct xlog_in_core	*iclog;
+	struct xlog_ticket	*tic = NULL;
+	xfs_lsn_t		lsn;
+	int			error;
+
+	error = xfs_log_reserve(mp, 600, 1, &tic, XFS_LOG, 0);
+	if (error)
+		goto out_err;
+
+	/* remove inited flag, and account for space used */
+	tic->t_flags = 0;
+	tic->t_curr_res -= sizeof(magic);
+	error = xlog_write(log, &vec, tic, &lsn, NULL, XLOG_UNMOUNT_TRANS);
+	/*
+	 * At this point, we're umounting anyway, so there's no point in
+	 * transitioning log state to IOERROR. Just continue...
+	 */
+out_err:
+	if (error)
+		xfs_alert(mp, "%s: unmount record failed", __func__);
+
+	spin_lock(&log->l_icloglock);
+	iclog = log->l_iclog;
+	atomic_inc(&iclog->ic_refcnt);
+	xlog_state_want_sync(log, iclog);
+	spin_unlock(&log->l_icloglock);
+	error = xlog_state_release_iclog(log, iclog);
+
+	spin_lock(&log->l_icloglock);
+	switch (iclog->ic_state) {
+	default:
+		if (!XLOG_FORCED_SHUTDOWN(log)) {
+			xlog_wait(&iclog->ic_force_wait, &log->l_icloglock);
+			break;
+		}
+		/* fall through */
+	case XLOG_STATE_ACTIVE:
+	case XLOG_STATE_DIRTY:
+		spin_unlock(&log->l_icloglock);
+		break;
+	}
+
+	if (tic) {
+		trace_xfs_log_umount_write(log, tic);
+		xlog_ungrant_log_space(log, tic);
+		xfs_log_ticket_put(tic);
+	}
+}
+
 /*
  * Unmount record used to have a string "Unmount filesystem--" in the
  * data section where the "Un" was really a magic number (XLOG_UNMOUNT_TYPE).
@@ -842,8 +910,6 @@ xfs_log_unmount_write(xfs_mount_t *mp)
 #ifdef DEBUG
 	xlog_in_core_t	 *first_iclog;
 #endif
-	xlog_ticket_t	*tic = NULL;
-	xfs_lsn_t	 lsn;
 	int		 error;
 
 	/*
@@ -870,66 +936,7 @@ xfs_log_unmount_write(xfs_mount_t *mp)
 	} while (iclog != first_iclog);
 #endif
 	if (! (XLOG_FORCED_SHUTDOWN(log))) {
-		error = xfs_log_reserve(mp, 600, 1, &tic, XFS_LOG, 0);
-		if (!error) {
-			/* the data section must be 32 bit size aligned */
-			struct {
-			    uint16_t magic;
-			    uint16_t pad1;
-			    uint32_t pad2; /* may as well make it 64 bits */
-			} magic = {
-				.magic = XLOG_UNMOUNT_TYPE,
-			};
-			struct xfs_log_iovec reg = {
-				.i_addr = &magic,
-				.i_len = sizeof(magic),
-				.i_type = XLOG_REG_TYPE_UNMOUNT,
-			};
-			struct xfs_log_vec vec = {
-				.lv_niovecs = 1,
-				.lv_iovecp = &reg,
-			};
-
-			/* remove inited flag, and account for space used */
-			tic->t_flags = 0;
-			tic->t_curr_res -= sizeof(magic);
-			error = xlog_write(log, &vec, tic, &lsn,
-					   NULL, XLOG_UNMOUNT_TRANS);
-			/*
-			 * At this point, we're umounting anyway,
-			 * so there's no point in transitioning log state
-			 * to IOERROR. Just continue...
-			 */
-		}
-
-		if (error)
-			xfs_alert(mp, "%s: unmount record failed", __func__);
-
-
-		spin_lock(&log->l_icloglock);
-		iclog = log->l_iclog;
-		atomic_inc(&iclog->ic_refcnt);
-		xlog_state_want_sync(log, iclog);
-		spin_unlock(&log->l_icloglock);
-		error = xlog_state_release_iclog(log, iclog);
-
-		spin_lock(&log->l_icloglock);
-		if (!(iclog->ic_state == XLOG_STATE_ACTIVE ||
-		      iclog->ic_state == XLOG_STATE_DIRTY)) {
-			if (!XLOG_FORCED_SHUTDOWN(log)) {
-				xlog_wait(&iclog->ic_force_wait,
-							&log->l_icloglock);
-			} else {
-				spin_unlock(&log->l_icloglock);
-			}
-		} else {
-			spin_unlock(&log->l_icloglock);
-		}
-		if (tic) {
-			trace_xfs_log_umount_write(log, tic);
-			xlog_ungrant_log_space(log, tic);
-			xfs_log_ticket_put(tic);
-		}
+		xfs_log_write_unmount_record(mp);
 	} else {
 		/*
 		 * We're already in forced_shutdown mode, couldn't

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/3] xfs: refactor unmount record write
  2018-07-19 17:41   ` [PATCH v2 " Darrick J. Wong
@ 2018-07-20 16:04     ` Christoph Hellwig
  0 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2018-07-20 16:04 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs, Christoph Hellwig

On Thu, Jul 19, 2018 at 10:41:30AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Refactor the writing of the unmount record into a separate helper.  No
> functionality changes.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-07-20 16:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-18 23:39 [PATCH 0/3] xfs-4.19: fix bogus summary counters on mount Darrick J. Wong
2018-07-18 23:39 ` [PATCH 1/3] xfs: detect and fix bad summary counts at mount Darrick J. Wong
2018-07-19 16:36   ` Christoph Hellwig
2018-07-18 23:39 ` [PATCH 2/3] xfs: refactor unmount record write Darrick J. Wong
2018-07-19 16:39   ` Christoph Hellwig
2018-07-19 17:40     ` Darrick J. Wong
2018-07-19 17:41   ` [PATCH v2 " Darrick J. Wong
2018-07-20 16:04     ` Christoph Hellwig
2018-07-18 23:39 ` [PATCH 3/3] xfs: force summary counter recalc at next mount Darrick J. Wong
2018-07-19 16:40   ` Christoph Hellwig
2018-07-19 16:44     ` Darrick J. Wong
2018-07-19 16:45 ` [RFC PATCH 4/3] xfstests: test mount time summary counter check and fix Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).