Re: [PATCH V2 2/2] fs: Move swap_[de]activate to file_operations

David Sterba
2019-11-13T15:25:28Z

On Tue, Nov 12, 2019 at 04:42:44PM -0800, ira.weiny@intel.com wrote:
> From: Ira Weiny <ira.weiny@intel.com>
>
> swap_activate() and swap_deactivate() have nothing to do with address
> spaces. We want to be able to change the address space operations on
> the fly to allow changing inode flags dynamically.
>
> Switching address space operations can be difficult to do reliably.[1]
> Therefore, to simplify switching address space operations we reduce the
> number of functions in those operations by moving swap_activate() and
> swap_deactivate() out of the address space operations.
>
> No functionality is changed with this patch.
>
> This has been tested with XFS but not NFS, f2fs, or btrfs.
>
> Also note we move some functions to facilitate compilation. But there
> are no functional changes are contained within those diffs.
>
> [1] https://lkml.org/lkml/2019/11/11/572
>
> Cc: Dave Chinner <david@fromorbit.com>
> Cc: linux-fsdevel@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Suggested-by: Jan Kara <jack@suse.cz>
> Signed-off-by: Ira Weiny <ira.weiny@intel.com>
>
> ---
> Changes from V0:
> Update cover letter.
> fix btrfs as per Andrew's comments
> change xfs_iomap_swapfile_activate() to xfs_file_swap_activate()
>
> Changes from V1:
> Update recipients list
>
>
> fs/btrfs/file.c | 341 +++++++++++++++++++++++++++++++++++++++++++++
> fs/btrfs/inode.c | 340 --------------------------------------------

For the btrfs part

Acked-by: David Sterba <dsterba@suse.com>

There's going to be a minor conflict with current 5.5 queue, the
resolution is simple rename of btrfs_block_group_cache to btrfs_block_group.