Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: ublk: kublk: use ioctl-encoded opcodes

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>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250401-ublk_selftests-v1-1-98129c9bc8bb@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Uday Shankar and committed by
Jens Axboe
53c95929 fcfd94d6

+2 -2
+2 -2
tools/testing/selftests/ublk/kublk.c
··· 99 99 static int ublk_ctrl_stop_dev(struct ublk_dev *dev) 100 100 { 101 101 struct ublk_ctrl_cmd_data data = { 102 - .cmd_op = UBLK_CMD_STOP_DEV, 102 + .cmd_op = UBLK_U_CMD_STOP_DEV, 103 103 }; 104 104 105 105 return __ublk_ctrl_cmd(dev, &data); ··· 169 169 struct ublk_params *params) 170 170 { 171 171 struct ublk_ctrl_cmd_data data = { 172 - .cmd_op = UBLK_CMD_GET_PARAMS, 172 + .cmd_op = UBLK_U_CMD_GET_PARAMS, 173 173 .flags = CTRL_CMD_HAS_BUF, 174 174 .addr = (__u64)params, 175 175 .len = sizeof(*params),