Thread (35 messages) 35 messages, 4 authors, 2023-09-11

Re: [PATCH v15 02/12] Add infrastructure for copy offload in block and request layer.

From: Hannes Reinecke <hare@suse.de>
Date: 2023-09-07 05:39:20
Also in: dm-devel, linux-doc, linux-fsdevel, linux-nvme, lkml

On 9/6/23 18:38, Nitesh Shetty wrote:
We add two new opcode REQ_OP_COPY_SRC, REQ_OP_COPY_DST.
Since copy is a composite operation involving src and dst sectors/lba,
each needs to be represented by a separate bio to make it compatible
with device mapper.
We expect caller to take a plug and send bio with source information,
followed by bio with destination information.
Once the src bio arrives we form a request and wait for destination
bio. Upon arrival of destination we merge these two bio's and send
corresponding request down to device driver.

Signed-off-by: Nitesh Shetty <redacted>
Signed-off-by: Anuj Gupta <redacted>
---
  block/blk-core.c          |  7 +++++++
  block/blk-merge.c         | 41 +++++++++++++++++++++++++++++++++++++++
  block/blk.h               | 16 +++++++++++++++
  block/elevator.h          |  1 +
  include/linux/bio.h       |  6 +-----
  include/linux/blk_types.h | 10 ++++++++++
  6 files changed, 76 insertions(+), 5 deletions(-)
Having two separate bios is okay, and what one would expect.
What is slightly strange is the merging functionality;
That could do with some more explanation why this approach was taken.
And also some checks in the merging code to avoid merging non-copy 
offload  bios.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help