All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] test: skip metadata-write-rounding with pages larger than 4KiB
@ 2026-11-04  6:57 Itai Handler
  2026-11-04  9:36 ` Zdenek Kabelac
  0 siblings, 1 reply; 2+ messages in thread
From: Itai Handler @ 2026-11-04  6:57 UTC (permalink / raw)
  To: lvm-devel; +Cc: David Teigland, Zdenek Kabelac

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-04  9:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04  6:57 [PATCH] test: skip metadata-write-rounding with pages larger than 4KiB Itai Handler
2026-11-04  9:36 ` Zdenek Kabelac

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.