| 730d8379 | 29-Apr-2025 |
Ming Lei <[email protected]> |
selftests: ublk: fix UBLK_F_NEED_GET_DATA
Commit 57e13a2e8cd2 ("selftests: ublk: support user recovery") starts to support UBLK_F_NEED_GET_DATA for covering recovery feature, however the ublk utilit
selftests: ublk: fix UBLK_F_NEED_GET_DATA
Commit 57e13a2e8cd2 ("selftests: ublk: support user recovery") starts to support UBLK_F_NEED_GET_DATA for covering recovery feature, however the ublk utility implementation isn't done correctly.
Fix it by supporting UBLK_F_NEED_GET_DATA correctly.
Also add test generic_07 for covering UBLK_F_NEED_GET_DATA.
Reviewed-by: Caleb Sander Mateos <[email protected]> Fixes: 57e13a2e8cd2 ("selftests: ublk: support user recovery") Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
show more ...
|
| 1d019736 | 23-Apr-2025 |
Uday Shankar <[email protected]> |
selftests: ublk: common: fix _get_disk_dev_t for pre-9.0 coreutils
Some distributions, such as centos stream 9, still have a version of coreutils which does not yet support the %Hr and %Lr formats f
selftests: ublk: common: fix _get_disk_dev_t for pre-9.0 coreutils
Some distributions, such as centos stream 9, still have a version of coreutils which does not yet support the %Hr and %Lr formats for stat(1) [1, 2]. Running ublk selftests on these distributions results in the following error in tests that use the _get_disk_dev_t helper:
line 23: ?r: syntax error: operand expected (error token is "?r")
To better accommodate older distributions, rewrite _get_disk_dev_t to use the much older %t and %T formats for stat instead.
[1] https://github.com/coreutils/coreutils/blob/v9.0/NEWS#L114 [2] https://pkgs.org/download/coreutils
Signed-off-by: Uday Shankar <[email protected]> Reviewed-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
show more ...
|
| 8f503637 | 21-Apr-2025 |
Ming Lei <[email protected]> |
selftests: ublk: remove useless 'delay_us' from 'struct dev_ctx'
'delay_us' shouldn't be added to 'struct dev_ctx' since now it is handled by per-target command line & 'struct fault_inject_ctx'.
So
selftests: ublk: remove useless 'delay_us' from 'struct dev_ctx'
'delay_us' shouldn't be added to 'struct dev_ctx' since now it is handled by per-target command line & 'struct fault_inject_ctx'.
So remove it.
Fixes: 81586652bb1f ("selftests: ublk: add generic_06 for covering fault inject") Signed-off-by: Ming Lei <[email protected]> Reviewed-by: Uday Shankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
show more ...
|
| 81586652 | 16-Apr-2025 |
Uday Shankar <[email protected]> |
selftests: ublk: add generic_06 for covering fault inject
Add one simple fault inject target, and verify if an application using ublk device sees an I/O error quickly after the ublk server dies.
Si
selftests: ublk: add generic_06 for covering fault inject
Add one simple fault inject target, and verify if an application using ublk device sees an I/O error quickly after the ublk server dies.
Signed-off-by: Uday Shankar <[email protected]> Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
show more ...
|
| 3bf54060 | 12-Apr-2025 |
Ming Lei <[email protected]> |
selftests: ublk: move creating UBLK_TMP into _prep_test()
test may exit early because of missing program or not having required feature before calling _prep_test(), then $UBLK_TMP isn't cleaned.
Fi
selftests: ublk: move creating UBLK_TMP into _prep_test()
test may exit early because of missing program or not having required feature before calling _prep_test(), then $UBLK_TMP isn't cleaned.
Fix it by moving creating $UBLK_TMP into _prep_test(), any resources created since _prep_test() will be cleaned by _cleanup_test().
Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
show more ...
|
| 6c62fd04 | 12-Apr-2025 |
Ming Lei <[email protected]> |
selftests: ublk: increase max nr_queues and queue depth
Increase max nr_queues to 32, and queue depth to 1024.
Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/20250412
selftests: ublk: increase max nr_queues and queue depth
Increase max nr_queues to 32, and queue depth to 1024.
Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
show more ...
|
| 2f0a692a | 12-Apr-2025 |
Ming Lei <[email protected]> |
selftests: ublk: set queue pthread's cpu affinity
In NUMA machine, ublk IO performance is very sensitive with queue pthread's affinity setting.
Retrieve queue's affinity and select the 1st cpu as q
selftests: ublk: set queue pthread's cpu affinity
In NUMA machine, ublk IO performance is very sensitive with queue pthread's affinity setting.
Retrieve queue's affinity and select the 1st cpu as queue thread's sched affinity, and it is observed that single cpu task affinity can get stable & good performance if client application is put on proper cpu.
Dump this info when adding one ublk device. Use shmem to communicate queue's tid between parent and daemon.
Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
show more ...
|
| bb2cabf2 | 12-Apr-2025 |
Ming Lei <[email protected]> |
selftests: ublk: run stress tests in parallel
Run stress tests in parallel, meantime add shell local function to simplify the two stress tests.
Signed-off-by: Ming Lei <[email protected]> Link: h
selftests: ublk: run stress tests in parallel
Run stress tests in parallel, meantime add shell local function to simplify the two stress tests.
Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
show more ...
|
| 573840ab | 12-Apr-2025 |
Ming Lei <[email protected]> |
selftests: ublk: make sure _add_ublk_dev can return in sub-shell
Detach ublk daemon from the starting process completely by double-fork and clearing its process group, so that `_add_ublk_dev` can re
selftests: ublk: make sure _add_ublk_dev can return in sub-shell
Detach ublk daemon from the starting process completely by double-fork and clearing its process group, so that `_add_ublk_dev` can return from sub-shell.
Then it is more friendly for writing shell test script for adding/recovering ublk device.
Prepare for running ublk test in parallel.
Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
show more ...
|
| 9cad26d6 | 12-Apr-2025 |
Ming Lei <[email protected]> |
selftests: ublk: add io_uring uapi header
Add io_uring UAPI header so that ublk can work with latest uapi definition.
Fix the following build failure:
stripe.c: In function ‘stripe_to_uring_op’: s
selftests: ublk: add io_uring uapi header
Add io_uring UAPI header so that ublk can work with latest uapi definition.
Fix the following build failure:
stripe.c: In function ‘stripe_to_uring_op’: stripe.c:120:29: error: ‘IORING_OP_READV_FIXED’ undeclared (first use in this function); did you mean ‘IORING_OP_READ_FIXED’? 120 | return zc ? IORING_OP_READV_FIXED : IORING_OP_READV; | ^~~~~~~~~~~~~~~~~~~~~ | IORING_OP_READ_FIXED
Reviewed-by: Johannes Thumshirn <[email protected]> Fixes: 57ed58c13256 ("selftests: ublk: enable zero copy for stripe target") Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
show more ...
|
| f8554f51 | 01-Apr-2025 |
Uday Shankar <[email protected]> |
selftests: ublk: kublk: fix an error log line
When doing io_uring operations using liburing, errno is not used to indicate errors, so the %m format specifier does not provide any relevant informatio
selftests: ublk: kublk: fix an error log line
When doing io_uring operations using liburing, errno is not used to indicate errors, so the %m format specifier does not provide any relevant information for failed io_uring commands. Fix a log line emitted on get_params failure to translate the error code returned in the cqe->res field instead.
Signed-off-by: Uday Shankar <[email protected]> Reviewed-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
show more ...
|
| c78ae7b7 | 27-Mar-2025 |
Ming Lei <[email protected]> |
selftests: ublk: add test for checking zero copy related parameter
ublk zero copy usually requires to set dma and segment parameter correctly, so hard-code null target's dma & segment parameter in n
selftests: ublk: add test for checking zero copy related parameter
ublk zero copy usually requires to set dma and segment parameter correctly, so hard-code null target's dma & segment parameter in non-default value, and verify if they are setup correctly by ublk driver.
Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
show more ...
|