Re: [PATCH] the dm-loop target

Christoph Hellwig
2025-03-13T12:44:08Z

On Wed, Mar 12, 2025 at 12:09:41PM -0400, Kent Overstreet wrote:
> > The right way ahead for swap is to literally just treat it as a slightly
> > special case of direct I/o that is allowed to IS_SWAPFILE files. We
> > can safely do writeback to file backed folios under memory pressure,
> > so we can also go through the normal file system path.
>
> Yeah, and that gets us e.g. encrypted swap on bcachefs

You can already do this pretty easily, take a look at nfs_swap_rw.
It just would be nice to lift the boilerplate code to common code
and make this the default.