APPLIED: [PATCH][G/Unstable] ext4: implement swap_activate aops using iomap

Stefan Bader stefan.bader at
Fri Oct 23 07:49:56 UTC 2020

On 14.10.20 22:32, Seth Forshee wrote:
> From: Ritesh Harjani <riteshh at>
> BugLink:
> After moving ext4's bmap to iomap interface, swapon functionality
> on files created using fallocate (which creates unwritten extents) are
> failing. This is since iomap_bmap interface returns 0 for unwritten
> extents and thus generic_swapfile_activate considers this as holes
> and hence bail out with below kernel msg :-
> [340.915835] swapon: swapfile has holes
> To fix this we need to implement ->swap_activate aops in ext4
> which will use ext4_iomap_report_ops. Since we only need to return
> the list of extents so ext4_iomap_report_ops should be enough.
> Reported-by: Yuxuan Shui <yshuiv7 at>
> Fixes: ac58e4fb03f ("ext4: move ext4 bmap to use iomap infrastructure")
> Signed-off-by: Ritesh Harjani <riteshh at>
> Link:
> Signed-off-by: Theodore Ts'o <tytso at>
> (cherry picked from commit 424de74af0d0679e99660904a5f472acd85bdb73 linux-next)
> Signed-off-by: Seth Forshee <seth.forshee at>
> ---

Applied to Groovy (apparently for a while but I could see no applied email in my
inbox). Thanks.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the kernel-team mailing list