From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/3] btrfs: qgroup: Fix the long existing regression of btrfs/153
Date: Thu, 2 Jul 2020 15:22:17 +0200 [thread overview]
Message-ID: <20200702132217.GL27795@twin.jikos.cz> (raw)
In-Reply-To: <20200702001434.7745-1-wqu@suse.com>
On Thu, Jul 02, 2020 at 08:14:31AM +0800, Qu Wenruo wrote:
> Since commit c6887cd11149 ("Btrfs: don't do nocow check unless we have to"),
> btrfs/153 always fails with early EDQUOT.
>
> This is caused by the fact that:
> - We always reserved data space for even NODATACOW buffered write
> This is mostly to improve performance, and not pratical to revert.
>
> - Btrfs qgroup data and meta reserved space share the same limit
> So it's not ensured to return EDQUOT just for that data reservation,
> metadata reservation can also get EDQUOT, means we can't go the same
> solution as that commit.
>
> This patchset will solve it by doing extra qgroup space flushing when
> EDQUOT is hit.
>
> This is a little like what we do in ticketing space reservation system,
> but since there are very limited ways for qgroup to reclaim space,
> currently it's still handled in qgroup realm, not reusing the ticketing
> system yet.
>
> By this, this patch could solve the btrfs/153 problem, while still keep
> btrfs qgroup space usage under the limit.
>
> The only cost is, when we're near qgroup limit, we will cause more dirty
> inodes flush and transaction commit, much like what we do when the
> metadata space is near exhausted.
> So the cost should be still acceptable.
This sounds like a reasonable solution to me. Making the behaviour
closer to ticket reservations would probably make it easier to switch
some day.
next prev parent reply other threads:[~2020-07-02 13:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 0:14 [PATCH 0/3] btrfs: qgroup: Fix the long existing regression of btrfs/153 Qu Wenruo
2020-07-02 0:14 ` [PATCH 1/3] btrfs: Introduce extent_changeset_revert() for qgroup Qu Wenruo
2020-07-02 13:40 ` Josef Bacik
2020-07-02 13:50 ` Qu Wenruo
2020-07-02 13:56 ` Josef Bacik
2020-07-02 14:07 ` Qu Wenruo
2020-07-02 0:14 ` [PATCH 2/3] btrfs: qgroup: Try to flush qgroup space when we get -EDQUOT Qu Wenruo
2020-07-02 13:43 ` Josef Bacik
2020-07-02 13:54 ` Qu Wenruo
2020-07-02 13:57 ` Josef Bacik
2020-07-02 14:19 ` Qu Wenruo
2020-07-02 14:58 ` Josef Bacik
2020-07-02 23:36 ` Qu Wenruo
2020-07-02 0:14 ` [PATCH 3/3] Revert "btrfs: qgroup: Commit transaction in advance to reduce early EDQUOT" Qu Wenruo
2020-07-02 13:11 ` David Sterba
2020-07-02 13:22 ` David Sterba [this message]
2020-07-02 13:28 ` [PATCH 0/3] btrfs: qgroup: Fix the long existing regression of btrfs/153 Josef Bacik
2020-07-02 13:41 ` David Sterba
2020-07-02 13:44 ` Josef Bacik
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=20200702132217.GL27795@twin.jikos.cz \
--to=dsterba@suse.cz \
--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