[PATCH 4/5] block: add support for vectored copies
Keith Busch
kbusch at kernel.org
Thu May 22 09:36:37 PDT 2025
On Thu, May 22, 2025 at 03:58:18PM +0200, Hannes Reinecke wrote:
> On 5/22/25 00:31, Keith Busch wrote:
> > ---
> > block/blk-lib.c | 50 ++++++++++++++++++++++++----------
> > block/ioctl.c | 59 +++++++++++++++++++++++++++++++++++++++++
> > include/linux/blkdev.h | 2 ++
> > include/uapi/linux/fs.h | 14 ++++++++++
> > 4 files changed, 111 insertions(+), 14 deletions(-)
> >
> Any specific reason why this is a different patch, and not folded into
> patch 2? It really feels odd to continuously updating interfaces which
> have been added with the same patchset...
Sure, I can do that if that's preferred. I just started this as simple
as possible, and added new capabilities from there. I thought having the
patch set show the journey might make it easier to review. If the
evolving interfaces are not helping, though, I don't mind squashing them.
> > case BLKCPY:
> > return blk_ioctl_copy(bdev, mode, argp);
> > + case BLKCPY_VEC:
> > + return blk_ioctl_copy_vec(bdev, mode, argp);
> > case BLKZEROOUT:
> > return blk_ioctl_zeroout(bdev, mode, arg);
> > case BLKGETDISKSEQ:
>
> And that makes it even worse; introducing two ioctls which basically do
> the same thing (or where one is actually a special case of the other)
> is probably not what we should be doing.
There are many interfaces that have a single vs vectored user input.
It's like read vs readv. The use cases I'm working with are in-kernel
though so I don't strongly need these user interfaces here, but it's
been great for testing. I developed some that would work well in
blktests, for example.
More information about the Linux-nvme
mailing list