diff options
author | Qu Wenruo <wqu@suse.com> | 2021-09-16 20:43:29 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-09-17 19:29:54 +0200 |
commit | 0619b7901473c380abc05d45cf9c70bee0707db3 (patch) | |
tree | f42753a4a43efeab084230366f5ef47eba8d81d6 /fs/pstore | |
parent | 6b225baababf1e3d41a4250e802cbd193e1343fb (diff) |
btrfs: prevent __btrfs_dump_space_info() to underflow its free space
It's not uncommon where __btrfs_dump_space_info() gets 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/
CC: stable@vger.kernel.org # 5.4+
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/pstore')
0 files changed, 0 insertions, 0 deletions