blkid_dev dev = NULL;
blkid_cache cache = NULL;
- if (blkid_get_cache(&cache, 0) < 0) {
+ if (blkid_get_cache(&cache, NULL) < 0) {
printf("ERROR: lblkid cache get failed\n");
return 1;
}
}
int test_num_disk_vs_raid(u64 metadata_profile, u64 data_profile,
- u64 dev_cnt, int mixed)
+ u64 dev_cnt, int mixed, int ssd)
{
u64 allowed = 0;
return 1;
}
- if (!mixed && (data_profile & BTRFS_BLOCK_GROUP_DUP)) {
- fprintf(stderr,
- "ERROR: DUP for data is allowed only in mixed mode\n");
- return 1;
- }
+ warning_on(!mixed && (data_profile & BTRFS_BLOCK_GROUP_DUP) && ssd,
+ "DUP may not actually lead to 2 copies on the device, see manual page");
+
return 0;
}
if (btrfs_scan_done)
return 0;
- if (blkid_get_cache(&cache, 0) < 0) {
+ if (blkid_get_cache(&cache, NULL) < 0) {
printf("ERROR: lblkid cache get failed\n");
return 1;
}