From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Yang Xiuwei <yangxiuwei@kylinos.cn>
Cc: Christoph Hellwig <hch@lst.de>, linux-block@vger.kernel.org
Subject: Re: [PATCH blktests] block/049: test polled dio with user PI metadata
Date: Fri, 25 Sep 2026 22:16:29 +0900 [thread overview]
Message-ID: <arZyUmncVJSolXLg@shinmob> (raw)
In-Reply-To: <20260924025526.298050-1-yangxiuwei@kylinos.cn>
On Sep 24, 2026 / 10:55, Yang Xiuwei wrote:
> IOPOLL combined with a PI attribute used to leave iocb->private as a
> uio_meta and oops in bio_poll(). The kernel rejects that combination
> with -EOPNOTSUPP. Add a scsi_debug reproducer that expects this result.
>
> Assisted-by: LLM
> Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
> ---
> Depends on the kernel fix that rejects IOPOLL plus user PI metadata
> with -EOPNOTSUPP. Without that fix this test oopses in bio_poll().
>
> Link: https://lore.kernel.org/linux-block/20260923093732.1504291-1-yangxiuwei@kylinos.cn/
Thanks for the patch. I confirmed the new test case recreates the Oops, and the
kernel fix patch avoids it. Good from test run point of view.
>
> The fix is not in mainline yet. Is an oops on kernels without it
> acceptable here, or how should the test avoid that? _have_kver after
> the fix lands would still skip a stable backport, which keeps the old
> version number. The only userspace difference is -EOPNOTSUPP versus
> the oops.
I understand the concern. My current policy is to wait for the kernel side
fix gets upstreamed to Linus master branch, then add the test case to blktests.
This way we can keep blktests runs healthy with Linus master branch. It can
cause the failure with stable kernels, but I expect it will work as the signal
to encourage backport of the fix. So, let's wait for the kernel side fix to
get settled on Linus master branch.
Also, please find my inline comments below.
...
> diff --git a/src/metadata-iopoll.c b/src/metadata-iopoll.c
> new file mode 100644
> index 0000000..95e2bc9
> --- /dev/null
> +++ b/src/metadata-iopoll.c
> @@ -0,0 +1,101 @@
> +// SPDX-License-Identifier: GPL-3.0+
Your copyright is missing here.
> +#include <errno.h>
> +#include <fcntl.h>
> +#include <signal.h>
> +#include <stdio.h>
...
> diff --git a/tests/block/049 b/tests/block/049
> new file mode 100755
> index 0000000..b932414
> --- /dev/null
> +++ b/tests/block/049
> @@ -0,0 +1,46 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-3.0+
> +# Copyright (C) 2026 Yang Xiuwei <yangxiuwei@kylinos.cn>
> +#
> +# IOPOLL combined with a PI attribute used to oops in bio_poll(). The kernel
> +# rejects that combination with -EOPNOTSUPP.
> +
> +. tests/block/rc
> +. common/scsi_debug
> +
> +DESCRIPTION="iopoll dio with user PI metadata returns -EOPNOTSUPP"
> +QUICK=1
> +
> +requires() {
> + _have_kernel_option IO_URING
> + _have_kernel_option BLK_DEV_INTEGRITY
> + _have_module scsi_debug
I recommend _have_loadable_scsi_debug instead of "_have_module scsi_debug".
It will do some more check for the scsi_dubug module status.
next prev parent reply other threads:[~2026-09-25 13:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 2:55 [PATCH blktests] block/049: test polled dio with user PI metadata Yang Xiuwei
2026-09-25 6:56 ` Christoph Hellwig
2026-09-25 13:16 ` Shin'ichiro Kawasaki [this message]
2026-09-28 0:53 ` Yang Xiuwei
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=arZyUmncVJSolXLg@shinmob \
--to=shinichiro.kawasaki@wdc.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=yangxiuwei@kylinos.cn \
/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