Linux block layer
 help / color / mirror / Atom feed
From: Zhan Xusheng <zhanxusheng1024@gmail.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-efi@vger.kernel.org, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, zhanxusheng@xiaomi.com,
	Zhan Xusheng <zhanxusheng1024@gmail.com>
Subject: [PATCH 1/2] block: partitions: efi: report the right relation for last_usable_lba
Date: Fri, 21 Aug 2026 15:23:54 +0800	[thread overview]
Message-ID: <20260821072355.2006771-1-zhanxusheng@xiaomi.com> (raw)

From: Zhan Xusheng <zhanxusheng1024@gmail.com>

From: Zhan Xusheng <zhanxusheng@xiaomi.com>

The check rejects a header whose last_usable_lba is below its
first_usable_lba, but the message prints the two with ">" between them,
carried over from the preceding test against lastlba.

Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
---
 block/partitions/efi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/partitions/efi.c b/block/partitions/efi.c
index 9865d59093fa..76994d3edd1a 100644
--- a/block/partitions/efi.c
+++ b/block/partitions/efi.c
@@ -406,7 +406,7 @@ static int is_gpt_valid(struct parsed_partitions *state, u64 lba,
 		goto fail;
 	}
 	if (le64_to_cpu((*gpt)->last_usable_lba) < le64_to_cpu((*gpt)->first_usable_lba)) {
-		pr_debug("GPT: last_usable_lba incorrect: %lld > %lld\n",
+		pr_debug("GPT: last_usable_lba incorrect: %lld < %lld\n",
 			 (unsigned long long)le64_to_cpu((*gpt)->last_usable_lba),
 			 (unsigned long long)le64_to_cpu((*gpt)->first_usable_lba));
 		goto fail;
-- 
2.43.0


             reply	other threads:[~2026-08-21  7:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21  7:23 Zhan Xusheng [this message]
2026-08-21  7:23 ` [PATCH 2/2] block: partitions: efi: print GPT LBAs as unsigned Zhan Xusheng

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=20260821072355.2006771-1-zhanxusheng@xiaomi.com \
    --to=zhanxusheng1024@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=dave@stgolabs.net \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhanxusheng@xiaomi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox