1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

Add error message if backup_to_file fails because of empty in_use mdas list.

This commit is contained in:
Dave Wysochanski 2010-06-29 15:03:59 +00:00
parent 5778fdeeb8
commit 559aee44ab

View File

@ -396,6 +396,11 @@ int backup_to_file(const char *file, const char *desc, struct volume_group *vg)
return 0;
}
if (!dm_list_size(&tf->metadata_areas_in_use)) {
log_error(INTERNAL_ERROR "No in use metadata areas to write.");
return 0;
}
/* Write and commit the metadata area */
dm_list_iterate_items(mda, &tf->metadata_areas_in_use) {
if (!(r = mda->ops->vg_write(tf, vg, mda))) {