return ret;
}
+/*
+ * stripe_alloc covers raid56 *data* block groups only. A filesystem whose
+ * metadata is also raid56 keeps the write hole there. The data guarantee is
+ * easy to read as a filesystem-wide one, so say once at mount what is not
+ * covered. (Mixed block groups cannot get here: the mount is refused, see
+ * btrfs_check_mountopts().)
+ */
+static void warn_stripe_alloc_uncovered(struct btrfs_fs_info *info)
+{
+ const u64 meta_bits = info->avail_metadata_alloc_bits |
+ info->avail_system_alloc_bits;
+
+ if (!btrfs_test_opt(info, STRIPE_ALLOC))
+ return;
+
+ if (meta_bits & BTRFS_BLOCK_GROUP_RAID56_MASK)
+ btrfs_warn(info,
+"stripe_alloc does not cover raid56 metadata: the write hole remains for metadata, consider converting it to raid1c3/raid1c4");
+}
+
int btrfs_read_block_groups(struct btrfs_fs_info *info)
{
struct btrfs_root *root = btrfs_block_group_root(info);
inc_block_group_ro(cache, true);
}
+ warn_stripe_alloc_uncovered(info);
btrfs_init_global_block_rsv(info);
ret = check_chunk_block_group_mappings(info);
error: