]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: allow remapped chunks to have zero stripes
authorMark Harmstone <mark@harmstone.com>
Wed, 7 Jan 2026 14:09:03 +0000 (14:09 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 06:54:34 +0000 (07:54 +0100)
commitc3d6dda60c9da79a108592b14560e326384dbf4e
treea973f76ac185775aaf5f4f37d68898d2110876d5
parent0b4d29fa98ca1a49c4498353253f857573871ba0
btrfs: allow remapped chunks to have zero stripes

When a chunk has been fully remapped, we are going to set its
num_stripes to 0, as it will no longer represent a physical location on
disk.

Change tree-checker to allow for this, and fix read_one_chunk() to avoid
a divide by zero.

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-checker.c
fs/btrfs/volumes.c