NULL)) {
if (lv_is_active_but_not_locally(lv))
log_error("Unable to determine mirror sync status of"
- " remotely active LV, %s/%s",
- lv->vg->name, lv->name);
+ " remotely active LV, %s",
+ display_lvname(lv));
else
log_error("Unable to determine mirror "
- "sync status of %s/%s.",
- lv->vg->name, lv->name);
+ "sync status of %s.",
+ display_lvname(lv));
return 0;
}
new_lv->name = dm_pool_strdup(lv->vg->vgmem, split_name);
if (!new_lv->name) {
- log_error("Unable to rename newly split LV");
+ log_error("Unable to rename newly split LV.");
return 0;
}
while ((tmp_lv = find_temporary_mirror(lv))) {
mirror_seg = find_mirror_seg(first_seg(tmp_lv));
if (!mirror_seg) {
- log_error("Failed to find mirrored LV for %s",
- tmp_lv->name);
+ log_error("Failed to find mirrored LV for %s.",
+ display_lvname(tmp_lv));
return 0;
}
if (!_mirrored_lv_in_sync(mirror_seg->lv)) {
- log_verbose("Not collapsing %s: out-of-sync",
- mirror_seg->lv->name);
+ log_verbose("Not collapsing %s: out-of-sync.",
+ display_lvname(mirror_seg->lv));
return 1;
}
for (m = 0; m < num_mirrors; m++) {
if (!(img_lvs[m] = lv_create_empty(img_name,
- NULL, LVM_READ | LVM_WRITE,
- ALLOC_INHERIT, lv->vg))) {
+ NULL, LVM_READ | LVM_WRITE,
+ ALLOC_INHERIT, lv->vg))) {
log_error("Aborting. Failed to create mirror image LV. "
"Remove new LV and retry.");
return 0;
if (!lv_add_log_segment(ah, first_area, img_lvs[m], 0)) {
log_error("Failed to add mirror image segment"
" to %s. Remove new LV and retry.",
- img_lvs[m]->name);
+ display_lvname(img_lvs[m]));
return 0;
}
} else {
stripe_size, 0, 0)) {
log_error("Aborting. Failed to add mirror image segment "
"to %s. Remove new LV and retry.",
- img_lvs[m]->name);
+ display_lvname(img_lvs[m]));
return 0;
}
}
/* Check the segment params are compatible */
dm_list_iterate_items(seg, &lv->segments) {
if (!seg_is_mirrored(seg)) {
- log_error("Segment is not mirrored: %s:%" PRIu32,
- lv->name, seg->le);
+ log_error("Segment is not mirrored: %s:" FMTu32,
+ display_lvname(lv), seg->le);
return 0;
}
if ((seg->status & status_mask) != status_mask) {
- log_error("Segment status does not match: %s:%" PRIu32
- " status:0x%" PRIx64 "/0x%" PRIx64, lv->name, seg->le,
+ log_error("Segment status does not match: %s:" FMTu32
+ " status:0x" FMTx64 "/0x" FMTx64,
+ display_lvname(lv), seg->le,
seg->status, status_mask);
return 0;
}
uint32_t s;
if (!(lvs = dm_pool_alloc(cmd->mem, sizeof(*lvs)))) {
- log_error("lvs list alloc failed");
+ log_error("lvs list alloc failed.");
return NULL;
}
seg_lv(seg, s) != lv)
continue;
if (!(lvl = dm_pool_alloc(cmd->mem, sizeof(*lvl)))) {
- log_error("lv_list alloc failed");
+ log_error("lv_list alloc failed.");
return NULL;
}
lvl->lv = lv1;