Linux block layer
 help / color / mirror / Atom feed
* [PATCH blktests] block/046: skip with the new XFS read-bounce implementation
@ 2026-09-21  8:58 0wnerD1ed
  2026-09-21  9:12 ` 0wnerD1ed
  2026-09-25  5:31 ` Shin'ichiro Kawasaki
  0 siblings, 2 replies; 4+ messages in thread
From: 0wnerD1ed @ 2026-09-21  8:58 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki; +Cc: linux-block, Christoph Hellwig

block/046 uses a deliberately misaligned one-byte iovec to exercise the
special bvec layout in bio_iov_iter_bounce_read().

The new XFS lazy read-bounce implementation no longer sets
IOMAP_DIO_BOUNCE before extracting the user pages.  The ordinary path now
rejects that iovec with EINVAL, and a later patch removes the legacy helper
entirely.

Detect the per-mount csum/read_bounce interface and mark the test not run
after cleaning up the XFS mount and null_blk device.  This retains the
regression coverage on older kernels without treating the expected EINVAL
as a successful result.

Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/arDN1UdZIydNLUjz@shinmob
Link: https://lore.kernel.org/r/20260921082240.GA19833@lst.de
Signed-off-by: 0wnerD1ed <l7z@0b1t.tech>
---
 tests/block/046 | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/tests/block/046 b/tests/block/046
