From fbb356632c19c9262231e2062d2f708574f794ad Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Sat, 30 May 2015 15:54:48 +0100 Subject: btrfs-progs: mkfs: check metadata redundancy Currently BTRFS allows you to make bad choices of data and metadata levels. For example -d raid1 -m raid0 means you can only use half your total disk space, but will lose everything if 1 disk fails. It should give a warning in these cases. When making a filesystem, check that metadata mode is at least as redundant as the data mode. For example give warning when: -d raid1 -m raid0 Signed-off-by: Sam Tygier [make the check more visible in mkfs output] Signed-off-by: David Sterba --- utils.h | 1 + 1 file changed, 1 insertion(+) (limited to 'utils.h') diff --git a/utils.h b/utils.h index 5657c741..a0057de7 100644 --- a/utils.h +++ b/utils.h @@ -144,6 +144,7 @@ int test_dev_for_mkfs(char *file, int force_overwrite, char *estr); int get_label_mounted(const char *mount_path, char *labelp); int test_num_disk_vs_raid(u64 metadata_profile, u64 data_profile, u64 dev_cnt, int mixed, char *estr); +int group_profile_max_safe_loss(u64 flags); int is_vol_small(char *file); int csum_tree_block(struct btrfs_root *root, struct extent_buffer *buf, int verify); -- cgit v1.2.3