Commit 5676680
ext4: implement swap_activate aops using iomap
commit 0e6895b upstream.
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.
Cc: [email protected]
Reported-by: Yuxuan Shui <[email protected]>
Fixes: ac58e4f ("ext4: move ext4 bmap to use iomap infrastructure")
Signed-off-by: Ritesh Harjani <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 9129151 commit 5676680
1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3601 | 3601 | | |
3602 | 3602 | | |
3603 | 3603 | | |
| 3604 | + | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
3604 | 3611 | | |
3605 | 3612 | | |
3606 | 3613 | | |
| |||
3616 | 3623 | | |
3617 | 3624 | | |
3618 | 3625 | | |
| 3626 | + | |
3619 | 3627 | | |
3620 | 3628 | | |
3621 | 3629 | | |
| |||
3632 | 3640 | | |
3633 | 3641 | | |
3634 | 3642 | | |
| 3643 | + | |
3635 | 3644 | | |
3636 | 3645 | | |
3637 | 3646 | | |
| |||
3649 | 3658 | | |
3650 | 3659 | | |
3651 | 3660 | | |
| 3661 | + | |
3652 | 3662 | | |
3653 | 3663 | | |
3654 | 3664 | | |
| |||
3657 | 3667 | | |
3658 | 3668 | | |
3659 | 3669 | | |
| 3670 | + | |
3660 | 3671 | | |
3661 | 3672 | | |
3662 | 3673 | | |
| |||
0 commit comments