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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/21/24 04:17, Nitesh Shetty wrote:
On 20/05/24 04:00PM, Bart Van Assche wrote:
On 5/20/24 03:20, Nitesh Shetty wrote:
+static inline bool blk_copy_offload_mergable(struct request *req,
+                         struct bio *bio)
+{
+    return (req_op(req) == REQ_OP_COPY_DST &&
+        bio_op(bio) == REQ_OP_COPY_SRC);
+}

bios with different operation types must not be merged. Please rename this function.

As far as function renaming, we followed discard's naming. But open to
any suggestion.

req_attempt_discard_merge() checks whether two REQ_OP_DISCARD bios can be merged.
The above function checks something else, namely whether REQ_OP_COPY_DST and
REQ_OP_COPY_SRC can be combined into a copy offload operation. Hence my request
not to use the verb "merge" for combining REQ_OP_COPY_SRC and REQ_OP_COPY_DST
operations.

Thanks,

Bart.





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux