On 5/20/24 12:20, Nitesh Shetty wrote:Yes you are right w.r.to split, we disallow split.
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 <nj.shetty@xxxxxxxxxxx>
---
@@ -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?