mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-31 18:01:34 +00:00
btrfs-progs: fix space_cache generation again when free-space-tree is enabled
In commita138daac17
("btrfs-progs: mkfs: set super_cache_generation to 0 if we're using free space tree") the space cache (v1) generation was reset to 0 to let kernel know it's not used when the free-space-tree is enabled. This got broken again in 5.14 when the free space tree code got refactored in4b6cf2a3eb
("btrfs-progs: mkfs: generate free space tree at make_btrfs() time"). Reset the space cache generation to 0. Issue: #414 Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
e9a7efb1b6
commit
c0c307c313
@ -308,6 +308,7 @@ int make_btrfs(int fd, struct btrfs_mkfs_config *cfg)
|
||||
BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE_VALID;
|
||||
|
||||
btrfs_set_super_compat_ro_flags(&super, ro_flags);
|
||||
btrfs_set_super_cache_generation(&super, 0);
|
||||
}
|
||||
if (cfg->label)
|
||||
__strncpy_null(super.label, cfg->label, BTRFS_LABEL_SIZE - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user