public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Steigerwald <martin@lichtvoll.de>
To: Marc MERLIN <marc@merlins.org>
Cc: dsterba@suse.cz, Josef Bacik <josef@toxicpanda.com>,
	linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] btrfs: do not zero f_bavail if we have available space
Date: Wed, 19 Feb 2020 10:17:24 +0100	[thread overview]
Message-ID: <2776783.E9KYCc1pZO@merkaba> (raw)
In-Reply-To: <CAKhhfD7S=kcKLRURdNFZ8H4beS8=XjFvnOQXche7+SVOGFGC_w@mail.gmail.com>

Marc MERLIN - 19.02.20, 01:42:57 CET:
> Has the patch gotten to any 5.5 release too?

Yes, as git log easily reveals.

> On Sun, Feb 2, 2020, 12:53 David Sterba <dsterba@suse.cz> wrote:
> > On Fri, Jan 31, 2020 at 09:31:05AM -0500, Josef Bacik wrote:
> > > There was some logic added a while ago to clear out f_bavail in
> > > statfs() if we did not have enough free metadata space to satisfy
> > > our global reserve.  This was incorrect at the time, however
> > > didn't really pose a problem for normal file systems because we
> > > would often allocate chunks if we got this low on free metadata
> > > space, and thus wouldn't really hit this case unless we were
> > > actually full.
> > > 
> > > Fast forward to today and now we are much better about not
> > > allocating
> > > metadata chunks all of the time.  Couple this with d792b0f19711
> > > which
> > > now means we'll easily have a larger global reserve than our free
> > > space, we are now more likely to trip over this while still
> > > having plenty of space.
> > > 
> > > Fix this by skipping this logic if the global rsv's space_info is
> > > not
> > > full.  space_info->full is 0 unless we've attempted to allocate a
> > > chunk for that space_info and that has failed.  If this happens
> > > then the space for the global reserve is definitely sacred and we
> > > need to report b_avail == 0, but before then we can just use our
> > > calculated b_avail.
> > > 
> > > There are other cases where df isn't quite right, and Qu is
> > > addressing them in a more holistic way.  This simply fixes the
> > > users that are currently experiencing pain because of this
> > > problem.
> > > 
> > > Fixes: ca8a51b3a979 ("btrfs: statfs: report zero available if
> > > metadata> 
> > are exhausted")
> > 
> > > Reported-by: Martin Steigerwald <martin@lichtvoll.de>
> > > Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> > 
> > Added to 5.6 queue, thanks.


-- 
Martin



  parent reply	other threads:[~2020-02-19  9:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-31 14:31 [PATCH] btrfs: do not zero f_bavail if we have available space Josef Bacik
2020-01-31 20:06 ` Martin Steigerwald
2020-02-01  1:00 ` Qu Wenruo
2020-02-02 17:52 ` David Sterba
     [not found]   ` <CAKhhfD7S=kcKLRURdNFZ8H4beS8=XjFvnOQXche7+SVOGFGC_w@mail.gmail.com>
2020-02-19  9:17     ` Martin Steigerwald [this message]
2020-02-19 13:43       ` Marc MERLIN
2020-02-19 14:31         ` David Sterba
2020-02-19 15:36           ` Marc MERLIN
2020-02-19 17:50             ` Roman Mamedov
2020-02-19 22:21               ` Martin Steigerwald
2020-02-20 21:46             ` Marc MERLIN
2020-02-21  5:38               ` Marc MERLIN
2020-02-21  5:45                 ` Roman Mamedov
2020-02-21 23:07                   ` btrfs filled up dm-thin and df%: shows 8.4TB of data used when I'm only using 10% of that Marc MERLIN
2020-02-21 23:17                     ` How to roll back btrfs filesystem a few revisions? Marc MERLIN
2020-02-21 23:47                       ` Josef Bacik
2020-02-22  0:08                         ` Marc MERLIN
2020-02-22  0:36                           ` Josef Bacik
2020-02-21 23:43                     ` btrfs filled up dm-thin and df%: shows 8.4TB of data used when I'm only using 10% of that Josef Bacik
2020-02-22  0:01                       ` Marc MERLIN
2020-02-22  0:43                         ` Josef Bacik
2020-02-22  1:06                         ` Marc MERLIN
2020-02-22  1:23                           ` Marc MERLIN
2020-02-22 14:51                             ` Marc MERLIN
2020-02-22 14:52                               ` Josef Bacik
2020-02-22 15:24                                 ` Marc MERLIN

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=2776783.E9KYCc1pZO@merkaba \
    --to=martin@lichtvoll.de \
    --cc=dsterba@suse.cz \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=marc@merlins.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