]> git.hungrycats.org Git - linux/commit
btrfs: load the on-disk btrfs_chunk::stripe_len
authorQu Wenruo <wqu@suse.com>
Wed, 21 Oct 2026 03:39:36 +0000 (14:09 +1030)
committerDavid Sterba <dsterba@suse.com>
Fri, 30 Oct 2026 20:36:18 +0000 (21:36 +0100)
commita70aaa1289dffa5e165b39ebd3c46141203e9b5a
tree7b28fd7eb4914d03ff235dd98ea46a3b276504b3
parentdb7cb7b6d9044ca4c3137ffda8055314d76e3608
btrfs: load the on-disk btrfs_chunk::stripe_len

Currently btrfs doesn't load btrfs_chunk::stripe_len into
btrfs_chunk_map, as tree-checker will reject any chunk whose stripe_len
is not 64K.

But for the future we will want stripe length other than 64K.

As a preparation for the variable stripe length in the future, load
btrfs_chunk::stripe_len into btrfs_chunk_map::stripe_len and
stripe_shift.

For now stripe_len is still 64K, no matter if it's loaded from the
on-disk metadata or newly allocated chunk.
As tree-checker still rejects any chunk whose stripe_len is not 64K.

The two new members fit into the existing hole of btrfs_chunk_map, so
the size of btrfs_chunk_map stay the same.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c
fs/btrfs/volumes.h