fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Josef Bacik <josef@toxicpanda.com>, Qu Wenruo <wqu@suse.com>,
	fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] fstests: btrfs/022: Disable snapshot ioctl in fsstress
Date: Fri, 7 Feb 2020 09:39:17 +0800	[thread overview]
Message-ID: <bc0a2e79-bad6-9fab-045e-80c995f017fc@gmx.com> (raw)
In-Reply-To: <7da58abd-eb5e-0a7f-f3bf-205f1daf95cd@toxicpanda.com>


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



On 2020/2/7 上午8:38, Josef Bacik wrote:
> On 2/6/20 7:35 PM, Qu Wenruo wrote:
>>
>>
>> On 2020/2/6 下午11:47, Josef Bacik wrote:
>>> On 2/6/20 12:32 AM, Qu Wenruo wrote:
>>>> Since commit fd0830929573 ("fsstress: add the ability to create
>>>> snapshots") adds the ability for fsstress to create/delete snapshot and
>>>> subvolume, test case btrfs/022 fails as _btrfs_get_subvolid can't
>>>> handle multiple subvolumes under the same path.
>>>>
>>>> So manually disable snapshot/subvolume creation and deletion ioctl in
>>>> this
>>>> test case. Other qgroup test cases aren't affected.
>>>>
>>>> Signed-off-by: Qu Wenruo <wqu@suse.com>
>>>
>>> Why not just fix _btrfs_get_subvolid?  You can use egrep to make sure
>>> the name matches exactly.  Thanks,
>>
>> Because we have other requirement, like limit tests.
>>
>> If we have other snapshots/subvolumes, they don't have the same limit,
>> thus unable to test qgroup properly.
>>
> 
> That's fair, but we should also fix _btrfs_get_subvolid since we know it
> doesn't work in this case.  Thanks,

My bad. It's not the limit test, it doesn't utilize fsstress at all.

It's completely the bad greping for qgroup ids.

We could have the following subvolume layouts in btrfs qgroup show output:
subvol a id=256
subvol b id=306
qgroupid         rfer         excl
--------         ----         ----
0/5             16384        16384
0/256        13914112        16384
...
0/263         3080192      2306048 << 306 matches here first
...
0/306        13914112        16384 << Then match here

Although disabling snapshot/subvolume creation solves the problem since
there will be no other subvolumes to start with, we're still not that safe.

The root fix is to grep qgroupid by "0/$subvolid", not just $subvolid.

I'll do a proer fix, and keep the snapshot/subvolume creation to take
advantage of your enhanced fsstress.

Thanks,
Qu
> 
> Josef


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

      parent reply	other threads:[~2020-02-07  1:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06  5:32 [PATCH] fstests: btrfs/022: Disable snapshot ioctl in fsstress Qu Wenruo
2020-02-06 15:47 ` Josef Bacik
2020-02-07  0:35   ` Qu Wenruo
2020-02-07  0:38     ` Josef Bacik
2020-02-07  0:38       ` Qu Wenruo
2020-02-07  1:39       ` Qu Wenruo [this message]

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=bc0a2e79-bad6-9fab-045e-80c995f017fc@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=fstests@vger.kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.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;
as well as URLs for NNTP newsgroup(s).