All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - debug: better error message
Date: Thu, 14 Oct 2021 21:37:07 +0000 (GMT)	[thread overview]
Message-ID: <20211014213707.6AE1F3858419@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=af0ce203e9f78e307bfb9524dc8377ebbc53e8f1
Commit:        af0ce203e9f78e307bfb9524dc8377ebbc53e8f1
Parent:        7e346ee2a5cd520fc038dda7451360bbe67e629f
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Thu Oct 14 18:44:55 2021 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Thu Oct 14 23:34:11 2021 +0200

debug: better error message

Add more details about size difference.
---
 lib/format_text/format-text.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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;
 	}



                 reply	other threads:[~2021-10-14 21:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211014213707.6AE1F3858419@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.