[PATCH 0/2] btrfs-progs: fix stale active zone after mkfs

Johannes Thumshirn <[email protected]>
Newsgroups org.kernel.vger.linux-btrfs
Message-ID <[email protected]>
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'.

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          | 154 +++++++++++++++++++++++++++++++++++++++++-
 kernel-shared/zoned.c |  18 ++++-
 2 files changed, 168 insertions(+), 4 deletions(-)

--
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.