found_inconsistent = 1;
} else {
if (!dm_pool_grow_object(mem, DEV_LIST_DELIM, sizeof(DEV_LIST_DELIM) - 1))
- goto_bad;
+ return_0;
}
if (!dm_pool_grow_object(mem, dev_name(dev), 0))
- goto_bad;
+ return_0;
}
}
return 1;
if (!dm_pool_grow_object(mem, "\0", 1))
- goto_bad;
+ return_0;
used_devnames = dm_pool_end_object(mem);
found_inconsistent = 0;
if (seg_type(seg, s) == AREA_PV) {
if (!(dev = seg_dev(seg, s))) {
log_error("Couldn't find device for segment belonging to "
- "%s/%s while checking used and assumed devices.",
- lv->vg->name, lv->name);
- goto bad;
+ "%s while checking used and assumed devices.",
+ display_lvname(lv));
+ return 0;
}
if (!(dev->flags & DEV_USED_FOR_LV)) {
if (!found_inconsistent) {
found_inconsistent = 1;
} else {
if (!dm_pool_grow_object(mem, DEV_LIST_DELIM, sizeof(DEV_LIST_DELIM) - 1))
- goto_bad;
+ return_0;
}
if (!dm_pool_grow_object(mem, dev_name(dev), 0))
- goto bad;
+ return_0;
}
}
}
if (found_inconsistent) {
if (!dm_pool_grow_object(mem, "\0", 1))
- goto_bad;
+ return_0;
assumed_devnames = dm_pool_end_object(mem);
}
- log_warn("WARNING: Device mismatch detected for %s/%s which is accessing %s instead of %s.",
- lv->vg->name, lv->name, used_devnames, assumed_devnames);
+ log_warn("WARNING: Device mismatch detected for %s which is accessing %s instead of %s.",
+ display_lvname(lv), used_devnames, assumed_devnames);
- /* This also frees assumed_devnames. */
- dm_pool_free(mem, (void *) used_devnames);
return 1;
-bad:
- if (found_inconsistent)
- dm_pool_abandon_object(mem);
- return 0;
}
static int _check_devs_used_correspond_with_vg(struct volume_group *vg)