fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Anand Jain <anand.jain@oracle.com>, fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] fstests: btrfs/179 call quota rescan
Date: Fri, 7 Feb 2020 20:15:40 +0800	[thread overview]
Message-ID: <1fae4e42-e8ce-d16d-8b2f-cada33ee67bf@gmx.com> (raw)
In-Reply-To: <1581076895-6688-1-git-send-email-anand.jain@oracle.com>


[-- Attachment #1.1: Type: text/plain, Size: 1952 bytes --]



On 2020/2/7 下午8:01, Anand Jain wrote:
> On some systems btrfs/179 fails as the check finds that there is
> difference in the qgroup counts.
> 
> By the async nature of qgroup tree scan, the latest qgroup counts at the
> time of umount might not be upto date,

Yes, so far so good.

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

No problem either.

> So make sure the qgroup counts are updated
> before unmount happens and make the check happy.

But the solution doesn't look correct to me.

We should either make btrfs-check to handle such half-dropped case
better, or find a way to wait for all subvolume drop to be finished in
test case.

Papering the test by rescan is not a good idea at all.
If one day we really hit some qgroup accounting problem, this papering
way could hugely reduce the coverage.

Thanks,
Qu

> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
>  tests/btrfs/179 | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/tests/btrfs/179 b/tests/btrfs/179
> index 4a24ea419a7e..74e91841eaa6 100755
> --- a/tests/btrfs/179
> +++ b/tests/btrfs/179
> @@ -109,6 +109,14 @@ wait $snapshot_pid
>  kill $delete_pid
>  wait $delete_pid
>  
> +# By the async nature of qgroup tree scan, 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 updated before unmount happens.
> +
> +$BTRFS_UTIL_PROG quota rescan -w $SCRATCH_MNT >> $seqres.full
> +
>  # success, all done
>  echo "Silence is golden"
>  
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-02-07 12:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 12:01 [PATCH] fstests: btrfs/179 call quota rescan Anand Jain
2020-02-07 12:15 ` Qu Wenruo [this message]
2020-02-07 15:59   ` Anand Jain
2020-02-07 23:28     ` Qu Wenruo
2020-02-08  9:06       ` Anand Jain
2020-02-10  1:36         ` Qu Wenruo
2020-02-10  7:45           ` Nikolay Borisov
2020-02-10  7:55             ` Qu Wenruo
2020-02-10  8:47               ` 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=1fae4e42-e8ce-d16d-8b2f-cada33ee67bf@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=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).