fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: [PATCH v2] fstests: btrfs/179 call sync qgroup counts
Date: Wed, 12 Feb 2020 17:35:09 +0800	[thread overview]
Message-ID: <1581500109-22736-1-git-send-email-anand.jain@oracle.com> (raw)

On some systems btrfs/179 fails because the check finds that there is
difference in the qgroup counts.

So as the intention of the test case is to test any hang like situation
during heavy snapshot create/delete operation with quota enabled, so
make sure the qgroup counts are consistent at the end of the test case,
so to make the check happy.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
v2: Use subvolume sync at the end of the test case.
    Patch title changed.

 tests/btrfs/179 | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/btrfs/179 b/tests/btrfs/179
index 4a24ea419a7e..8795d59c01f8 100755
--- a/tests/btrfs/179
+++ b/tests/btrfs/179
@@ -109,6 +109,15 @@ wait $snapshot_pid
 kill $delete_pid
 wait $delete_pid
 
+# By the async nature of qgroup tree scan and subvolume delete, the latest
+# qgroup counts at the time of umount might not be upto date, if it isn't
+# then the check will report the difference in count. The difference in
+# qgroup counts are anyway updated in the following mount, so it is not a
+# real issue that this test case is trying to verify. So make sure the
+# qgroup counts are in sync before unmount happens.
+
+$BTRFS_UTIL_PROG subvolume sync $SCRATCH_MNT >> $seqres.full
+
 # success, all done
 echo "Silence is golden"
 
-- 
1.8.3.1


             reply	other threads:[~2020-02-12  9:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12  9:35 Anand Jain [this message]
2020-02-12 14:20 ` [PATCH v2] fstests: btrfs/179 call sync qgroup counts Qu Wenruo

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=1581500109-22736-1-git-send-email-anand.jain@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@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).