* [PATCH blktests] Fix _get_page_size()
@ 2026-06-18 14:41 Jeff Moyer
0 siblings, 0 replies; only message in thread
From: Jeff Moyer @ 2026-06-18 14:41 UTC (permalink / raw)
To: linux-block, shinichiro.kawasaki
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).
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-18 14:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-18 14:41 [PATCH blktests] Fix _get_page_size() Jeff Moyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox