From: Eryu Guan <eguan@redhat.com>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH 2/2] fstests: btrfs: Use _require_btrfs_qgroup_report to replace open code
Date: Thu, 8 Dec 2016 13:27:42 +0800 [thread overview]
Message-ID: <20161208052742.GG29149@eguan.usersys.redhat.com> (raw)
In-Reply-To: <20161208020456.16116-2-quwenruo@cn.fujitsu.com>
On Thu, Dec 08, 2016 at 10:04:56AM +0800, Qu Wenruo wrote:
> Introduce new _require_btrfs_qgroup_report function, which will check
> the accessibility to "btrfs check --qgroup-report", then set a global
> flag to info _check_scratch_fs() to do extra qgroup check.
>
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> ---
> common/rc | 22 ++++++++++++++++++++++
This needs rebase too.
> tests/btrfs/022 | 5 +++++
> tests/btrfs/028 | 5 ++---
> tests/btrfs/042 | 6 ++----
> tests/btrfs/099 | 1 +
> tests/btrfs/104 | 20 +++++---------------
> tests/btrfs/122 | 10 +++-------
> tests/btrfs/123 | 5 ++---
> 8 files changed, 42 insertions(+), 32 deletions(-)
>
> diff --git a/common/rc b/common/rc
> index 1703232..bce3a09 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2624,6 +2624,20 @@ _check_btrfs_filesystem()
> mountpoint=`_umount_or_remount_ro $device`
> fi
>
> + # Check qgroup numbers
> + if [ "$BTRFS_NEED_QGROUP_REPORT" == "yes" ];then
So we can bypass the _require_btrfs_qgroup_report check if we set
BTRFS_NEED_QGROUP_REPORT to "yes" directly, right? How about doing
something like _require_scratch do, e.g. touching some signal file in
$RESULT_DIR and only do qgroup check if that file exists?
> + btrfsck $device --qgroup-report > $tmp.qgroup_report 2>&1
Shouldn't "$BTRFS_UTIL_PROG check $device ..." be used for new code? I
might be wrong on this, I think btrfsck is deprecated.
Thanks,
Eryu
next prev parent reply other threads:[~2016-12-08 5:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 2:04 [PATCH 1/2] fstests: common: rename and enhance _require_btrfs to _require_btrfs_subcommand Qu Wenruo
2016-12-08 2:04 ` [PATCH 2/2] fstests: btrfs: Use _require_btrfs_qgroup_report to replace open code Qu Wenruo
2016-12-08 5:27 ` Eryu Guan [this message]
2016-12-08 5:49 ` Qu Wenruo
2016-12-08 4:00 ` [PATCH 1/2] fstests: common: rename and enhance _require_btrfs to _require_btrfs_subcommand Eryu Guan
2016-12-08 5:44 ` 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=20161208052742.GG29149@eguan.usersys.redhat.com \
--to=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo@cn.fujitsu.com \
/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