From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
To: "Jérôme Poulin" <jeromepoulin@gmail.com>
Cc: Duncan <1i5t5.duncan@cox.net>, linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: memory leak in <=3.11.6
Date: Wed, 30 Oct 2013 09:55:09 +0800 [thread overview]
Message-ID: <527066FD.3020309@cn.fujitsu.com> (raw)
In-Reply-To: <CALJXSJoaLrr0gPrMww_MR-5n+_7gmqai1tkvRhwGxNX12weaSA@mail.gmail.com>
On 10/30/2013 06:46 AM, Jérôme Poulin wrote:
> On Tue, Oct 29, 2013 at 12:42 PM, Duncan <1i5t5.duncan@cox.net> wrote:
>> So I'd call the qgroups feature broken at this time
> I agree. I made a page about Quotas on the wiki so to document my
> findings as documentation is really sparse. If you consult the section
> Known issues, you will find those:
>
> * To get accurate information, you must issue a sync before using the
> qgroup show command.
This is true in some extent.
qgroup accounting info(stored in disk) only update when commting
transaction.
Anyway, by triggering a sync is a little overhead. maybe we can
implement an sync ioctl for quota sync.
> * The qgroup show command is missing some information, for example you
> cannot see which subvolume is part of a parent qgroup.
This has been implemented in the latest chris's integration branch,you
can use
btrfs qgroup show -p <mnt>
> * Creating a qgroup from an existing directory will show a 0 usage
> until a full filesystem quota rescan is issued
In the latest kernel. if you enable quota, it will create qgroup
for every existed subvolume, and then rescan will be triggered
automatically.(only happens in rescanning)
When creating a subvolume, you can use
btrfs sub create -i <pid> <mnt>
this will add a parent qgroup for a subvolume the moment it was created,
we can avoid rescanning for this case.
However, if you create a parent qgroup and then assign subvolume qgroup
to this parent qgroup online, you have to rescan.
>
> * Using btrfs subvolume delete will break qgroup unshared space usage.
> * After deleting a subvolume, you must manually delete the associated qgroup.
This is true, for now, deleting a subvolume will cause wrong qgroup
accounting.
Jan sent a patch for this recently, hopely this problem can be solved as
soon as
possible.
I have planed to make a patch to drop associated qgroup when deleting a
subvolume
only if qgroup accounting problem has been fixed.
>
> Knowing this, if you create a qgroup after some files have been added
> to a subvolume, those never get accounted for until you rescan the
> whole volume. This means that if you manage to delete enough "not
> accounted for" files, you get negative numbers.
>
> Wiki: https://btrfs.wiki.kernel.org/index.php/Quota_support
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2013-10-30 1:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-28 22:34 memory leak in <=3.11.6 Kai Krakow
2013-10-29 3:24 ` Jérôme Poulin
2013-10-29 16:42 ` Duncan
2013-10-29 22:46 ` Jérôme Poulin
2013-10-30 1:55 ` Wang Shilong [this message]
2013-10-29 23:26 ` Kai Krakow
-- strict thread matches above, loose matches on Subject: below --
2013-10-29 4:22 Tomasz Chmielewski
2013-10-29 23:30 ` Kai Krakow
2013-10-30 7:58 ` Duncan
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=527066FD.3020309@cn.fujitsu.com \
--to=wangsl.fnst@cn.fujitsu.com \
--cc=1i5t5.duncan@cox.net \
--cc=jeromepoulin@gmail.com \
--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).