Skip to content

ublk: cleanup and support user copy

Ming Lei linux-block 3 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 1 replyApplied
  2. v27 patches 0 repliesSuperseded
  3. v17 patches 1 replySuperseded

Changes in v3 from the cover letter

- rebase on for-6.5/block
- run xfstests and not see regression

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/7ublk: kill queuing request by task_work_adddrivers/block/ublk_drv.c+2 -380 replies
2/7ublk: cleanup io cmd code path by adding ublk_fill_io_cmd()drivers/block/ublk_drv.c+11 -90 replies
3/7ublk: cleanup ublk_copy_user_pagesdrivers/block/ublk_drv.c+49 -630 replies
4/7ublk: grab request reference when the request is handled by userspacedrivers/block/ublk_drv.c+64 -30 replies
5/7ublk: support to copy any part of request pagesdrivers/block/ublk_drv.c+24 -70 replies
6/7ublk: add read()/write() support for ublk char devicedrivers/block/ublk_drv.c include/uapi/linux/ublk_cmd.h+172 -10 replies
7/7ublk: support user copydrivers/block/ublk_drv.c include/uapi/linux/ublk_cmd.h+50 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH V3 0/7] ublk: cleanup and support user copy

Hello,

The 1st 3 patch are cleanup.

The other patches support to move data copy between io request pages and userspace buffer into ublk server(userspace). This way avoids one round trip of uring command(UBLK_F_NEED_GET_DATA), and solve buffer release issue for READ[1]. Meantime both sides becomes cleaner. Also it can be thought as prep patch for supporting zero copy.

ublksrv loop usercopy code:

https://github.com/ming1/ubdsrv/commits/usercopy

[1] https://lore.kernel.org/linux-block/[email protected]/T/#m23bd4b8634c0a054e6797063167b469949a247bb

V3:
- rebase on for-6.5/block
- run xfstests and not see regression

V2:
- rebase on latest linus tree

Ming Lei (7):
ublk: kill queuing request by task_work_add
ublk: cleanup io cmd code path by adding ublk_fill_io_cmd()
ublk: cleanup ublk_copy_user_pages
ublk: grab request reference when the request is handled by userspace
ublk: support to copy any part of request pages
ublk: add read()/write() support for ublk char device
ublk: support user copy

 drivers/block/ublk_drv.c      | 457 +++++++++++++++++++++++++---------
 include/uapi/linux/ublk_cmd.h |  25 +-
 2 files changed, 361 insertions(+), 121 deletions(-)
Signature · 1 line
2.40.1