1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

debug: use display_lvname

This commit is contained in:
Zdenek Kabelac 2023-07-12 13:50:21 +02:00
parent c38b668fc3
commit 4d70e7bf78

View File

@ -2642,8 +2642,8 @@ int vg_validate(struct volume_group *vg)
if (!strcmp(vg->lock_type, "sanlock")) { if (!strcmp(vg->lock_type, "sanlock")) {
if (dm_hash_lookup(vhash.lv_lock_args, lvl->lv->lock_args)) { if (dm_hash_lookup(vhash.lv_lock_args, lvl->lv->lock_args)) {
log_error(INTERNAL_ERROR "LV %s/%s has duplicate lock_args %s.", log_error(INTERNAL_ERROR "LV %s has duplicate lock_args %s.",
vg->name, lvl->lv->name, lvl->lv->lock_args); display_lvname(lvl->lv), lvl->lv->lock_args);
r = 0; r = 0;
} }
@ -2657,15 +2657,15 @@ int vg_validate(struct volume_group *vg)
if (lv_is_cache_vol(lvl->lv)) { if (lv_is_cache_vol(lvl->lv)) {
log_debug("lock_args will be ignored on cache vol"); log_debug("lock_args will be ignored on cache vol");
} else if (lvl->lv->lock_args) { } else if (lvl->lv->lock_args) {
log_error(INTERNAL_ERROR "LV %s/%s shouldn't have lock_args", log_error(INTERNAL_ERROR "LV %s shouldn't have lock_args %s.",
vg->name, lvl->lv->name); display_lvname(lvl->lv), lvl->lv->lock_args);
r = 0; r = 0;
} }
} }
} else { } else {
if (lvl->lv->lock_args) { if (lvl->lv->lock_args) {
log_error(INTERNAL_ERROR "LV %s/%s with no lock_type has lock_args %s", log_error(INTERNAL_ERROR "LV %s with no lock_type has lock_args %s.",
vg->name, lvl->lv->name, lvl->lv->lock_args); display_lvname(lvl->lv), lvl->lv->lock_args);
r = 0; r = 0;
} }
} }