Thread (66 messages) 66 messages, 6 authors, 2024-06-04

Re: [PATCH v20 09/12] dm: Add support for copy offload

From: Hannes Reinecke <hare@suse.de>
Date: 2024-05-22 06:22:38
Also in: dm-devel, linux-doc, linux-fsdevel, linux-nvme, lkml

On 5/21/24 16:08, Nitesh Shetty wrote:
On 21/05/24 09:11AM, Hannes Reinecke wrote:
quoted
On 5/20/24 12:20, Nitesh Shetty wrote:
quoted
Before enabling copy for dm target, check if underlying devices and
dm target support copy. Avoid split happening inside dm target.
Fail early if the request needs split, currently splitting copy
request is not supported.

Signed-off-by: Nitesh Shetty <redacted>
---
@@ -397,6 +397,9 @@ struct dm_target {
      * bio_set_dev(). NOTE: ideally a target should _not_ need this.
      */
     bool needs_bio_set_dev:1;
+
+    /* copy offload is supported */
+    bool copy_offload_supported:1;
 };
 void *dm_per_bio_data(struct bio *bio, size_t data_size);
Errm. Not sure this will work. DM tables might be arbitrarily, 
requiring us to _split_ the copy offload request according to the 
underlying component devices. But we explicitly disallowed a split in 
one of the earlier patches.
Or am I wrong?
Yes you are right w.r.to split, we disallow split.
But this flag indicates whether we support copy offload in dm-target or
not. At present we support copy offload only in dm-linear.
For other dm-target, eventhough underlaying device supports copy
offload, dm-target based on it wont support copy offload.
If the present series get merged, we can test and integrate more
targets.
But dm-linear can be concatenated, too; you can easily use dm-linear
to tie several devices together.
Which again would require a copy-offload range to be split.
Hmm?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help