aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2023-09-27 13:46:59 -0400
committerDavid Sterba <dsterba@suse.com>2023-10-12 16:44:15 +0200
commite9fd2c05239ae423af45f99e2964ad086f800e33 (patch)
tree1d71a4880b1afd82e7e4a67b2e40e18e493d33dc /tools/perf/scripts/python
parentefba1454493df546dcee603c4b77db3a230ac054 (diff)
btrfs: fix ->free_chunk_space math in btrfs_shrink_device
There are two bugs in how we adjust ->free_chunk_space in btrfs_shrink_device. First we're removing the entire diff between new_size and old_size from ->free_chunk_space. This only works if we're reducing the free area, which we could potentially not be. So adjust the math to only subtract the diff in the free space from ->free_chunk_space. Additionally in the error case we're unconditionally adding the diff back into ->free_chunk_space, which we need to only do if this device is writeable. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions