linux-stable/fs/ext4
Ritesh Harjani 0e6895ba00 ext4: implement swap_activate aops using iomap
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: stable@kernel.org
Reported-by: Yuxuan Shui <yshuiv7@gmail.com>
Fixes: ac58e4fb03 ("ext4: move ext4 bmap to use iomap infrastructure")
Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
Link: https://lore.kernel.org/r/20200904091653.1014334-1-riteshh@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2020-10-18 10:35:54 -04:00
..
acl.c ext4: handle ext4_mark_inode_dirty errors 2020-06-03 23:16:50 -04:00
acl.h
balloc.c ext4: indicate via a block bitmap read is prefetched via a tracepoint 2020-08-07 14:12:35 -04:00
bitmap.c
block_validity.c ext4: correctly restore system zone info when remount fails 2020-08-07 14:12:37 -04:00
dir.c ext4: avoid utf8_strncasecmp() with unstable name 2020-06-11 11:01:33 -04:00
ext4.h ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
ext4_extents.h ext4: fix EXT_MAX_EXTENT/INDEX to check for zeroed eh_max 2020-06-03 23:16:49 -04:00
ext4_jbd2.c ext4: abort the filesystem if failed to async write metadata buffer 2020-08-07 14:12:34 -04:00
ext4_jbd2.h ext4: drop ext4_journal_free_reserved() 2020-06-03 23:16:53 -04:00
extents.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
extents_status.c ext4: remove unnecessary comparisons to bool 2020-06-03 23:16:49 -04:00
extents_status.h ext4: fix extent_status trace points 2020-01-25 02:03:03 -05:00
file.c Improvements to ext4's block allocator performance for very large file 2020-08-21 11:03:38 -07:00
fsmap.c
fsmap.h
fsync.c A lot of bug fixes and cleanups for ext4, including: 2020-06-05 16:19:28 -07:00
hash.c ext4: change to use fallthrough macro 2020-08-18 14:27:40 -04:00
ialloc.c This is the second round of ext4 commits for 5.8 merge window. It 2020-06-15 09:32:10 -07:00
indirect.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
inline.c ext4: Fix comment typo "the the". 2020-08-19 12:04:35 -04:00
inode-test.c kunit: allow kunit tests to be loaded as a module 2020-01-09 16:42:29 -07:00
inode.c ext4: implement swap_activate aops using iomap 2020-10-18 10:35:54 -04:00
ioctl.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
Kconfig ext4: replace HTTP links with HTTPS ones 2020-08-06 01:01:57 -04:00
Makefile ext4: support xattr gnu.* namespace for the Hurd 2020-06-12 13:23:34 -04:00
mballoc.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
mballoc.h ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
migrate.c ext4: handle ext4_mark_inode_dirty errors 2020-06-03 23:16:50 -04:00
mmp.c ext4: save all error info in save_error_info() and drop ext4_set_errno() 2020-04-01 17:29:06 -04:00
move_extent.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
namei.c ext4: remove unused parameter of ext4_generic_delete_entry function 2020-08-18 14:25:54 -04:00
page-io.c ext4: add inline encryption support 2020-07-08 10:29:43 -07:00
readpage.c Improvements to ext4's block allocator performance for very large file 2020-08-21 11:03:38 -07:00
resize.c ext4: fix potential race between s_flex_groups online resizing and access 2020-02-21 19:31:46 -05:00
super.c Improvements to ext4's block allocator performance for very large file 2020-08-21 11:03:38 -07:00
symlink.c
sysfs.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
truncate.h
verity.c This is the second round of ext4 commits for 5.8 merge window. It 2020-06-15 09:32:10 -07:00
xattr.c ext4: delete unnecessary checks before brelse() 2020-08-06 00:08:56 -04:00
xattr.h ext4: support xattr gnu.* namespace for the Hurd 2020-06-12 13:23:34 -04:00
xattr_hurd.c ext4: support xattr gnu.* namespace for the Hurd 2020-06-12 13:23:34 -04:00
xattr_security.c
xattr_trusted.c
xattr_user.c