iomap: add a swapfile activation function

Add a new iomap_swapfile_activate function so that filesystems can
activate swap files without having to use the obsolete and slow bmap
function.  This enables XFS to support fallocate'd swap files and
swap files on realtime devices.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Jan Kara <jack@suse.cz>
This commit is contained in:
Darrick J. Wong 2018-05-10 08:38:15 -07:00
commit 67482129cd
3 changed files with 185 additions and 0 deletions