Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH 0/2] ublk: fix force_abort leftover after quiesce recover
@ 2026-08-21 10:30 Yang Xiuwei
  2026-08-21 10:30 ` [PATCH 1/2] ublk: clear force_abort in ublk_queue_reset_io_flags() Yang Xiuwei
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yang Xiuwei @ 2026-08-21 10:30 UTC (permalink / raw)
  To: tom.leiming, axboe; +Cc: linux-block, shuah, linux-kselftest, Yang Xiuwei

Hi,

Quiesce on a batch device leaves ubq->force_abort set. Recovery does
not clear it, so batch fetch fails with -ENODEV and the device stays
QUIESCED.

Patch 1 clears force_abort in ublk_queue_reset_io_flags().
Patch 2 adds -b coverage to recover_03.

Tested: recover_01, recover_03 (with and without -b).

Yang Xiuwei (2):
  ublk: clear force_abort in ublk_queue_reset_io_flags()
  selftests: ublk: add batch IO cases to recover_03

 drivers/block/ublk_drv.c                        | 1 +
 tools/testing/selftests/ublk/test_recover_03.sh | 5 +++++
 2 files changed, 6 insertions(+)

-- 
2.25.1


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

* [PATCH 1/2] ublk: clear force_abort in ublk_queue_reset_io_flags()
  2026-08-21 10:30 [PATCH 0/2] ublk: fix force_abort leftover after quiesce recover Yang Xiuwei
@ 2026-08-21 10:30 ` Yang Xiuwei
  2026-08-21 10:30 ` [PATCH 2/2] selftests: ublk: add batch IO cases to recover_03 Yang Xiuwei
  2026-08-24 13:31 ` [PATCH 0/2] ublk: fix force_abort leftover after quiesce recover Ming Lei
  2 siblings, 0 replies; 4+ messages in thread
From: Yang Xiuwei @ 2026-08-21 10:30 UTC (permalink / raw)
  To: tom.leiming, axboe; +Cc: linux-block, shuah, linux-kselftest, Yang Xiuwei

Quiesce sets ubq->force_abort for batch I/O. Recovery never clears
it, so batch fetch keeps failing with -ENODEV and the device stays
QUIESCED.

Fixes: a4d883755399 ("ublk: add UBLK_U_IO_FETCH_IO_CMDS for batch I/O processing")
Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
---
 drivers/block/ublk_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index 4d17ed264da1..1a95642b9db9 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -3024,6 +3024,7 @@ static void ublk_queue_reset_io_flags(struct ublk_queue *ubq)
 	ubq->canceling = false;
 	spin_unlock(&ubq->cancel_lock);
 	ubq->fail_io = false;
+	ubq->force_abort = false;
 }
 
 /* device can only be started after all IOs are ready */
-- 
2.25.1


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

* [PATCH 2/2] selftests: ublk: add batch IO cases to recover_03
  2026-08-21 10:30 [PATCH 0/2] ublk: fix force_abort leftover after quiesce recover Yang Xiuwei
  2026-08-21 10:30 ` [PATCH 1/2] ublk: clear force_abort in ublk_queue_reset_io_flags() Yang Xiuwei
@ 2026-08-21 10:30 ` Yang Xiuwei
  2026-08-24 13:31 ` [PATCH 0/2] ublk: fix force_abort leftover after quiesce recover Ming Lei
  2 siblings, 0 replies; 4+ messages in thread
From: Yang Xiuwei @ 2026-08-21 10:30 UTC (permalink / raw)
  To: tom.leiming, axboe; +Cc: linux-block, shuah, linux-kselftest, Yang Xiuwei

Add -b coverage for quiesce recover.

Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
---
 tools/testing/selftests/ublk/test_recover_03.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/testing/selftests/ublk/test_recover_03.sh b/tools/testing/selftests/ublk/test_recover_03.sh
index 2554805e5b02..92f4012178f0 100755
--- a/tools/testing/selftests/ublk/test_recover_03.sh
+++ b/tools/testing/selftests/ublk/test_recover_03.sh
@@ -29,6 +29,11 @@ _create_backfile 0 256M
 _create_backfile 1 128M
 _create_backfile 2 128M
 
+ublk_run_quiesce_recover -t null -q 2 -r 1 -b &
+ublk_run_quiesce_recover -t loop -q 2 -r 1 -b "${UBLK_BACKFILES[0]}" &
+ublk_run_quiesce_recover -t stripe -q 2 -r 1 -b "${UBLK_BACKFILES[1]}" "${UBLK_BACKFILES[2]}" &
+wait
+
 ublk_run_quiesce_recover -t null -q 2 -r 1 &
 ublk_run_quiesce_recover -t loop -q 2 -r 1 "${UBLK_BACKFILES[0]}" &
 ublk_run_quiesce_recover -t stripe -q 2 -r 1 "${UBLK_BACKFILES[1]}" "${UBLK_BACKFILES[2]}" &
-- 
2.25.1


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

* Re: [PATCH 0/2] ublk: fix force_abort leftover after quiesce recover
  2026-08-21 10:30 [PATCH 0/2] ublk: fix force_abort leftover after quiesce recover Yang Xiuwei
  2026-08-21 10:30 ` [PATCH 1/2] ublk: clear force_abort in ublk_queue_reset_io_flags() Yang Xiuwei
  2026-08-21 10:30 ` [PATCH 2/2] selftests: ublk: add batch IO cases to recover_03 Yang Xiuwei
@ 2026-08-24 13:31 ` Ming Lei
  2 siblings, 0 replies; 4+ messages in thread
From: Ming Lei @ 2026-08-24 13:31 UTC (permalink / raw)
  To: Yang Xiuwei; +Cc: axboe, linux-block, shuah, linux-kselftest

On Fri, Aug 21, 2026 at 06:30:45PM +0800, Yang Xiuwei wrote:
> Hi,
> 
> Quiesce on a batch device leaves ubq->force_abort set. Recovery does
> not clear it, so batch fetch fails with -ENODEV and the device stays
> QUIESCED.
> 
> Patch 1 clears force_abort in ublk_queue_reset_io_flags().
> Patch 2 adds -b coverage to recover_03.
> 
> Tested: recover_01, recover_03 (with and without -b).
> 
> Yang Xiuwei (2):
>   ublk: clear force_abort in ublk_queue_reset_io_flags()
>   selftests: ublk: add batch IO cases to recover_03

Reviewed-by: Ming Lei <tom.leiming@gmail.com>


Thanks,
Ming

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

end of thread, other threads:[~2026-08-24 13:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21 10:30 [PATCH 0/2] ublk: fix force_abort leftover after quiesce recover Yang Xiuwei
2026-08-21 10:30 ` [PATCH 1/2] ublk: clear force_abort in ublk_queue_reset_io_flags() Yang Xiuwei
2026-08-21 10:30 ` [PATCH 2/2] selftests: ublk: add batch IO cases to recover_03 Yang Xiuwei
2026-08-24 13:31 ` [PATCH 0/2] ublk: fix force_abort leftover after quiesce recover Ming Lei

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