From: Uday Shankar <ushankar@purestorage.com>
To: Ming Lei <ming.lei@redhat.com>, Shuah Khan <shuah@kernel.org>,
Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
Uday Shankar <ushankar@purestorage.com>
Subject: [PATCH 1/4] selftests: ublk: kublk: use ioctl-encoded opcodes
Date: Tue, 25 Mar 2025 16:19:31 -0600 [thread overview]
Message-ID: <20250325-ublk_timeout-v1-1-262f0121a7bd@purestorage.com> (raw)
In-Reply-To: <20250325-ublk_timeout-v1-0-262f0121a7bd@purestorage.com>
There are a couple of places in the kublk selftests ublk server which
use the legacy ublk opcodes. These operations fail (with -EOPNOTSUPP) on
a kernel compiled without CONFIG_BLKDEV_UBLK_LEGACY_OPCODES set. We
could easily require it to be set as a prerequisite for these selftests,
but since new applications should not be using the legacy opcodes, use
the ioctl-encoded opcodes everywhere in kublk.
Signed-off-by: Uday Shankar <ushankar@purestorage.com>
---
tools/testing/selftests/ublk/kublk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/ublk/kublk.c b/tools/testing/selftests/ublk/kublk.c
index 05147b53c3613a436e3a13848e146e0c66ca2525..b17eee643b2dbfd59903b61718afcbc21da91d97 100644
--- a/tools/testing/selftests/ublk/kublk.c
+++ b/tools/testing/selftests/ublk/kublk.c
@@ -99,7 +99,7 @@ static int __ublk_ctrl_cmd(struct ublk_dev *dev,
static int ublk_ctrl_stop_dev(struct ublk_dev *dev)
{
struct ublk_ctrl_cmd_data data = {
- .cmd_op = UBLK_CMD_STOP_DEV,
+ .cmd_op = UBLK_U_CMD_STOP_DEV,
};
return __ublk_ctrl_cmd(dev, &data);
@@ -169,7 +169,7 @@ static int ublk_ctrl_get_params(struct ublk_dev *dev,
struct ublk_params *params)
{
struct ublk_ctrl_cmd_data data = {
- .cmd_op = UBLK_CMD_GET_PARAMS,
+ .cmd_op = UBLK_U_CMD_GET_PARAMS,
.flags = CTRL_CMD_HAS_BUF,
.addr = (__u64)params,
.len = sizeof(*params),
--
2.34.1
next prev parent reply other threads:[~2025-03-25 22:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 22:19 [PATCH 0/4] ublk: improve handling of saturated queues when ublk server exits Uday Shankar
2025-03-25 22:19 ` Uday Shankar [this message]
2025-03-25 22:26 ` [PATCH 1/4] selftests: ublk: kublk: use ioctl-encoded opcodes Uday Shankar
2025-03-26 3:07 ` Ming Lei
2025-03-25 22:19 ` [PATCH 2/4] selftests: ublk: kublk: fix an error log line Uday Shankar
2025-03-26 3:08 ` Ming Lei
2025-03-25 22:19 ` [PATCH 3/4] selftests: ublk: kublk: ignore SIGCHLD Uday Shankar
2025-03-26 3:23 ` Ming Lei
2025-03-26 17:17 ` Uday Shankar
2025-03-25 22:19 ` [PATCH 4/4] ublk: improve handling of saturated queues when ublk server exits Uday Shankar
2025-03-26 5:38 ` Ming Lei
2025-03-26 17:54 ` Uday Shankar
2025-03-26 18:56 ` Uday Shankar
2025-03-26 23:08 ` Uday Shankar
2025-03-27 1:38 ` Ming Lei
2025-03-27 1:23 ` Ming Lei
2025-03-31 23:17 ` Uday Shankar
2025-04-02 3:59 ` Ming Lei
2025-04-02 19:41 ` Uday Shankar
2025-03-27 2:06 ` Ming Lei
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=20250325-ublk_timeout-v1-1-262f0121a7bd@purestorage.com \
--to=ushankar@purestorage.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=shuah@kernel.org \
/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
all inboxes | Powered by JetHome®