public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/8] ublk: simplify & improve IO canceling
@ 2025-04-16  3:54 Ming Lei
  2025-04-16  3:54 ` [PATCH V2 1/8] ublk: properly serialize all FETCH_REQs Ming Lei
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Ming Lei @ 2025-04-16  3:54 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: Caleb Sander Mateos, Uday Shankar, Ming Lei

Hello,

Patch 1st ~ 7th simplifies & improves IO canceling when ublk server daemon
is exiting by taking two stage canceling:

- canceling active uring_cmd from its cancel function

- move inflight requests aborting into ublk char device release handler

With this way, implementation is simplified a lot, meantime ub->mutex is
not required before queue becomes quiesced, so forward progress is
guaranteed.

This approach & main implementation is from Uday's patch of
"improve detection and handling of ublk server exit".

The last patch is selftest code for showing the improvement ublk server
exit, 30sec timeout is avoided, which depends on patchset of
"[PATCH V2 00/13] selftests: ublk: test cleanup & add more tests"[1].

[1] https://lore.kernel.org/linux-block/20250412023035.2649275-1-ming.lei@redhat.com/T/#medbf7024e57beaf1c53e4cef6e076421463839d0

Pass both ublk kernel selftests and ublksrv 'make test T=generic'.

Thanks,

V2:
	- drop 1st patch in V1, which isn't necessary
	- update "ublk: properly serialize all FETCH_REQs", which puts
	FETCH handling into single function, add comment on NONBLOCK
	- comment & commit log improvement
	- small cleanup from 5/8, 6/8

Ming Lei (5):
  ublk: add ublk_force_abort_dev()
  ublk: rely on ->canceling for dealing with
    ublk_nosrv_dev_should_queue_io
  ublk: move device reset into ublk_ch_release()
  ublk: remove __ublk_quiesce_dev()
  ublk: simplify aborting ublk request

Uday Shankar (3):
  ublk: properly serialize all FETCH_REQs
  ublk: improve detection and handling of ublk server exit
  selftests: ublk: add generic_06 for covering fault inject

 drivers/block/ublk_drv.c                      | 532 +++++++++---------
 tools/testing/selftests/ublk/Makefile         |   4 +-
 tools/testing/selftests/ublk/fault_inject.c   |  98 ++++
 tools/testing/selftests/ublk/kublk.c          |   3 +-
 tools/testing/selftests/ublk/kublk.h          |  12 +-
 .../testing/selftests/ublk/test_generic_06.sh |  41 ++
 6 files changed, 425 insertions(+), 265 deletions(-)
 create mode 100644 tools/testing/selftests/ublk/fault_inject.c
 create mode 100755 tools/testing/selftests/ublk/test_generic_06.sh

-- 
2.47.0


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

end of thread, other threads:[~2025-04-17  1:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-16  3:54 [PATCH V2 0/8] ublk: simplify & improve IO canceling Ming Lei
2025-04-16  3:54 ` [PATCH V2 1/8] ublk: properly serialize all FETCH_REQs Ming Lei
2025-04-16  3:54 ` [PATCH V2 2/8] ublk: add ublk_force_abort_dev() Ming Lei
2025-04-16  3:54 ` [PATCH V2 3/8] ublk: rely on ->canceling for dealing with ublk_nosrv_dev_should_queue_io Ming Lei
2025-04-16 18:35   ` Uday Shankar
2025-04-16  3:54 ` [PATCH V2 4/8] ublk: move device reset into ublk_ch_release() Ming Lei
2025-04-16 19:02   ` Uday Shankar
2025-04-16 23:31     ` Ming Lei
2025-04-16  3:54 ` [PATCH V2 5/8] ublk: improve detection and handling of ublk server exit Ming Lei
2025-04-16 19:09   ` Uday Shankar
2025-04-16  3:54 ` [PATCH V2 6/8] ublk: remove __ublk_quiesce_dev() Ming Lei
2025-04-16  3:54 ` [PATCH V2 7/8] ublk: simplify aborting ublk request Ming Lei
2025-04-16  3:54 ` [PATCH V2 8/8] selftests: ublk: add generic_06 for covering fault inject Ming Lei
2025-04-16 18:45 ` [PATCH V2 0/8] ublk: simplify & improve IO canceling Jens Axboe
2025-04-17  0:03   ` Ming Lei
2025-04-17  1:33 ` Jens Axboe

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