[PATCH v2 0/9] ublk: simplify NEED_GET_DATA handling and request lookup

Caleb Sander Mateos posted 9 patches 9 months, 1 week ago
drivers/block/ublk_drv.c | 252 ++++++++++++++++++++-------------------
1 file changed, 131 insertions(+), 121 deletions(-)
[PATCH v2 0/9] ublk: simplify NEED_GET_DATA handling and request lookup
Posted by Caleb Sander Mateos 9 months, 1 week ago
Remove accesses to ublk_io's cmd field after the I/O request is posted to the
ublk server. This allows the cmd field to be overlapped with a pointer to the
struct request, avoiding several blk_mq_tag_to_rq() lookups.

Fix a couple of typos noticed along the way.

Caleb Sander Mateos (8):
  ublk: fix "immepdately" typo in comment
  ublk: remove misleading "ubq" in "ubq_complete_io_cmd()"
  ublk: take const ubq pointer in ublk_get_iod()
  ublk: don't log uring_cmd cmd_op in ublk_dispatch_req()
  ublk: factor out ublk_start_io() helper
  ublk: don't call ublk_dispatch_req() for NEED_GET_DATA
  ublk: check UBLK_IO_FLAG_OWNED_BY_SRV in ublk_abort_queue()
  ublk: store request pointer in ublk_io

Uday Shankar (1):
  ublk: factor out ublk_commit_and_fetch

 drivers/block/ublk_drv.c | 252 ++++++++++++++++++++-------------------
 1 file changed, 131 insertions(+), 121 deletions(-)

v2:
- Don't complete uring_cmd if ublk_map_io() returns 0 (Ming)
- Take const ubq pointers

-- 
2.45.2
Re: [PATCH v2 0/9] ublk: simplify NEED_GET_DATA handling and request lookup
Posted by Jens Axboe 9 months, 1 week ago
On Wed, 30 Apr 2025 16:52:25 -0600, Caleb Sander Mateos wrote:
> Remove accesses to ublk_io's cmd field after the I/O request is posted to the
> ublk server. This allows the cmd field to be overlapped with a pointer to the
> struct request, avoiding several blk_mq_tag_to_rq() lookups.
> 
> Fix a couple of typos noticed along the way.
> 
> Caleb Sander Mateos (8):
>   ublk: fix "immepdately" typo in comment
>   ublk: remove misleading "ubq" in "ubq_complete_io_cmd()"
>   ublk: take const ubq pointer in ublk_get_iod()
>   ublk: don't log uring_cmd cmd_op in ublk_dispatch_req()
>   ublk: factor out ublk_start_io() helper
>   ublk: don't call ublk_dispatch_req() for NEED_GET_DATA
>   ublk: check UBLK_IO_FLAG_OWNED_BY_SRV in ublk_abort_queue()
>   ublk: store request pointer in ublk_io
> 
> [...]

Applied, thanks!

[1/9] ublk: factor out ublk_commit_and_fetch
      commit: 0cb39afd2a4d438b16d743952eb68c683c663a1e
[2/9] ublk: fix "immepdately" typo in comment
      commit: 80c0789a7ddc89adb726e407ca22d9689608b710
[3/9] ublk: remove misleading "ubq" in "ubq_complete_io_cmd()"
      commit: 5a43d93588dca88af0333ce18dedcfb0276ec4fe
[4/9] ublk: take const ubq pointer in ublk_get_iod()
      commit: 2a86eec6396ff6d40e46d5cc11f99f1e7bbec78e
[5/9] ublk: don't log uring_cmd cmd_op in ublk_dispatch_req()
      commit: 551270690dd6c751a6d62f272cf068bfef9a1729
[6/9] ublk: factor out ublk_start_io() helper
      commit: 2fcb88bdf2e62a6aae211c8603341fd2e7b16a69
[7/9] ublk: don't call ublk_dispatch_req() for NEED_GET_DATA
      commit: 9810362a57cb633d808cdfd51e8cae21243f0660
[8/9] ublk: check UBLK_IO_FLAG_OWNED_BY_SRV in ublk_abort_queue()
      commit: 8ed95b54701a8e946b86ffdeeac8603316e0a59d
[9/9] ublk: store request pointer in ublk_io
      commit: 64d1dc522b349a257256f636feb335441cca2571

Best regards,
-- 
Jens Axboe