From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
To: Alin Dobre <alin.dobre@elastichosts.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Subvolume creation returns file exists
Date: Fri, 29 Nov 2013 13:40:39 +0800 [thread overview]
Message-ID: <529828D7.40109@cn.fujitsu.com> (raw)
In-Reply-To: <5297147B.7030904@elastichosts.com>
Hi Alin,
On 11/28/2013 06:01 PM, Alin Dobre wrote:
> It seems that the problem was that we didn't delete the corresponding
> qgroup when deleting the subvolume, which was filling the metadata
> with unused information. Removing all the stale qgroups fixes the
> problem and allows subsequent subvolume creation without any quota
> disable/enable action. Also, we are now automatically deleting the
> corresponding qgroup after the subvolume is removed.
Until now, we won't delete subvolume's corresponding qgroup
automactiallly yet. The main reason is:
Deleting subvolume is 'async', we still need to make qgroup accounting
correct(differ 'rfer' and 'excl').
In theory, we can only remove a qgroup safely when it's referenced goes
0. This is the main reason
why we don't delete subvolume qgroup directly.
And the point is deleting subvolume won't walk the whole fs tree, and
qgroup is dependent on this,
now, deleting subvolume may break qgroup accounting.(though qgroup
rescan can make it right, we
can not rely on this so much).
Anyway, though we don't remove qgroup automactially, it should not
affect subvolume creation
This is because qgroup is corresponding subvolume, it will not be resued
since subvolumeid
is although going larger.
Thanks,
Wang
>
> Cheers,
> Alin.
> --
> 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
>
prev parent reply other threads:[~2013-11-29 5:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-15 14:33 Subvolume creation returns file exists Alin Dobre
2013-11-15 15:27 ` Hugo Mills
2013-11-15 16:39 ` cwillu
2013-11-15 16:07 ` Duncan
2013-11-16 18:57 ` Duncan
2013-11-18 13:22 ` Alin Dobre
2013-11-28 10:01 ` Alin Dobre
2013-11-29 5:40 ` Wang Shilong [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=529828D7.40109@cn.fujitsu.com \
--to=wangsl.fnst@cn.fujitsu.com \
--cc=alin.dobre@elastichosts.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).