public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Free space tree space reservation fixes
@ 2021-12-02 20:34 Josef Bacik
  2021-12-02 20:34 ` [PATCH v2 1/2] btrfs: include the free space tree in the global rsv minimum calculation Josef Bacik
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Josef Bacik @ 2021-12-02 20:34 UTC (permalink / raw)
  To: linux-btrfs, kernel-team

v1->v2:
- Updated the changelog for "btrfs: reserve extra space for free space tree" to
  make it clear why we're doubling the space reservation per Nikolay's request.

--- Original email ---
Hello,

Filipe reported a problem where he was getting an ENOSPC abort when running
delayed refs for generic/619.  This is because of two reasons, first generic/619
creates a very small file system, and our global block rsv calculation doesn't
take into account the size of the free space tree.  Thus we could get into a
situation where the global block rsv was not enough to handle the overflow.

The second is because we simply do not reserve space for the free space tree
modifications.  Fix this by making sure any free space tree root has their block
rsv set to the delayed refs rsv, and then make sure if we have the free space
tree enabled we're reserving extra space for those operations.

With these patches the problem Filipe was hitting went away.  Thanks,

Josef

Josef Bacik (2):
  btrfs: include the free space tree in the global rsv minimum
    calculation
  btrfs: reserve extra space for the free space tree

 fs/btrfs/block-rsv.c   | 31 ++++++++++++++++++-------------
 fs/btrfs/delayed-ref.c | 22 ++++++++++++++++++++++
 2 files changed, 40 insertions(+), 13 deletions(-)

-- 
2.26.3


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

end of thread, other threads:[~2021-12-07 18:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-02 20:34 [PATCH v2 0/2] Free space tree space reservation fixes Josef Bacik
2021-12-02 20:34 ` [PATCH v2 1/2] btrfs: include the free space tree in the global rsv minimum calculation Josef Bacik
2021-12-02 20:34 ` [PATCH v2 2/2] btrfs: reserve extra space for the free space tree Josef Bacik
2021-12-06 10:44   ` Filipe Manana
2021-12-06 19:43     ` Josef Bacik
2021-12-03 13:09 ` [PATCH v2 0/2] Free space tree space reservation fixes Nikolay Borisov
2021-12-06 10:42 ` Filipe Manana
2021-12-06 19:54   ` Josef Bacik
2021-12-07 18:59 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox