[f2fs-dev] [PATCH 02/20] mm/migrate: Convert fallback_migrate_page() to fallback_migrate_folio()

2022-06-06 Thread Matthew Wilcox (Oracle)
Use a folio throughout. migrate_page() will be converted to migrate_folio() later. Signed-off-by: Matthew Wilcox (Oracle) --- mm/migrate.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 75cb6aa38988..d772ce63d7e2 100644

[f2fs-dev] [PATCH 17/20] z3fold: Convert to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
z3fold doesn't really use folios, but it needs to be called like this in order to migrate an individual page. Convert from a folio back to a page until we decide how to handle migration better for z3fold. Signed-off-by: Matthew Wilcox (Oracle) --- mm/z3fold.c | 8 +--- 1 file changed, 5 ins

[f2fs-dev] [PATCH 04/20] mm/migrate: Convert buffer_migrate_page() to buffer_migrate_folio()

2022-06-06 Thread Matthew Wilcox (Oracle)
Use a folio throughout __buffer_migrate_folio(), add kernel-doc for buffer_migrate_folio() and buffer_migrate_folio_norefs(), move their declarations to buffer.h and switch all filesystems that have wired them up. Signed-off-by: Matthew Wilcox (Oracle) --- block/fops.c| 2 +- fs

[f2fs-dev] [PATCH 15/20] balloon: Convert to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
This is little more than changing the types over; there's no real work being done in this function. Signed-off-by: Matthew Wilcox (Oracle) --- mm/balloon_compaction.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/mm/balloon_compaction.c b/mm/balloon_compacti

[f2fs-dev] [PATCH 19/20] fs: Remove aops->migratepage()

2022-06-06 Thread Matthew Wilcox (Oracle)
With all users converted to migrate_folio(), remove this operation. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/fs.h | 2 -- mm/compaction.c| 5 ++--- mm/migrate.c | 10 +- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/include/linux/fs.h b/inclu

[f2fs-dev] [PATCH 13/20] aio: Convert to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
Use a folio throughout this function. Signed-off-by: Matthew Wilcox (Oracle) --- fs/aio.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 3c249b938632..a1911e86859c 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -400,8

[f2fs-dev] [PATCH 09/20] mm/migrate: Add filemap_migrate_folio()

2022-06-06 Thread Matthew Wilcox (Oracle)
There is nothing iomap-specific about iomap_migratepage(), and it fits a pattern used by several other filesystems, so move it to mm/migrate.c, convert it to be filemap_migrate_folio() and convert the iomap filesystems to use it. Signed-off-by: Matthew Wilcox (Oracle) --- fs/gfs2/aops.c

[f2fs-dev] [PATCH 01/20] fs: Add aops->migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
Provide a folio-based replacement for aops->migratepage. Update the documentation to document migrate_folio instead of migratepage. Signed-off-by: Matthew Wilcox (Oracle) --- Documentation/filesystems/locking.rst | 5 ++-- Documentation/filesystems/vfs.rst | 13 ++- Documentation/v

[f2fs-dev] [PATCH 10/20] btrfs: Convert btrfs_migratepage to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
Use filemap_migrate_folio() to do the bulk of the work, and then copy the ordered flag across if needed. Signed-off-by: Matthew Wilcox (Oracle) --- fs/btrfs/inode.c | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c

[f2fs-dev] [PATCH 18/20] zsmalloc: Convert to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
zsmalloc doesn't really use folios, but it needs to be called like this in order to migrate an individual page. Convert from a folio back to a page until we decide how to handle migration better for zsmalloc. Signed-off-by: Matthew Wilcox (Oracle) --- mm/zsmalloc.c | 8 +--- 1 file changed,

[f2fs-dev] [PATCH 14/20] hugetlb: Convert to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
This involves converting migrate_huge_page_move_mapping(). We also need a folio variant of hugetlb_set_page_subpool(), but that's for a later patch. Signed-off-by: Matthew Wilcox (Oracle) --- fs/hugetlbfs/inode.c| 19 ++- include/linux/migrate.h | 6 +++--- mm/migrate.c

[f2fs-dev] [PATCH 06/20] btrfs: Convert btree_migratepage to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
Use a folio throughout this function. migrate_page() will be converted later. Signed-off-by: Matthew Wilcox (Oracle) --- fs/btrfs/disk-io.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 12b11e645c14..9c

[f2fs-dev] [PATCH 16/20] secretmem: Convert to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
This is little more than changing the types over; there's no real work being done in this function. Signed-off-by: Matthew Wilcox (Oracle) --- mm/secretmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/secretmem.c b/mm/secretmem.c index 206ed6b40c1d..9c7f6e3bf3e1

[f2fs-dev] [PATCH 05/20] mm/migrate: Convert expected_page_refs() to folio_expected_refs()

2022-06-06 Thread Matthew Wilcox (Oracle)
Now that both callers have a folio, convert this function to take a folio & rename it. Signed-off-by: Matthew Wilcox (Oracle) --- mm/migrate.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 77b8c662c9ca..e0a593e5b5f9 100

[f2fs-dev] [PATCH 03/20] mm/migrate: Convert writeout() to take a folio

2022-06-06 Thread Matthew Wilcox (Oracle)
Use a folio throughout this function. Signed-off-by: Matthew Wilcox (Oracle) --- mm/migrate.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index d772ce63d7e2..f19246c12fe9 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -

[f2fs-dev] [PATCH 12/20] f2fs: Convert to filemap_migrate_folio()

2022-06-06 Thread Matthew Wilcox (Oracle)
filemap_migrate_folio() fits f2fs's needs perfectly. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/checkpoint.c | 4 +--- fs/f2fs/data.c | 40 +--- fs/f2fs/f2fs.h | 4 fs/f2fs/node.c | 4 +--- 4 files changed, 3 insertions(+), 49

[f2fs-dev] [PATCH 11/20] ubifs: Convert to filemap_migrate_folio()

2022-06-06 Thread Matthew Wilcox (Oracle)
filemap_migrate_folio() is a little more general than ubifs really needs, but it's better to share the code. Signed-off-by: Matthew Wilcox (Oracle) --- fs/ubifs/file.c | 29 ++--- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/fs/ubifs/file.c b/fs/ubifs/fi

[f2fs-dev] [PATCH 20/20] mm/folio-compat: Remove migration compatibility functions

2022-06-06 Thread Matthew Wilcox (Oracle)
migrate_page_move_mapping(), migrate_page_copy() and migrate_page_states() are all now unused after converting all the filesystems from aops->migratepage() to aops->migrate_folio(). Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/migrate.h | 11 --- mm/folio-compat.c | 22

[f2fs-dev] [PATCH 08/20] mm/migrate: Convert migrate_page() to migrate_folio()

2022-06-06 Thread Matthew Wilcox (Oracle)
Convert all callers to pass a folio. Most have the folio already available. Switch all users from aops->migratepage to aops->migrate_folio. Also turn the documentation into kerneldoc. Signed-off-by: Matthew Wilcox (Oracle) --- drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 4 +-- fs/btrfs/dis

[f2fs-dev] [PATCH 00/20] Convert aops->migratepage to aops->migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
I plan to submit these patches through my pagecache tree in the upcoming merge window. I'm pretty happy that most filesystems are now using common code for ->migrate_folio; it's not something that most filesystem people want to care about. I'm running xfstests using xfs against it now, but it's l

[f2fs-dev] [PATCH 07/20] nfs: Convert to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
Use a folio throughout this function. migrate_page() will be converted later. Signed-off-by: Matthew Wilcox (Oracle) --- fs/nfs/file.c | 4 +--- fs/nfs/internal.h | 6 -- fs/nfs/write.c| 16 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/fs/nfs/f

[f2fs-dev] [PATCH RESEND v3] f2fs: use the updated test_dummy_encryption helper functions

2022-06-06 Thread Eric Biggers
From: Eric Biggers Switch f2fs over to the functions that are replacing fscrypt_set_test_dummy_encryption(). Since f2fs hasn't been converted to the new mount API yet, this doesn't really provide a benefit for f2fs. But it allows fscrypt_set_test_dummy_encryption() to be removed. Also take the

[f2fs-dev] [PATCH v3] dump.f2fs: add -I nid to dump inode by scan full disk

2022-06-06 Thread Yufen Yu via Linux-f2fs-devel
Usage: dump.f2fs -I [inode nid] /dev/sda This feature can be useful for some bugs caused by system crash. We not only need dump current valid node page, but alse the history data in disk, which can give some clues for status change of the inode. Signed-off-by: Yufen Yu --- fsck/dump.c

Re: [f2fs-dev] [PATCH v3] dump.f2fs: add -I nid to dump inode by scan full disk

2022-06-06 Thread Yufen Yu via Linux-f2fs-devel
v2: add ASSERT(ret >= 0); v3: skip data segment when scan full disk On 2022/6/7 11:40, Yufen Yu wrote: Usage: dump.f2fs -I [inode nid] /dev/sda This feature can be useful for some bugs caused by system crash. We not only need dump current valid node page, but alse the hi

Re: [f2fs-dev] [PATCH 04/20] mm/migrate: Convert buffer_migrate_page() to buffer_migrate_folio()

2022-06-06 Thread kernel test robot
Hi "Matthew, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.19-rc1 next-20220606] [cannot apply to jaegeuk-f2fs/dev-test trondmy-nfs/linux-next kdave/for-next xfs-linux/for-next] [If your patch is applied to the

Re: [f2fs-dev] [PATCH 14/20] hugetlb: Convert to migrate_folio

2022-06-06 Thread kernel test robot
Hi "Matthew, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.19-rc1 next-20220607] [cannot apply to jaegeuk-f2fs/dev-test trondmy-nfs/linux-next kdave/for-next xfs-linux/for-next] [If your patch is applied to the wrong git tree, k