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

debug: use display_lvname

Add some tracing message
This commit is contained in:
Zdenek Kabelac 2016-05-18 15:22:26 +02:00
parent 197066c863
commit 9c083d34af
2 changed files with 6 additions and 1 deletions

View File

@ -2154,6 +2154,7 @@ static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree,
dm_list_iterate(snh, &lv->snapshot_segs)
if (!_add_lv_to_dtree(dm, dtree, dm_list_struct_base(snh, struct lv_segment, origin_list)->cow, 0))
return_0;
if (dm->activation && !origin_only && lv_is_merging_origin(lv) &&
!_add_lv_to_dtree(dm, dtree, find_snapshot(lv)->lv, 1))
return_0;
@ -3104,6 +3105,7 @@ static int _tree_action(struct dev_manager *dm, const struct logical_volume *lv,
/* Some targets may build bigger tree for activation */
dm->activation = ((action == PRELOAD) || (action == ACTIVATE));
dm->suspend = (action == SUSPEND_WITH_LOCKFS) || (action == SUSPEND);
if (!(dtree = _create_partial_dtree(dm, lv, laopts->origin_only)))
return_0;

View File

@ -569,8 +569,11 @@ static int _read_lvnames(struct format_instance *fid __attribute__((unused)),
if (!(lv->name = dm_pool_strdup(mem, lvn->key)))
return_0;
log_debug_metadata("Importing logical volume %s.", display_lvname(lv));
if (!(lvn = lvn->child)) {
log_error("Empty logical volume section.");
log_error("Empty logical volume section for %s.",
display_lvname(lv));
return 0;
}