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

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


On 14.10.20 22:32, Seth Forshee wrote:
> From: Ritesh Harjani <riteshh at linux.ibm.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1892728
> 
> 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 gmail.com>
> Fixes: ac58e4fb03f ("ext4: move ext4 bmap to use iomap infrastructure")
> Signed-off-by: Ritesh Harjani <riteshh at linux.ibm.com>
> Link: https://lore.kernel.org/r/20200904091653.1014334-1-riteshh@linux.ibm.com
> Signed-off-by: Theodore Ts'o <tytso at mit.edu>
> (cherry picked from commit 424de74af0d0679e99660904a5f472acd85bdb73 linux-next)
> Signed-off-by: Seth Forshee <seth.forshee at canonical.com>
> ---

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

-Stefan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20201023/5969a9cc/attachment-0001.sig>


More information about the kernel-team mailing list