linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Josef Bacik <josef@toxicpanda.com>,
	linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] btrfs: force chunk allocation if our global rsv is larger than metadata
Date: Tue, 17 Mar 2020 17:47:21 +0200	[thread overview]
Message-ID: <45abfae5-8795-d0a3-2d4e-5040d1d7e6df@suse.com> (raw)
In-Reply-To: <20200313192848.140759-1-josef@toxicpanda.com>



On 13.03.20 г. 21:28 ч., Josef Bacik wrote:
> Nikolay noticed a bunch of test failures with my global rsv steal
> patches.  At first he thought they were introduced by them, but they've
> been failing for a while with 64k nodes.
> 
> The problem is with 64k nodes we have a global reserve that calculates
> out to 13mib on a freshly made file system, which only has 8mib of
> metadata space.  Because of changes I previously made we no longer
> account for the global reserve in the overcommit logic, which means we
> correctly allow overcommit to happen even though we are already
> overcommitted.
> 
> However in some corner cases, for example btrfs/170, we will allocate
> the entire file system up with data chunks before we have enough space
> pressure to allocate a metadata chunk.  Then once the fs is full we
> ENOSPC out because we cannot overcommit and the global reserve is taking
> up all of the available space.
> 
> The most ideal way to deal with this is to change our space reservation
> stuff to take into account the height of the tree's that we're
> modifying, so that our global reserve calculation does not end up so
> obscenely large.
> 
> However that is a huuuuuuge undertaking.  Instead fix this by forcing a
> chunk allocation if the global reserve is larger than the total metadata
> space.  This gives us essentially the same behavior that happened
> before, we get a chunk allocated and these tests can pass.
> 
> This is meant to be a stop-gap measure until we can tackle the "tree
> height only" project.
> 
> Fixes: 0096420adb03 ("btrfs: do not account global reserve in can_overcommit")
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>

Tested-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>

  reply	other threads:[~2020-03-17 15:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 19:28 [PATCH] btrfs: force chunk allocation if our global rsv is larger than metadata Josef Bacik
2020-03-17 15:47 ` Nikolay Borisov [this message]
2020-04-06 16:00 ` David Sterba

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=45abfae5-8795-d0a3-2d4e-5040d1d7e6df@suse.com \
    --to=nborisov@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@fb.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).