All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
To: <fstests@vger.kernel.org>, <linux-btrfs@vger.kernel.org>,
	<fdmanana@gmail.com>
Cc: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Subject: [PATCH] xfstests: btrfs: 022: add a quota rescan -w to wait rescan finished.
Date: Wed, 3 Jun 2015 15:10:55 +0800	[thread overview]
Message-ID: <1433315455-814-1-git-send-email-yangds.fnst@cn.fujitsu.com> (raw)
In-Reply-To: <CAL3q7H7yZyUXAsK41e1ZAwVsV3WB8_XNJR_sQ4p8UZLfEM5hDA@mail.gmail.com>

When we enable quota, btrfs will rescan quota numbers. We need
to wait the rescan finished before any more operations on btrfs
qgroups. Otherwith, the new btrfs-progs would WARN out:

WARNING: Rescan is running, qgroup data may be incorrect.

It would make btrfs/022 failed.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 tests/btrfs/022 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/btrfs/022 b/tests/btrfs/022
index 5c1a82d..56d4f3d 100755
--- a/tests/btrfs/022
+++ b/tests/btrfs/022
@@ -51,6 +51,7 @@ _basic_test()
 {
 	_run_btrfs_util_prog subvolume create $SCRATCH_MNT/a
 	_run_btrfs_util_prog quota enable $SCRATCH_MNT/a
+	_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
 	subvolid=$(_btrfs_get_subvolid $SCRATCH_MNT a)
 	$BTRFS_UTIL_PROG qgroup show $units $SCRATCH_MNT | grep $subvolid >> \
 		$seqres.full 2>&1
-- 
1.8.4.2


WARNING: multiple messages have this Message-ID (diff)
From: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org, fdmanana@gmail.com
Cc: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Subject: [PATCH] xfstests: btrfs: 022: add a quota rescan -w to wait rescan finished.
Date: Wed, 3 Jun 2015 15:10:55 +0800	[thread overview]
Message-ID: <1433315455-814-1-git-send-email-yangds.fnst@cn.fujitsu.com> (raw)
In-Reply-To: <CAL3q7H7yZyUXAsK41e1ZAwVsV3WB8_XNJR_sQ4p8UZLfEM5hDA@mail.gmail.com>

When we enable quota, btrfs will rescan quota numbers. We need
to wait the rescan finished before any more operations on btrfs
qgroups. Otherwith, the new btrfs-progs would WARN out:

WARNING: Rescan is running, qgroup data may be incorrect.

It would make btrfs/022 failed.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 tests/btrfs/022 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/btrfs/022 b/tests/btrfs/022
index 5c1a82d..56d4f3d 100755
--- a/tests/btrfs/022
+++ b/tests/btrfs/022
@@ -51,6 +51,7 @@ _basic_test()
 {
 	_run_btrfs_util_prog subvolume create $SCRATCH_MNT/a
 	_run_btrfs_util_prog quota enable $SCRATCH_MNT/a
+	_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
 	subvolid=$(_btrfs_get_subvolid $SCRATCH_MNT a)
 	$BTRFS_UTIL_PROG qgroup show $units $SCRATCH_MNT | grep $subvolid >> \
 		$seqres.full 2>&1
-- 
1.8.4.2


  parent reply	other threads:[~2015-06-03  7:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27  8:26 [PATCH 0/7] btrfs-progs: qgroup related enhance Qu Wenruo
2015-02-27  8:26 ` [PATCH 1/7] btrfs-progs: Update qgroup status flags and replace qgroup level/subvid calculation with inline function Qu Wenruo
2015-02-27  8:26 ` [PATCH 2/7] btrfs-progs: Allow btrfs-debug-tree to print human readable qgroup status flag Qu Wenruo
2015-02-27  8:26 ` [PATCH 3/7] btrfs-progs: Move parse_qgroupid() to utils.c Qu Wenruo
2015-02-27  8:26 ` [PATCH 4/7] btrfs-progs: Allow parse_qgroupid() to resolve subvolume path into qgroupid Qu Wenruo
     [not found]   ` <B6A95DD2-413F-4C43-8A9B-048713D62BCC@gmail.com>
2015-02-27  8:51     ` Qu Wenruo
2015-02-27  8:26 ` [PATCH 5/7] btrfs-progs: Add stack get/set functions for btrfs_qgroup_status_item Qu Wenruo
2015-02-27  8:26 ` [PATCH 6/7] btrfs-progs: Print warning message if qgroup data is inconsistent Qu Wenruo
2015-05-30 11:39   ` Filipe David Manana
2015-06-01  0:31     ` Qu Wenruo
2015-06-01  1:25     ` Qu Wenruo
2015-06-01  7:49       ` Filipe David Manana
2015-06-03  7:10     ` Dongsheng Yang [this message]
2015-06-03  7:10       ` [PATCH] xfstests: btrfs: 022: add a quota rescan -w to wait rescan finished Dongsheng Yang
2015-06-03  7:12       ` Dongsheng Yang
2015-06-03  7:12         ` Dongsheng Yang
2015-06-03 15:53       ` Filipe David Manana
2015-02-27  8:26 ` [PATCH 7/7] btrfs-progs: Schedule quota rescan if qgroup assign caused inconsistence Qu Wenruo
2015-03-23 23:38 ` [PATCH 0/7] btrfs-progs: qgroup related enhance David Sterba
2015-03-24  0:36   ` Qu Wenruo
2015-07-27 14:35     ` David Sterba
2015-07-28  0:25       ` 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=1433315455-814-1-git-send-email-yangds.fnst@cn.fujitsu.com \
    --to=yangds.fnst@cn.fujitsu.com \
    --cc=fdmanana@gmail.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 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.