[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ye5VkIzxstxIpik6@infradead.org>
Date: Sun, 23 Jan 2022 23:30:24 -0800
From: Christoph Hellwig <hch@...radead.org>
To: NeilBrown <neilb@...e.de>
Cc: Trond Myklebust <trond.myklebust@...merspace.com>,
Anna Schumaker <anna.schumaker@...app.com>,
Chuck Lever <chuck.lever@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mel Gorman <mgorman@...e.de>,
Christoph Hellwig <hch@...radead.org>,
David Howells <dhowells@...hat.com>, linux-nfs@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/23] MM: move responsibility for setting SWP_FS_OPS to
->swap_activate
On Mon, Jan 24, 2022 at 02:48:32PM +1100, NeilBrown wrote:
> If a filesystem wishes to handle all swap IO itself (via ->direct_IO),
Right now it's half ->direct_IO and half ->readpage and about to change
with your series, isn't it?
> rather than just providing devices addresses for submit_bio(),
> SWP_FS_OPS must be set.
> Currently the protocol for setting this it to have ->swap_activate
> return zero. In that case SWP_FS_OPS is set, and add_swap_extent()
> is called for the entire file.
>
> This is a little clumsy as different return values for ->swap_activate
> have quite different meanings, and it makes it hard to search for which
> filesystems require SWP_FS_OPS to be set.
>
> So remove the special meaning of a zero return, and require the
> filesystem to set SWP_FS_OPS if it so desires, and to always call
> add_swap_extent() as required.
>
> Currently only NFS and CIFS return zero for add_swap_extent().
>
> Signed-off-by: NeilBrown <neilb@...e.de>
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@....de>
Powered by blists - more mailing lists