From 0be8a9126f9e6e66bce186192fedbb5d841007f2 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sun, 2 Dec 2012 16:23:44 +0100 Subject: [PATCH] thin: lvconvert update messages --- tools/lvconvert.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/lvconvert.c b/tools/lvconvert.c index e428ce0fc..76588d2ac 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -1813,7 +1813,7 @@ static int _lvconvert_thinpool(struct cmd_context *cmd, /* We are changing target type, so deactivate first */ if (!deactivate_lv(cmd, pool_lv)) { - log_error("Can't deactivate logical volume %s/%s.", + log_error("Aborting. Failed to deactivate logical volume %s/%s.", pool_lv->vg->name, pool_lv->name); return 0; } @@ -1824,8 +1824,10 @@ static int _lvconvert_thinpool(struct cmd_context *cmd, return 0; } - if (dm_snprintf(name, len, "%s_tmeta", pool_lv->name) < 0) - return_0; + if (dm_snprintf(name, len, "%s_tmeta", pool_lv->name) < 0) { + log_error("Failed to create layer name."); + return 0; + } if (lp->pool_metadata_lv_name) { if (arg_count(cmd, stripesize_ARG) || arg_count(cmd, stripes_long_ARG)) { @@ -1864,8 +1866,8 @@ static int _lvconvert_thinpool(struct cmd_context *cmd, } if (!lv_is_active(metadata_lv) && !activate_lv_local(cmd, metadata_lv)) { - log_error("Aborting. Failed to activate thin metadata lv."); - return 0; + log_error("Aborting. Failed to activate thin metadata lv."); + return 0; } if (!set_lv(cmd, metadata_lv, UINT64_C(0), 0)) { log_error("Aborting. Failed to wipe thin metadata lv.");