Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] btrfs-progs: fix stale active zone after mkfs
@ 2026-09-04  6:24 Johannes Thumshirn
  2026-09-04  6:24 ` [PATCH v2 1/2] btrfs-progs: zoned: refresh stale cached zone state in btrfs_reset_dev_zone() Johannes Thumshirn
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Johannes Thumshirn @ 2026-09-04  6:24 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba, Qu Wenruo, Naohiro Aota, Johannes Thumshirn

On zoned devices, mkfs can leave a stale zone behind that is used as a
staging area but never reset. This zone is not backed by a chunk or
device extent, so the FS itself does not account it as used. On devices
that have a limitied active zone budget this can lead to premature
ENOSPC and/or an exhaustion of active zones.

Fix it in mkfs for new file-systems and also add a check to fsck to find
such zones and repair them with '--repair'.

Changes to v1:
- fix a bug in fsck where it had a stale return value propagated.

Johannes Thumshirn (2):
  btrfs-progs: zoned: refresh stale cached zone state in
    btrfs_reset_dev_zone()
  btrfs-progs: check: detect leaked active zones on zoned devices

 check/main.c          | 156 +++++++++++++++++++++++++++++++++++++++++-
 kernel-shared/zoned.c |  18 ++++-
 2 files changed, 170 insertions(+), 4 deletions(-)

--
2.55.0


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

end of thread, other threads:[~2026-09-14 20:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-04  6:24 [PATCH v2 0/2] btrfs-progs: fix stale active zone after mkfs Johannes Thumshirn
2026-09-04  6:24 ` [PATCH v2 1/2] btrfs-progs: zoned: refresh stale cached zone state in btrfs_reset_dev_zone() Johannes Thumshirn
2026-09-04  6:24 ` [PATCH v2 2/2] btrfs-progs: check: detect leaked active zones on zoned devices Johannes Thumshirn
2026-09-14 17:27 ` [PATCH v2 0/2] btrfs-progs: fix stale active zone after mkfs David Sterba
2026-09-14 17:40 ` David Sterba
2026-09-14 19:55   ` David Sterba
2026-09-14 20:26     ` David Sterba

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