Re: [PATCH 2/3] mm/swap: add a new swap_ops.h header to allow for pluggable swap ops

Chris Li <[email protected]> Wed, 22 Jul 2026 09:56:36 -0700
Newsgroups org.kernel.vger.linux-nfs,org.kernel.vger.linux-cifs,org.kvack.linux-mm
Message-ID <CACePvbXCoJQD2xoojv1QtZX6FDim8Ar7Mj7KgtLbZ81J9mk8Kg@mail.gmail.com>
On Wed, Jul 22, 2026 at 6:06 AM Christoph Hellwig <[email protected]> wrote:
>
> Add a new header to declare the swap_iocb, swap_ops and swap_ctx to
> allow for swap_ops implementations outside of mm/page_io.c.  This
> will be used to remove the double indirection for file system-based
> swap.
>
> Note that there already is a swapops.h header, which is totally
> unrelated to struct swap_ops.  The close naming is a bit unfortunate,
> but I could not think of a better name for this header.

Can you please clarify if this commit introduces any functional or API
level change this commit other than moving the code around?
I don't think so, but I just want some clarification. Maybe there is a
minor API change to remove the double indirection that I don't see.
Anyway, it would be better to spell it out in the commit message.

Chris