linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] quota: clear speculative delalloc when checking quota usage
@ 2017-10-26  5:51 Darrick J. Wong
  2017-10-26  5:51 ` [PATCH 2/6] common/xfs: refactor xfs_scrub presence testing Darrick J. Wong
                   ` (8 more replies)
  0 siblings, 9 replies; 32+ messages in thread
From: Darrick J. Wong @ 2017-10-26  5:51 UTC (permalink / raw)
  To: eguan, darrick.wong; +Cc: linux-xfs, fstests

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

Occasionally speculative preallocation kicks in when writing files to a
filesystem under test.  These preallocations consume quota and /usually/
aren't around after we drop_caches, but there's nothing to guarantee
that they actually have, so the quota reports will be different before
and after the fs remount, causing sporadic test failures in
generic/{23[123],270}.

We now have xfs_spaceman which can instruct XFS to forcibly remove the
speculative preallocations.  This fixes the sporadic failures, at
least for XFS.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 common/config |    1 +
 common/quota  |    6 ++++++
 2 files changed, 7 insertions(+)


diff --git a/common/config b/common/config
index 8844173..96503c6 100644
--- a/common/config
+++ b/common/config
@@ -149,6 +149,7 @@ export XFS_LOGPRINT_PROG="`set_prog_path xfs_logprint`"
 export XFS_REPAIR_PROG="`set_prog_path xfs_repair`"
 export XFS_DB_PROG="`set_prog_path xfs_db`"
 export XFS_GROWFS_PROG=`set_prog_path xfs_growfs`
+export XFS_SPACEMAN_PROG="`set_prog_path xfs_spaceman`"
 export XFS_SCRUB_PROG="`set_prog_path xfs_scrub`"
 export XFS_PARALLEL_REPAIR_PROG="`set_prog_path xfs_prepair`"
 export XFS_PARALLEL_REPAIR64_PROG="`set_prog_path xfs_prepair64`"
diff --git a/common/quota b/common/quota
index d027a8c..2611c48 100644
--- a/common/quota
+++ b/common/quota
@@ -267,6 +267,12 @@ _check_quota_usage()
 		VFS_QUOTA=1
 		quotaon -f -u -g $SCRATCH_MNT 2>/dev/null
 		;;
+	xfs)
+		# Clear out speculative preallocations to eliminate them
+		# as a source of intermittent orig/checked differences.
+		test -x "$XFS_SPACEMAN_PROG" && \
+			"$XFS_SPACEMAN_PROG" -c 'prealloc -s' $SCRATCH_MNT
+		;;
 	*)
 		;;
 	esac


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

end of thread, other threads:[~2017-11-01 21:13 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-26  5:51 [PATCH 1/6] quota: clear speculative delalloc when checking quota usage Darrick J. Wong
2017-10-26  5:51 ` [PATCH 2/6] common/xfs: refactor xfs_scrub presence testing Darrick J. Wong
2017-10-27  4:37   ` Eryu Guan
2017-10-27 18:04     ` Darrick J. Wong
2017-10-27 20:21   ` [PATCH v2 " Darrick J. Wong
2017-10-26  5:51 ` [PATCH 3/6] common/xfs: standardize the xfs_scrub output that gets recorded to $seqres.full Darrick J. Wong
2017-10-26  5:51 ` [PATCH 4/6] generic/45[34]: force UTF-8 codeset to enable utf-8 namer checks in xfs_scrub Darrick J. Wong
2017-10-26  5:52 ` [PATCH 5/6] misc: add module reloading helpers Darrick J. Wong
2017-10-26  6:43   ` Eryu Guan
2017-10-27  0:35     ` Darrick J. Wong
2017-10-27  0:38   ` [PATCH v2 " Darrick J. Wong
2017-10-27  4:41     ` Eryu Guan
2017-10-27 18:18       ` Darrick J. Wong
2017-10-28  5:47         ` Eryu Guan
2017-10-27 20:23   ` [PATCH v3 " Darrick J. Wong
2017-10-26  5:52 ` [PATCH 6/6] xfs: test that we don't leak inodes and dquots during failed cow recovery Darrick J. Wong
2017-10-27  0:42   ` [PATCH v2 " Darrick J. Wong
2017-10-27  0:43 ` [PATCH 7/6] common/fuzzy: online re-scrub should not preen Darrick J. Wong
2017-10-27  0:44 ` [PATCH 8/6] xfs/333: fix errors with new inode pointer verifiers Darrick J. Wong
2017-10-27  6:04   ` Eryu Guan
2017-10-27 18:21     ` Darrick J. Wong
2017-10-27 20:24   ` [PATCH v2 " Darrick J. Wong
2017-11-01 21:13     ` Darrick J. Wong
2017-10-27  0:44 ` [PATCH 9/6] generic/459: fix test running errors Darrick J. Wong
2017-10-27  4:42   ` Eryu Guan
2017-10-27 18:22     ` Darrick J. Wong
2017-10-27 20:25   ` [PATCH v2 " Darrick J. Wong
2017-10-28 17:07     ` Darrick J. Wong
2017-10-28 17:08   ` [PATCH v3 " Darrick J. Wong
2017-10-30  5:01     ` Eryu Guan
2017-10-27 20:25 ` [PATCH 10/6] common/xfs: remove inode-paths cruft Darrick J. Wong
2017-10-30  5:00   ` Eryu Guan

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