All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
To: Mark Fasheh <mfasheh@suse.de>, Josef Bacik <jbacik@fb.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 3/3] btrfs: qgroup: fix a wrong parameter of no_quota.
Date: Mon, 16 Mar 2015 12:59:37 +0800	[thread overview]
Message-ID: <55066339.4060708@cn.fujitsu.com> (raw)
In-Reply-To: <20150303202057.GU21790@wotan.suse.de>

On 03/04/2015 04:20 AM, Mark Fasheh wrote:
> On Tue, Mar 03, 2015 at 09:00:36AM -0500, Josef Bacik wrote:
>> On 03/03/2015 06:18 AM, Dongsheng Yang wrote:
>>> On 02/26/2015 02:05 PM, Dongsheng Yang wrote:
>>>> Wait a minute, this patch seems not working well in accounting quota
>>>> number when
>>>> deleting data shared by different subvolumes.
>>>>
>>>> I will investigate more about it and send a V2 out.
>>> I have sent a fstest
>>>    [PATCH] fstest: btrfs: add a test for quota number when deleting a
>>> subvol.
>>> for this problem I was trying to solve in this patch.
>>>
>>> Please consider reverting the two commits introduced the problem:
>>>
>>> e339a6b0 (Btrfs: __btrfs_mod_ref should always use no_quota)
>>> 1152651a (btrfs: qgroup: account shared subtrees during snapshot delete)
>>>
>> We aren't reverting these two commits, what we had was worse before than it
>> is now.  We need to figure out why this is resulting in problems and fix
>> that rather than throwing out a whole bunch of work.  Thanks,
> Agreed, reverting these would re-introduce far more problems than it would
> solve.

Hi Josef and Mark,

Sorry for the late.

Thanx for your reply and sorry I am not clear about the "far more 
problems".

 From the result below, I saw there are some diff reports in V4.0-rc1 
and when I
revert these two commits. It's consistent now.

But I think there must be something I am missing.  I am glad to 
investigate more
about it and solve it. But at first I need to know what's the problem 
SUBTREE is
trying to solve.

Example:
mkfs.btrfs  /dev/sdc -f
mount /dev/sdc /mnt
btrfs quota enable /mnt
btrfs sub create /mnt/sub
dd if=/dev/zero of=/mnt/sub/data bs=1024 count=1000
btrfs sub snapshot /mnt/sub /mnt/snap
btrfs qgroup create 1/1 /mnt
btrfs qgroup assign 0/257 1/1 /mnt
btrfs quota rescan -w /mnt
sync
btrfs sub delete /mnt/sub
-----------------------          <-------------wait for cleaner_kthread.
btrfs qgroup show /mnt
umount /mnt
btrfs check --qgroup-report /dev/sdc |grep diff

Result:
(1). V4.0-rc1
# btrfs qgroup show /mnt
qgroupid         rfer         excl
--------         ----         ----
0/5          16.00KiB     16.00KiB
0/257      1000.00KiB        0.00B
0/258      1016.00KiB   1016.00KiB
1/1        1000.00KiB        0.00B
# btrfs check --qgroup-report /dev/sdc |grep diff
Counts for qgroup id: 257 are different
diff:        referenced -1024000 referenced compressed -1024000
Counts for qgroup id: 281474976710657 are different
diff:        referenced -1024000 referenced compressed -1024000

(2). V4.0-rc1 with reverts of "96c92f" and "c04cad"
# btrfs qgroup show /mnt
qgroupid         rfer         excl
--------         ----         ----
0/5          16.00KiB     16.00KiB
0/257           0.00B        0.00B
0/258      1016.00KiB   1016.00KiB
1/1             0.00B        0.00B
# btrfs check --qgroup-report /dev/sdc |grep diff
#
*No diff in btrfs check --qgroup-report*


Thanx
> 	--Mark
>
> --
> Mark Fasheh
> .
>


  reply	other threads:[~2015-03-16  5:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 10:24 [PATCH 0/3] Btrfs: qgroup: part-3: bug fixes for deleting subvolume Dongsheng Yang
2015-02-10 10:24 ` [PATCH 1/3] btrfs: qgroup: return EINVAL if level of parent is not higher than child's Dongsheng Yang
2015-02-10 10:24 ` [PATCH 2/3] btrfs: qgroup: allow to remove qgroup which has parent but no child Dongsheng Yang
2015-02-10 10:24 ` [PATCH 3/3] btrfs: qgroup: fix a wrong parameter of no_quota Dongsheng Yang
2015-02-10 11:24   ` Filipe David Manana
2015-02-11  2:51     ` Dongsheng Yang
2015-02-13  9:38   ` Dongsheng Yang
2015-02-26  6:05     ` Dongsheng Yang
2015-03-03 11:13       ` [PATCH] fstest: btrfs: add a test for quota number when deleting a subvol Dongsheng Yang
2015-03-03 11:13         ` Dongsheng Yang
2015-03-06  5:06         ` Eryu Guan
2015-03-16  5:06           ` Dongsheng Yang
2015-03-16  5:06             ` Dongsheng Yang
2015-03-16  5:33             ` Eryu Guan
2015-03-16  5:47               ` Dongsheng Yang
2015-03-16  5:47                 ` Dongsheng Yang
2015-03-16  5:58             ` [PATCH v2] " Dongsheng Yang
2015-03-16  5:58               ` Dongsheng Yang
2015-03-03 11:18       ` [PATCH 3/3] btrfs: qgroup: fix a wrong parameter of no_quota Dongsheng Yang
2015-03-03 14:00         ` Josef Bacik
2015-03-03 20:20           ` Mark Fasheh
2015-03-16  4:59             ` Dongsheng Yang [this message]
2015-03-17 15:27               ` Dongsheng Yang

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=55066339.4060708@cn.fujitsu.com \
    --to=yangds.fnst@cn.fujitsu.com \
    --cc=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mfasheh@suse.de \
    /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.