linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org, guaneryu@gmail.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me
Subject: [PATCH 3/4] xfs/108: sync filesystem before querying quota
Date: Tue, 31 Aug 2021 17:12:20 -0700	[thread overview]
Message-ID: <163045514094.771394.18013113541883760708.stgit@magnolia> (raw)
In-Reply-To: <163045512451.771394.12554760323831932499.stgit@magnolia>

From: Darrick J. Wong <djwong@kernel.org>

The new deferred inactivation code is lazy about deallocating deleted
files, which means that we need to be more proactive about syncing the
filesystem after deleting things.  When reporting quotas, XFS only
flushes the deferred work if we query quota id 0, so we need the
explicit sync to ensure the quota numbers are not affected by laziness.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 tests/xfs/108 |    1 +
 1 file changed, 1 insertion(+)


diff --git a/tests/xfs/108 b/tests/xfs/108
index 8a102133..a3a4c8d4 100755
--- a/tests/xfs/108
+++ b/tests/xfs/108
@@ -47,6 +47,7 @@ test_accounting()
 	for file in $SCRATCH_MNT/{buffer,direct,mmap}; do
 		$here/src/lstat64 $file | head -3 | _filter_scratch
 	done
+	sync
 	$XFS_QUOTA_PROG -c "quota -hnb -$type $id" $QARGS | _filter_quota
 	$XFS_QUOTA_PROG -c "quota -hni -$type $id" $QARGS | _filter_quota
 	$XFS_QUOTA_PROG -c "quota -hnr -$type $id" $QARGS | _filter_quota


  parent reply	other threads:[~2021-09-01  0:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01  0:12 [PATCHSET 0/4] fstests: exercise code changes in 5.15 Darrick J. Wong
2021-09-01  0:12 ` [PATCH 1/4] generic: regression test for a FALLOC_FL_UNSHARE bug in XFS Darrick J. Wong
2021-09-01  0:12 ` [PATCH 2/4] xfs: test DONTCACHE behavior with the inode cache Darrick J. Wong
2021-09-01  0:12 ` Darrick J. Wong [this message]
2021-09-01  0:12 ` [PATCH 4/4] xfs: regresion test for fsmap problems with realtime Darrick J. Wong
2021-09-12 10:41   ` Eryu Guan
2021-09-13 18:26     ` 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=163045514094.771394.18013113541883760708.stgit@magnolia \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=guan@eryu.me \
    --cc=guaneryu@gmail.com \
    --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 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).