Thread (85 messages) 85 messages, 21 authors, 2022-03-09

Re: [PATCH v2 08/10] dm: Add support for copy offload.

From: Mikulas Patocka <mpatocka@redhat.com>
Date: 2022-02-16 13:51:30
Also in: dm-devel, linux-fsdevel, linux-nvme, linux-scsi


On Mon, 7 Feb 2022, Nitesh Shetty wrote:
Before enabling copy for dm target, check if underlaying devices and
dm target support copy. Avoid split happening inside dm target.
Fail early if the request needs split, currently spliting copy
request is not supported

Signed-off-by: Nitesh Shetty <redacted>
If a dm device is reconfigured, you must invalidate all the copy tokens 
that are in flight, otherwise they would copy stale data.

I suggest that you create a global variable "atomic64_t dm_changed".
In nvme_setup_copy_read you copy this variable to the token.
In nvme_setup_copy_write you compare the variable with the value in the 
token and fail if there is mismatch.
In dm.c:__bind you increase the variable, so that all the tokens will be 
invalidated if a dm table is changed.

Mikulas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help