From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org, Eli V <eliventer@gmail.com>
Subject: Re: [PATCH] btrfs: prevent __btrfs_dump_space_info() to underflow its free space
Date: Fri, 17 Sep 2021 12:37:02 +0200 [thread overview]
Message-ID: <20210917103702.GJ9286@twin.jikos.cz> (raw)
In-Reply-To: <20210916124329.65141-1-wqu@suse.com>
On Thu, Sep 16, 2021 at 08:43:29PM +0800, Qu Wenruo wrote:
> It's not uncommon where __btrfs_dump_space_info() get called
> under over-commit situations.
>
> In that case free space would underflow as total allocated space is not
> enough to handle all the over-committed space.
>
> Such underflow values can sometimes cause confusion for users enabled
> enospc_debug mount option, and takes some seconds for developers to
> convert the underflow value to signed result.
>
> Just output the free space as s64 to avoid such problem.
>
> Reported-by: Eli V <eliventer@gmail.com>
> Link: https://lore.kernel.org/linux-btrfs/CAJtFHUSy4zgyhf-4d9T+KdJp9w=UgzC2A0V=VtmaeEpcGgm1-Q@mail.gmail.com/
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Added to misc-next, thanks.
prev parent reply other threads:[~2021-09-17 10:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 12:43 [PATCH] btrfs: prevent __btrfs_dump_space_info() to underflow its free space Qu Wenruo
2021-09-16 13:40 ` Anand Jain
2021-09-17 10:37 ` David Sterba [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=20210917103702.GJ9286@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=eliventer@gmail.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