From: Jeff Moyer <jmoyer@redhat.com>
To: linux-block@vger.kernel.org, shinichiro.kawasaki@wdc.com
Subject: [PATCH blktests] Fix _get_page_size()
Date: Thu, 18 Jun 2026 10:41:51 -0400 [thread overview]
Message-ID: <x497bnvlxlc.fsf@segfault.usersys.redhat.com> (raw)
There is no CONFIG_PAGE_SHIFT stored in /boot/config-`uname -r` on RHEL
systems (maybe all systems?). As a result, tests that make use of
_get_page_size() were doing the wrong thing. For example, throtl/002
used it to calculate I/O sizes for direct IO. Those sizes ended up not
being a multiple of the logical block size, and hence throtl/002 was
failing.
Fixes: 8eca9fa ("common/rc, scsi/011, zbd/010: introduce _page_size_equals() helper")
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
diff --git a/common/rc b/common/rc
index 20f7c7a..d60a125 100644
--- a/common/rc
+++ b/common/rc
@@ -562,13 +562,8 @@ _have_systemctl_unit() {
return 0
}
-# Get system page size from kernel conguration
_get_page_size() {
- local page_shift
-
- page_shift=$(_get_kernel_option PAGE_SHIFT)
-
- echo $((1<< page_shift))
+ getconf PAGE_SIZE
}
# Check if the system page size matches the required size (in bytes).
next reply other threads:[~2026-06-18 14:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 14:41 Jeff Moyer [this message]
2026-06-20 1:26 ` [PATCH blktests] Fix _get_page_size() Shin'ichiro Kawasaki
2026-06-20 3:55 ` Bart Van Assche
2026-06-20 4:51 ` Shin'ichiro Kawasaki
2026-06-20 7:11 ` Bart Van Assche
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=x497bnvlxlc.fsf@segfault.usersys.redhat.com \
--to=jmoyer@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=shinichiro.kawasaki@wdc.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.