From e7eb5b069689cc0fe76a95cda2fb850a6a1d2c21 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 15 Jun 2015 14:33:29 +0200 Subject: [PATCH] debug: better tracing messages Enhance traced output. --- lib/activate/activate.c | 5 ++++- lib/activate/dev_manager.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/activate/activate.c b/lib/activate/activate.c index 55956fdc3..8c89f98a2 100644 --- a/lib/activate/activate.c +++ b/lib/activate/activate.c @@ -2010,7 +2010,9 @@ static int _lv_resume(struct cmd_context *cmd, const char *lvid_s, log_debug_activation("Resuming LV %s/%s%s%s%s.", lv->vg->name, lv->name, error_if_not_active ? "" : " if active", - laopts->origin_only ? " without snapshots" : "", + laopts->origin_only ? + (lv_is_thin_pool(lv) ? " pool only" : + lv_is_thin_volume(lv) ? " thin only" : " without snapshots") : "", laopts->revert ? " (reverting)" : ""); if (!lv_info(cmd, lv, laopts->origin_only, &info, 0, 0)) @@ -2272,6 +2274,7 @@ static int _lv_activate(struct cmd_context *cmd, const char *lvid_s, if (info.exists && !info.suspended && info.live_table && (info.read_only == read_only_lv(lv, laopts))) { r = 1; + log_debug_activation("Volume is already active."); goto out; } diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index 1171f4c34..9624feb07 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -3042,7 +3042,10 @@ static int _tree_action(struct dev_manager *dm, const struct logical_volume *lv, int r = 0; if (action < DM_ARRAY_SIZE(_action_names)) - log_debug_activation("Creating %s tree for %s.", _action_names[action], lv->name); + log_debug_activation("Creating %s%s tree for %s.", + _action_names[action], + (laopts->origin_only) ? " origin-only" : "", + display_lvname(lv)); /* Some LV can be used for top level tree */ /* TODO: add more.... */