btrfs: adjust overcommit logic and fixes
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest3 patches 4 repliesIn review
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | btrfs: fix ->free_chunk_space math in btrfs_shrink_devicefs/ | +17 | 0 replies | |
| 2/3 | btrfs: increase ->free_chunk_space in btrfs_grow_devicefs/ | +1 | 3 replies | |
| 3/3 | btrfs: adjust overcommit logic when very close to fullfs/ | +32 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/3] btrfs: adjust overcommit logic and fixes
Hello,
This is an update to my original patch
This was causing failures with btrfs/156 and btrfs/177. The btrfs/156 problem was caused by the fact that I was just subtracting 1g from the available space. I missed a spot where we also limit the chunk size to 10% of the file system, so I've updated the calculation to be exactly what we choose from the chunk allocator, and this resovled the btrfs/156 failure.
The btrfs/177 failure was actually due to a underflow in ->free_chunk_space where we weren't adding the new space we got from btrfs_grow_device. I also noticed a slight issue with how we remove space from ->free_chunk_space in btrfs_srhink_device so I fixed that as well.
With these 3 patches we're no longer seeing the above failures and the original test case is also fixed. Thanks,
Josef
Josef Bacik (3):
btrfs: fix ->free_chunk_space math in btrfs_shrink_device
btrfs: increase ->free_chunk_space in btrfs_grow_device
btrfs: adjust overcommit logic when very close to full
fs/btrfs/space-info.c | 32 ++++++++++++++++++++++++++++++++ fs/btrfs/volumes.c | 21 ++++++++++++++++++--- 2 files changed, 50 insertions(+), 3 deletions(-)
Signature · 1 line
2.41.0