On Sat, Aug 12, 2023 at 3:10 AM Bart Van Assche wrote:
>
> On 8/11/23 03:52, Nitesh Shetty wrote:
> > + * Description:
> > + * Copy source offset to destination offset within block device, using
> > + * device's native copy offload feature.
>
> Offloading the copy operation is not guaranteed s
On 23/08/11 03:06PM, Bart Van Assche wrote:
On 8/11/23 03:52, Nitesh Shetty wrote:
+ if (rem != chunk)
+ atomic_inc(&cio->refcount);
This code will be easier to read if the above if-test is left out
and if the following code is added below the for-loop:
On 8/11/23 03:52, Nitesh Shetty wrote:
+ if (rem != chunk)
+ atomic_inc(&cio->refcount);
This code will be easier to read if the above if-test is left out
and if the following code is added below the for-loop:
if (atomic_dec_and_test(&cio->refcount))
On 8/11/23 03:52, Nitesh Shetty wrote:
+ * Description:
+ * Copy source offset to destination offset within block device, using
+ * device's native copy offload feature.
Offloading the copy operation is not guaranteed so I think that needs to
be reflected in the above comment.
+ *
Introduce blkdev_copy_offload to perform copy offload.
Issue REQ_OP_COPY_SRC with source info along with taking a plug.
This flows till request layer and waits for dst bio to arrive.
Issue REQ_OP_COPY_DST with destination info and this bio reaches request
layer and merges with src request.
For any