All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] btrfs: adjust overcommit logic and fixes
@ 2023-09-27 17:46 Josef Bacik
  2023-09-27 17:46 ` [PATCH v2 1/3] btrfs: fix ->free_chunk_space math in btrfs_shrink_device Josef Bacik
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Josef Bacik @ 2023-09-27 17:46 UTC (permalink / raw)
  To: linux-btrfs, kernel-team

Hello,

This is an update to my original patch

https://lore.kernel.org/linux-btrfs/b97e47ce0ce1d41d221878de7d6090b90aa7a597.1695065233.git.josef@toxicpanda.com/

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(-)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-10-03 18:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-27 17:46 [PATCH v2 0/3] btrfs: adjust overcommit logic and fixes Josef Bacik
2023-09-27 17:46 ` [PATCH v2 1/3] btrfs: fix ->free_chunk_space math in btrfs_shrink_device Josef Bacik
2023-09-27 17:47 ` [PATCH v2 2/3] btrfs: increase ->free_chunk_space in btrfs_grow_device Josef Bacik
2023-09-29 16:30   ` David Sterba
2023-10-02 20:44     ` Josef Bacik
2023-10-03 18:47       ` David Sterba
2023-09-27 17:47 ` [PATCH v2 3/3] btrfs: adjust overcommit logic when very close to full Josef Bacik
2023-10-02 13:09 ` [PATCH v2 0/3] btrfs: adjust overcommit logic and fixes David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.