lkml.org 
[lkml]   [2022]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@suse.de>

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

\
 
 \ /
  Last update: 2022-01-24 08:31    [W:0.577 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site