From 1b8c6f09bcba1996892a231bc6c25be6ac40d808 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 2 Oct 2020 11:12:49 +0200 Subject: [PATCH] debug: show actually reason for taking this code path Instead of not so useful backtrace, report what was the reason. --- lib/format_text/format-text.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c index 0de881b67..e1142c07e 100644 --- a/lib/format_text/format-text.c +++ b/lib/format_text/format-text.c @@ -2216,8 +2216,10 @@ static int _create_vg_text_instance(struct format_instance *fid, } if (type & FMT_INSTANCE_MDAS) { - if (!(vginfo = lvmcache_vginfo_from_vgname(vg_name, vg_id))) - goto_out; + if (!(vginfo = lvmcache_vginfo_from_vgname(vg_name, vg_id))) { + log_debug("No cached vginfo for VG %s and ID %s.", vg_name, vg_id); + goto out; + } if (!lvmcache_fid_add_mdas_vg(vginfo, fid)) goto_out; }