From: Boris Burkov <boris@bur.io>
To: Josef Bacik <josef@toxicpanda.com>
Cc: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH RFC] btrfs: reflink: disable cross-subvolume clone/dedupe for simple quota
Date: Thu, 21 Mar 2024 12:08:57 -0700 [thread overview]
Message-ID: <20240321190857.GA107915@zen.localdomain> (raw)
In-Reply-To: <20240321185135.GB3186943@perftesting>
On Thu, Mar 21, 2024 at 02:51:35PM -0400, Josef Bacik wrote:
> On Thu, Mar 21, 2024 at 02:09:38PM +1030, Qu Wenruo wrote:
> > Unlike the full qgroup, simple quota no longer makes backref walk to
> > properly make accurate accounting for each subvolume.
> >
> > Instead it goes a much faster and much simpler way, anything modified by
> > the subvolume would be accounted to that subvolume.
> >
> > Although it brings some small accuracy problem, mostly related to shared
> > extents between different subvolumes, the reduced overhead is more than
> > good enough.
> >
> > Considering there are only 2 ways to share extents between subvolumes:
> >
> > - Snapshotting
> > - Cross-subvolume clone/dedupe
> >
> > And since snapshotting is the core functionality of btrfs, we will never
> > disable that.
> >
> > But on the other hand, cross-subvolume snapshotting is not so critical,
> > and disabling that for simple quota would improve the accuracy of it,
> > I'd say it's worthy to do that.
> >
>
> We did this on purpose, and absolutely want to leave this functionality in
> place. Boris made sure to document this behavior explicitly, because we are
> absolutely taking advantage of this internally by having the package management
> subvolume managed under a different quota, and then reflinking those packages
> into their containers volume. This is the price of squotas, you aren't getting
> full tracking, but you're getting limits and speed. Thanks,
>
> Josef
For a little extra context, if we hadn't wanted to support reflinking,
then squotas would have been yet simplER, and wouldn't have needed the
new inline owner refs. For better or worse, we decided it was in fact
quite important, so we added the owner refs. Now that we did the hard
work and committed to the incompat change, I certainly think it makes
sense to leave the support.
Boris
next prev parent reply other threads:[~2024-03-21 19:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 3:39 [PATCH RFC] btrfs: reflink: disable cross-subvolume clone/dedupe for simple quota Qu Wenruo
2024-03-21 7:34 ` Roman Mamedov
2024-03-21 13:25 ` David Disseldorp
2024-03-21 20:17 ` Qu Wenruo
2024-03-21 18:51 ` Josef Bacik
2024-03-21 19:08 ` Boris Burkov [this message]
2024-03-21 23:59 ` Qu Wenruo
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=20240321190857.GA107915@zen.localdomain \
--to=boris@bur.io \
--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