summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2021-10-14 18:44:55 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2021-10-14 23:34:11 +0200
commitaf0ce203e9f78e307bfb9524dc8377ebbc53e8f1 (patch)
treeee54c495112021d982bdd7d1e8b01a6ef48f347f
parent7e346ee2a5cd520fc038dda7451360bbe67e629f (diff)
downloadlvm2-af0ce203e9f78e307bfb9524dc8377ebbc53e8f1.tar.gz
debug: better error message
Add more details about size difference.
-rw-r--r--lib/format_text/format-text.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index 654c387bf..941a34944 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -1922,7 +1922,9 @@ static int _text_pv_initialise(const struct format_type *fmt,
pv->pe_count = pva->extent_count;
if ((pv->pe_start + pv->pe_count * (uint64_t)pv->pe_size - 1) > pv->size) {
- log_error("Physical extents end beyond end of device %s.",
+ log_error("Physical extents (%s) end beyond end of device (%s) %s.",
+ display_size(pv->fmt->cmd, pv->pe_start + pv->pe_count * (uint64_t)pv->pe_size - 1),
+ display_size(pv->fmt->cmd, pv->size),
pv_dev_name(pv));
return 0;
}