Re: [PATCH 0/3] vmsplice: make vmsplice a trivial wrapper for preadv2/pwritev2
From: Andy Lutomirski
Date: Sun May 31 2026 - 23:15:32 EST
On Sat, May 30, 2026 at 6:03 PM Askar Safin <safinaskar@xxxxxxxxx> wrote:
>
> See recent discussion here:
> https://lore.kernel.org/all/20260516182126.530498-1-pfalcato@xxxxxxx/T/#u
>
> For all these reasons I propose to make vmsplice a simple wrapper for
> preadv2/pwritev2.
>
I have no comment on the code or the history. But I'm 100% in favor
of the solution. vmsplice is a crappy API, and would be incredibly
complex to get the implementation right, and it should be removed.
But it has users, and the approach of just mapping them straight to
pread/pwrite makes perfect sense.
(If anyone wants to contemplate how bad the API is, contemplate gift
mode. Or contemplate that, if you want correct results, you need to
avoid modifying the memory until the recipient is done reading or you
need to avoid reading the memory until the writer is done writing, and
vmsplice *does not tell you when it's done*. And there isn't even a
caller specification of whether they want to read or write. It's ...
crap.)
--Andy