All of lore.kernel.org
 help / color / mirror / Atom feed
From: Itai Handler <itai.handler@gmail.com>
To: lvm-devel@lists.linux.dev
Cc: David Teigland <teigland@redhat.com>,
	Zdenek Kabelac <zkabelac@redhat.com>
Subject: [PATCH] test: skip metadata-write-rounding with pages larger than 4KiB
Date: Wed,  4 Nov 2026 08:57:29 +0200	[thread overview]
Message-ID: <20261104065729.1305748-1-itai.handler@gmail.com> (raw)

On kernels configured with 64KiB pages, pvcreate in the test fails:

  Metadata area size too small: 66560 bytes. It must be at least 524288 bytes.

The metadata area starts at the page size and is at least 8 pages long,
so it can end one logical block after 64KiB, as the test needs, only
with 4KiB pages.  Skip the test with larger pages.

Fixes: 669e2f2b6ccf ("label: don't round writes past the logical block size")
Assisted-by: LLM
---
The layout cannot simply follow the page size: the first PE has to
start within the first 128KiB of the PV, which lvm reads before asking
for confirmation, and with 16KiB or larger pages the metadata area alone
extends past that.

Tested with 4KiB pages on x86_64, where the test passes as before, and
with 64KiB pages on arm64, where it is now skipped.

v2 of "blkio: fix writes when the logical block size is not 512 or
4096", which I am sending next, extends the same test and applies on
top of this patch.

 test/shell/metadata-write-rounding.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/shell/metadata-write-rounding.sh b/test/shell/metadata-write-rounding.sh
index 7bc2da2eb..ac33a7960 100644
--- a/test/shell/metadata-write-rounding.sh
+++ b/test/shell/metadata-write-rounding.sh
@@ -20,6 +20,11 @@
 
 . lib/inittest --skip-with-lvmpolld --skip-with-lvmlockd
 
+# The metadata area starts at the page size and is at least 8 pages
+# long, so it can end one logical block after 64KiB, as below, only with
+# 4KiB pages.
+test "$(getconf PAGESIZE)" -le 4096 || skip "page size larger than 4KiB"
+
 mkfifo fifo
 
 for bs in 1024 2048 ; do

base-commit: 7ea850a1419522cc0c8096d718551015465322d2
-- 
2.34.1


             reply	other threads:[~2026-11-04  6:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  6:57 Itai Handler [this message]
2026-11-04  9:36 ` [PATCH] test: skip metadata-write-rounding with pages larger than 4KiB Zdenek Kabelac

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=20261104065729.1305748-1-itai.handler@gmail.com \
    --to=itai.handler@gmail.com \
    --cc=lvm-devel@lists.linux.dev \
    --cc=teigland@redhat.com \
    --cc=zkabelac@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.