All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: Wang Shilong <wangshilong1991@gmail.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 2/3] Btrfs: rework qgroup accounting
Date: Tue, 7 Jan 2014 11:43:16 -0500	[thread overview]
Message-ID: <52CC2EA4.50206@fb.com> (raw)
In-Reply-To: <A4C427B3-2FE2-4032-A085-77117A678B0F@gmail.com>


On 12/21/2013 03:56 AM, Wang Shilong wrote:
> Hello Josef,
>
> Though i know there are still problems related to qgroup(for example removing snapshot
> will beak qgroup accounting).I did a simple test about your patch..
>
>
> # btrfs quota enable /mnt
> # dd if=/dev/zero of=/mnt/data bs=4k count=102400 oflag=direct
> # btrfs sub snapshot /mnt/ /mnt/snap1
> # btrfs sub snapshot /mnt /mnt/snap2
> # btrfs sub delete /mnt/snap1 /mnt/snap2
> # sync
> # rm -rf /mnt/data
> # sync
> # dmesg
> # btrfs qgroup show /mnt
>
>
> Firstly, qgroup accounting is wrong, this is maybe expected because efficient  fs tree removal.
> However, from dmesg, i get the  WARNING:
>
> WARNING: CPU: 1 PID: 2650 at fs/btrfs/qgroup.c:1486 btrfs_delayed_qgroup_accounting
>
> I did not take a deep look at codes, but i think you will be interested in taking a look at this. ^_^

Ok I finally sat down to look at this and it is because subvol deletion 
screws up quota accounting no matter what.  I just added this WARN_ON() 
to catch actual mistakes, it just so happens it gets tripped when the 
snapshot deletion stuff happens too.  I'm going to put this on the "I'll 
deal with it later" list since it is an existing issue with or without 
my patch.  Thanks,

Josef

  parent reply	other threads:[~2014-01-07 16:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18 21:07 Rework qgroup accounting Josef Bacik
2013-12-18 21:07 ` [PATCH 1/3] Btrfs: introduce lock_ref/unlock_ref Josef Bacik
2013-12-19  4:01   ` Dave Chinner
2013-12-19 14:37     ` Josef Bacik
2013-12-18 21:07 ` [PATCH 2/3] Btrfs: rework qgroup accounting Josef Bacik
2013-12-21  8:01   ` Wang Shilong
2013-12-21 14:13     ` Josef Bacik
2013-12-21  8:56   ` Wang Shilong
2013-12-21 14:14     ` Josef Bacik
2014-01-07 16:43     ` Josef Bacik [this message]
2014-01-08 14:33   ` David Sterba
2014-01-08 14:42     ` Josef Bacik
2013-12-18 21:07 ` [PATCH 3/3] Btrfs: add sanity tests for new qgroup accounting code Josef Bacik
2013-12-19  2:00 ` Rework qgroup accounting Liu Bo

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=52CC2EA4.50206@fb.com \
    --to=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wangshilong1991@gmail.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 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.