[PATCH 1/5] block: new sector copy api

Keith Busch kbusch at kernel.org
Thu May 22 13:04:25 PDT 2025


On Thu, May 22, 2025 at 12:22:22PM -0700, Bart Van Assche wrote:
> 
> Is avoiding code duplication still a goal in the Linux kernel project?

I feel like that's a generic goal of software development in general.

> If so, should the above code be consolidated with kcopyd into a single
> implementation?

This patch provides a synchronous interface, similar to other services
in blk-lib's APIs, like blkdev_issue_zeroout().  kcopyd, on the other
hand, is an asynchronous interface with its own zero-out implementation
(dm_kcopyd_zero). It's not like unifying these operations for different
use cases was a priority; the implementations don't have much in common,
so its not really duplicated code anyway.

Now, if we are able to settle on the REQ_OP_COPY implementation, then it
wouldn't be a big deal to have kcopyd use it too.



More information about the Linux-nvme mailing list