mbox series

[v3,0/2] btrfs: zoned: always set aside a zone for relocation

Message ID 20240521-zoned-gc-v3-0-7db9742454c7@kernel.org (mailing list archive)
Headers show
Series btrfs: zoned: always set aside a zone for relocation | expand

Message

Johannes Thumshirn May 21, 2024, 2:58 p.m. UTC
For zoned filesytsems we heavily rely on relocation for garbage collecting
as we cannot do any in-place updates of disk blocks.

But there can be situations where we're running out of space for doing the
relocation.

To solve this, always have a zone reserved for relocation.

This is a subset of another approach to this problem I've submitted in 
https://lore.kernel.org/r/20240328-hans-v1-0-4cd558959407@kernel.org

---
Changes in v3:
- Rename btrfs_reserve_relocation_zone -> btrfs_reserve_relocation_bg
- Bail out if we already have a relocation bg set
- Link to v2: https://lore.kernel.org/r/20240515-zoned-gc-v2-0-20c7cb9763cd@kernel.org

Changes in v2:
- Incorporate Naohiro's review
- Link to v1: https://lore.kernel.org/r/20240514-zoned-gc-v1-0-109f1a6c7447@kernel.org

---
Johannes Thumshirn (2):
      btrfs: zoned: reserve relocation block-group on mount
      btrfs: reserve new relocation block-group after successful relocation

 fs/btrfs/disk-io.c    |  2 ++
 fs/btrfs/relocation.c |  7 ++++++
 fs/btrfs/zoned.c      | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/zoned.h      |  3 +++
 4 files changed, 77 insertions(+)
---
base-commit: d52875a6df98dc77933853e8427bd77f4598a9a7
change-id: 20240514-zoned-gc-2ce793459eb7

Best regards,