index 5f874bc..e97f583 100755
--- a/tests/block/046
+++ b/tests/block/046
@@ -23,6 +23,7 @@ requires() {
 test() {
        local block_size
        local mount_dir="${TMPDIR}/mnt"
+       local read_bounce="/sys/fs/xfs/nullb1/csum/read_bounce"
        local test_file="${mount_dir}/target"

        echo "Running ${TEST_NAME}"
@@ -42,6 +43,24 @@ test() {
                _exit_null_blk
                return
        fi
+
+       # The lazy XFS read-bounce implementation replaced the legacy
block-layer
+       # path whose special bvec layout this test exercises.
+       if [[ -e "${read_bounce}" ]]; then
+               if ! umount "${mount_dir}" >>"${FULL}" 2>&1; then
+                       echo "failed to unmount XFS"
+                       _exit_null_blk
+                       return 1
+               fi
+               rm -rf "${mount_dir}"
+               if ! _exit_null_blk; then
+                       echo "failed to remove null_blk"
+                       return 1
+               fi
+               SKIP_REASONS+=("legacy read-bounce implementation is
not present")
+               return
+       fi
+
        dd if=/dev/zero of="${test_file}" bs=1M count=1 conv=fsync \
                status=none
        block_size=$(blockdev --getss /dev/nullb1)
--
2.54.0

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

* Re: [PATCH blktests] block/046: skip with the new XFS read-bounce implementation
  2026-09-21  8:58 [PATCH blktests] block/046: skip with the new XFS read-bounce implementation 0wnerD1ed
@ 2026-09-21  9:12 ` 0wnerD1ed
  2026-09-22 13:21   ` Christoph Hellwig
  2026-09-25  5:31 ` Shin'ichiro Kawasaki
  1 sibling, 1 reply; 4+ messages in thread
From: 0wnerD1ed @ 2026-09-21  9:12 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki; +Cc: linux-block, Christoph Hellwig

[-- Attachment #1: Type: text/plain, Size: 213 bytes --]

The v1 message was corrupted by Gmail web, tabs were converted to spaces
and added lines were hard-wrapped. The code is unchanged. Please use the
attached v2 format-patch, which preserves the original whitespace.

[-- Attachment #2: 0001-block-046-skip-with-the-new-XFS-read-bounce-imple.v2.patch --]
[-- Type: application/octet-stream, Size: 2418 bytes --]

From 5dc54566ee6f4507c079c9c207cb7ff9bf06e92a Mon Sep 17 00:00:00 2001
From: 0wnerD1ed <l7z@0b1t.tech>
Date: Mon, 21 Sep 2026 16:50:12 +0800
Subject: [PATCH blktests v2] block/046: skip with the new XFS read-bounce
 implementation
To: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: linux-block@vger.kernel.org,
    Christoph Hellwig <hch@lst.de>

block/046 uses a deliberately misaligned one-byte iovec to exercise the
special bvec layout in bio_iov_iter_bounce_read().

The new XFS lazy read-bounce implementation no longer sets
IOMAP_DIO_BOUNCE before extracting the user pages.  The ordinary path now
rejects that iovec with EINVAL, and a later patch removes the legacy helper
entirely.

Detect the per-mount csum/read_bounce interface and mark the test not run
after cleaning up the XFS mount and null_blk device.  This retains the
regression coverage on older kernels without treating the expected EINVAL
as a successful result.

Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/arDN1UdZIydNLUjz@shinmob
Link: https://lore.kernel.org/r/20260921082240.GA19833@lst.de
Signed-off-by: 0wnerD1ed <l7z@0b1t.tech>
---
Changes since v1:
- resend with the original whitespace; Gmail converted tabs to spaces and
  hard-wrapped added lines in the v1 message

 tests/block/046 | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/tests/block/046 b/tests/block/046
index 5f874bc..e97f583 100755
--- a/tests/block/046
+++ b/tests/block/046
@@ -23,6 +23,7 @@ requires() {
 test() {
 	local block_size
 	local mount_dir="${TMPDIR}/mnt"
+	local read_bounce="/sys/fs/xfs/nullb1/csum/read_bounce"
 	local test_file="${mount_dir}/target"
 
 	echo "Running ${TEST_NAME}"
@@ -42,6 +43,24 @@ test() {
 		_exit_null_blk
 		return
 	fi
+
+	# The lazy XFS read-bounce implementation replaced the legacy block-layer
+	# path whose special bvec layout this test exercises.
+	if [[ -e "${read_bounce}" ]]; then
+		if ! umount "${mount_dir}" >>"${FULL}" 2>&1; then
+			echo "failed to unmount XFS"
+			_exit_null_blk
+			return 1
+		fi
+		rm -rf "${mount_dir}"
+		if ! _exit_null_blk; then
+			echo "failed to remove null_blk"
+			return 1
+		fi
+		SKIP_REASONS+=("legacy read-bounce implementation is not present")
+		return
+	fi
+
 	dd if=/dev/zero of="${test_file}" bs=1M count=1 conv=fsync \
 		status=none
 	block_size=$(blockdev --getss /dev/nullb1)
-- 
2.54.0

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

* Re: [PATCH blktests] block/046: skip with the new XFS read-bounce implementation
  2026-09-21  9:12 ` 0wnerD1ed
@ 2026-09-22 13:21   ` Christoph Hellwig
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2026-09-22 13:21 UTC (permalink / raw)
  To: 0wnerD1ed; +Cc: Shin'ichiro Kawasaki, linux-block, Christoph Hellwig

The changes look good, thanks:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH blktests] block/046: skip with the new XFS read-bounce implementation
  2026-09-21  8:58 [PATCH blktests] block/046: skip with the new XFS read-bounce implementation 0wnerD1ed
  2026-09-21  9:12 ` 0wnerD1ed
@ 2026-09-25  5:31 ` Shin'ichiro Kawasaki
  1 sibling, 0 replies; 4+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-09-25  5:31 UTC (permalink / raw)
  To: 0wnerD1ed; +Cc: linux-block, Christoph Hellwig

On Sep 21, 2026 / 16:58, 0wnerD1ed wrote:
> block/046 uses a deliberately misaligned one-byte iovec to exercise the
> special bvec layout in bio_iov_iter_bounce_read().
> 
> The new XFS lazy read-bounce implementation no longer sets
> IOMAP_DIO_BOUNCE before extracting the user pages.  The ordinary path now
> rejects that iovec with EINVAL, and a later patch removes the legacy helper
> entirely.
> 
> Detect the per-mount csum/read_bounce interface and mark the test not run
> after cleaning up the XFS mount and null_blk device.  This retains the
> regression coverage on older kernels without treating the expected EINVAL
> as a successful result.
> 
> Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> Link: https://lore.kernel.org/r/arDN1UdZIydNLUjz@shinmob
> Link: https://lore.kernel.org/r/20260921082240.GA19833@lst.de
> Signed-off-by: 0wnerD1ed <l7z@0b1t.tech>

I applied this patch. Thank you for the swift fix!

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

end of thread, other threads:[~2026-09-25  5:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-21  8:58 [PATCH blktests] block/046: skip with the new XFS read-bounce implementation 0wnerD1ed
2026-09-21  9:12 ` 0wnerD1ed
2026-09-22 13:21   ` Christoph Hellwig
2026-09-25  5:31 ` Shin'ichiro Kawasaki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox