Sorry for top-posting. I'm sorry I missed your patch. It's definitely better than mine in the number of validations it does. My only comment is, shouldn't we allow blocks that are not page-aligned? The current generic_swapfile_activate will simply discard the leading unaligned sectors. Your patch will immediately error out in this case. I tried to replicate the same behavior by doing ALIGN on the iomap addr. On 4/20/18, 15:26, "Darrick J. Wong" <darrick.wong@xxxxxxxxxx> wrote: On Fri, Apr 20, 2018 at 10:08:13PM +0000, Aleksei Besogonov wrote: > This patch set adds iomap-based swap file initialization, this allows > it to use files with holes on XFS for swap. Um... there's already a patch[1] implementing this out for review on the mailing list. Could you please take a look at that instead? --D [1] https://marc.info/?l=linux-xfs&m=152401984810062&w=2 > > Aleksei Besogonov (2): > fs: Add iomap_swap_activate > xfs: add support for iomap-based swapfile activation > > fs/iomap.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++ > fs/xfs/xfs_aops.c | 7 +++++ > include/linux/iomap.h | 5 +++ > mm/swapfile.c | 1 + > 4 files changed, 100 insertions(+) > > -- > 2.14.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html ��.n��������+%������w��{.n�����{�����jg��������ݢj����G�������j:+v���w�m������w�������h�����٥