Linux block layer
 help / color / mirror / Atom feed
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).


                 reply	other threads:[~2026-06-18 14:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox