I've started looking at how the page cache can help filesystems handle
compressed data better. Feedback would be appreciated! I'll probably
say a few things which are obvious to anyone who knows how compressed
files work, but I'm trying to be explicit about my assumptions.
First, I believe that
On Thu, Jul 10, 2025 at 02:26:38PM +, Jaegeuk Kim wrote:
> On 07/10, Matthew Wilcox wrote:
> > On Thu, Jul 10, 2025 at 03:17:28PM +0800, kernel test robot wrote:
> > > >> fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to
> > > >
On Thu, Jul 10, 2025 at 03:17:28PM +0800, kernel test robot wrote:
> >> fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter
> >> of type 'struct folio *' discards qualifiers
> >> [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
> 58 | return
>
The page argument is only used to look up the address of the nat_blk.
Since the caller already has it, pass it in instead. Also mark it const
as the nat_blk isn't modified by this function.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.c | 5 ++---
1 file changed, 2 insertions(
Both callers now have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/compress.c | 7 +++
fs/f2fs/data.c | 4 ++--
fs/f2fs/f2fs.h | 4 ++--
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index
We have two folios to deal with here; one carries the metadata and the
other points to the data. They may be the same, but if it's compressed,
the data_folio will differ from the metadata folio.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 12 ++--
1 file chang
Change from bio_for_each_segment_all() to bio_for_each_folio_all()
to iterate over each folio instead of each page.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index
Convert bio_page to bio_folio and use it throughout.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 01c0358ef66f..4649c0a510a0 100644
--- a/fs/f2fs/data.c
+++ b
The only caller has folios so pass them in. Also mark them as const to help
the compiler.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.h | 7 ---
fs/f2fs/recovery.c | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index
All callers now have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 2 +-
fs/f2fs/file.c | 18 +-
fs/f2fs/recovery.c | 4 ++--
fs/f2fs/segment.c | 2 +-
include/linux/f2fs_fs.h | 2 +-
5 files changed, 14
The only caller already has a folio so pass it in.
f2fs_cache_compressed_page() is not used outside compress.c so
make it static. This requires a forward declaration (or would require
rearranging this file, but I've chosen not to do that for readability of
the diff).
Signed-off-by: Ma
The only caller has a folio, so pass it in and operate on it.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/compress.c | 2 +-
fs/f2fs/f2fs.h | 12 +++-
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 5be1a4396f80
All callers now have a folio so pass it in. Also make it const to help
the compiler.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 6 +++---
fs/f2fs/file.c | 2 +-
fs/f2fs/gc.c| 2 +-
fs/f2fs/inline.c| 2 +-
fs/f2fs/inode.c | 2
One caller passes NULL and the other caller already has a folio so
pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 2 +-
fs/f2fs/node.c | 6 +++---
fs/f2fs/recovery.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs
Both remaining uses of page now have a folio equivalent.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 72565841a16c..18c5b619f48e 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs
All callers now have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/inode.c | 2 +-
fs/f2fs/node.c| 12 ++--
fs/f2fs/node.h| 2 +-
fs/f2fs/segment.c | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/fs/f2fs/inode.c b/fs
Remove a call to compound_head() by replacing a call to unlock_page()
with a call to folio_unlock().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/compress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 8cbb8038bc72
Change from bio_for_each_segment_all() to bio_for_each_folio_all()
to iterate over each folio instead of each page.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index
The only caller has a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/compress.c | 6 +++---
fs/f2fs/data.c | 2 +-
fs/f2fs/f2fs.h | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 4e432df2431f
All three callers have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index b82d8784248e..56ea8dfc43a7 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs
All callers have a folio so pass it in. Removes a call to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.h | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index 7e7578a547ad..8d7d7405de9b 100644
--- a/fs
The only caller has a folio, so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/inline.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 0d021c638922..fa072e4a5616 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs
The only caller has a folio, so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/inode.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 6ce6279e4eb5..6b91531f79a4 100644
--- a/fs/f2fs/inode.c
+++ b/fs
All callers now have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/extent_cache.c | 2 +-
fs/f2fs/file.c | 2 +-
fs/f2fs/gc.c | 2 +-
fs/f2fs/node.c | 4 ++--
fs/f2fs/node.h | 6 +++---
fs/f2fs/recovery.c | 14
All callers now have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.c| 15 +++
fs/f2fs/node.h| 4 ++--
fs/f2fs/segment.c | 4 ++--
3 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index
The only caller has a folio, so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 2 +-
fs/f2fs/node.c | 6 +++---
fs/f2fs/recovery.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index aa535dcf2297
Both callers have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.h | 2 +-
fs/f2fs/recovery.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index 17afa6d51053..aea801c58097 100644
--- a/fs/f2fs/node.h
Return a folio from this function and convert its one caller.
Removes a call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index
All callers have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.c | 2 +-
fs/f2fs/node.h | 8
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 9c47f1e73421..89a27bbc0226 100644
--- a/fs/f2fs/node.c
All callers now have a folio so pass it in
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 10 +-
fs/f2fs/inode.c | 8
fs/f2fs/node.c | 6 +++---
fs/f2fs/node.h | 30 +++---
4 files changed, 27 insertions(+), 27 deletions(-)
diff --git
The only caller has a folio, so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/recovery.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index f84a96deaa07..dacfe7c1cbe5 100644
--- a/fs/f2fs/recovery.c
Most callers pass NULL, and the one which passes a page already has a
folio, so we can pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h| 2 +-
fs/f2fs/segment.c | 10 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs
Some more folio conversions for f2fs. Again, I have checked these patches
build, but otherwise they are untested. There are three inline functions
in fscrypt that I change to take a const struct folio pointer instead
of a mutable pointer that I don't think should cause any conflicts.
Ma
Name these new functions folio_test_f2fs_*(), folio_set_f2fs_*() and
folio_clear_f2fs_*(). Convert all callers which currently have a folio
and cast back to a page.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/checkpoint.c | 4 ++--
fs/f2fs/data.c | 12 ++--
fs/f2fs/f2fs.h
All callers have been converted to F2FS_F_SB() so delete this wrapper.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 5 -
1 file changed, 5 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 3ae1f15205c5..251fe1f7f57d 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs
Both callers have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.c | 2 +-
fs/f2fs/node.h | 2 +-
fs/f2fs/recovery.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index f8620b262b72..7ea5a98399a7
All callers have a folio so pass it in. Also mark it as const to help
the compiler.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/inode.c | 2 +-
fs/f2fs/node.c | 4 ++--
fs/f2fs/node.h | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/inode.c b/fs/f2fs
Most callers pass NULL, and the one that passes a page already has a
folio. Also convert __submit_merged_write_cond() to take a folio.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c| 8
fs/f2fs/f2fs.h| 2 +-
fs/f2fs/segment.c | 2 +-
3 files changed, 6 insertions
All callers have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.c | 6 +++---
fs/f2fs/node.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 26d3bc7597d9..f964b526b73c 100644
--- a/fs/f2fs/node.c
+++ b
Get the folio from the bio instead of the page.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 116482adf591..942aaf10b78b 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
All callers can simply call folio_detach_private(). This was the
only way that clear_page_private_data() could be called, so remove
that too.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 4 ++--
fs/f2fs/dir.c | 2 +-
fs/f2fs/f2fs.h | 18 --
3 files changed, 3
The only caller has a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.h| 6 +++---
fs/f2fs/segment.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index 914399113f21..5cbe038bfaab 100644
--- a/fs/f2fs
All callers have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h| 2 +-
fs/f2fs/inode.c | 10 +-
fs/f2fs/node.c| 2 +-
fs/f2fs/node.h| 2 +-
fs/f2fs/segment.c | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/fs
The only caller has a folio, so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/extent_cache.c | 4 ++--
fs/f2fs/f2fs.h | 2 +-
fs/f2fs/inode.c| 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c
All callers have a folio so pass it in. Also make the argument const
as the function does not modify it. Removes a call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 2 +-
fs/f2fs/node.h | 10 +-
fs/f2fs/recovery.c | 6 +++---
3 files
All callers have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/inode.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 0a071ce586fa..bee6b0970e7b 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs
Both callers have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/inode.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index bee6b0970e7b..61fd96f0a1ff 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
All callers have a folio so pass it in. Also mark it as const to help
the compiler.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.c | 18 +-
fs/f2fs/node.h | 4 ++--
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
All callers have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.c | 6 +++---
fs/f2fs/node.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index f964b526b73c..db41d41f03db 100644
--- a/fs/f2fs/node.c
+++ b
The only caller already has a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index f98d83ccd1e2..3463fa414b55 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs
All callers have a folio so pass it in. Also mark it as const to help
the compiler.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.c | 4 ++--
fs/f2fs/node.h | 4 ++--
fs/f2fs/recovery.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/node.c b/fs
Convert the passed page to a folio and use it throughout. Removes
a use of fscrypt_is_bounce_page(), which we're trying to remove.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 11 ++-
fs/f2fs/f2fs.h | 2 +-
include/linux/fscrypt.h | 7 ---
3
Use a folio instead of a page when dealing with the page cache. Removes
a hidden call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/namei.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index
All callers now have a folio so pass it in. Also remove the test for
the private flag; it is redundant with checking folio->private for being
NULL.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/compress.c | 14 ++
fs/f2fs/data.c | 10 +-
fs/f2fs/f2fs.h |
The only caller has a folio, so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/recovery.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index dacfe7c1cbe5..10212130097c 100644
--- a/fs/f2fs/recovery.c
+++ b/fs
All three callers now have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.h | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index a03e30a1b8c2..657f9a2d4b05 100644
--- a/fs/f2fs/node.h
+++ b/fs/f2fs
The only caller has a folio, so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 2 +-
fs/f2fs/inline.c | 4 ++--
fs/f2fs/inode.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index d278b5117629..0e33c971aff7
All callers have a folio so pass it in. Also make the argument const
as the function does not modify it.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 2 +-
fs/f2fs/inode.c | 4 ++--
fs/f2fs/node.c | 6 +++---
fs/f2fs/node.h | 4 ++--
4 files changed, 8 insertions(+), 8
The only caller already has a folio so convert this function to be folio
based.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/compress.c | 2 +-
fs/f2fs/f2fs.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index
The only caller has a folio, so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/recovery.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index 51ebed4e1521..f84a96deaa07 100644
--- a/fs/f2fs/recovery.c
+++ b/fs
Put fio->page insto a union with fio->folio. This lets us remove a
lot of folio->page and page->folio conversions.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/checkpoint.c | 4 ++--
fs/f2fs/data.c | 17 -
fs/f2fs/f2fs.h | 7 +--
All callers have a folio so pass it in. Also make the argument const
as the function does not modify it.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 2 +-
fs/f2fs/inode.c| 8
fs/f2fs/node.c | 24
fs/f2fs/node.h | 4 ++--
fs
All callers now have a folio, so pass it in. Also make it const as
F2FS_INODE() does not modify the struct folio passed in (the data it
describes is mutable, but it does not change the contents of the struct).
This may improve code generation.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs
All callers now have a folio so pass it in. Removes a call to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/compress.c | 2 +-
fs/f2fs/data.c | 11 +--
fs/f2fs/f2fs.h | 6 +++---
3 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/fs/f2fs
On Mon, Jun 23, 2025 at 09:39:41AM +, Shivank Garg wrote:
> From: "Matthew Wilcox (Oracle)"
>
> Add a mempolicy parameter to filemap_alloc_folio() to enable NUMA-aware
> page cache allocations. This will be used by upcoming changes to
> support NUMA polic
On Mon, Jun 16, 2025 at 08:33:23PM +0100, Lorenzo Stoakes wrote:
> fs/ext4/file.c | 2 +-
> fs/xfs/xfs_file.c | 3 ++-
Both of these already have the inode from the file ...
> +static inline bool daxdev_mapping_supported(vm_flags_t vm_flags,
> + st
from __write_node_folio)
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 1cb4cba7f961..bfe104db284e 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -2078,7 +2078,6 @@ int f2fs_sync_node_pages(struct
On Sat, May 31, 2025 at 04:20:02PM -0700, syzbot wrote:
> syzbot has bisected this issue to:
>
> commit 80f31d2a7e5f4efa7150c951268236c670bcb068
> Author: Christoph Hellwig
> Date: Thu May 8 05:14:32 2025 +
That's not possible; this commit is after the original report.
That said, there _i
sts.sourceforge.net (open list:F2FS FILE SYSTEM)
> Signed-off-by: Kairui Song
Reviewed-by: Matthew Wilcox (Oracle)
> @@ -130,7 +130,7 @@ int f2fs_read_inline_data(struct inode *inode, struct
> folio *folio)
> return -EAGAIN;
> }
>
> - if (folio_index(
Remove four hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 25 +
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 09b440e1dd12..af0106e4f184 100644
--- a/fs/f2fs/data.c
Fetch a folio from the pagecache instead of a page. Removes two
calls to compound_head()
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/file.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 8f1adaa9f90a..382ab04a75c3 100644
Convert all callers to pass in a pointer to a folio instead of a page.
Also convert f2fs_inode_by_name() to take a folio pointer. Removes
six calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/dir.c | 21 +++
fs/f2fs/f2fs.h | 4 +--
fs/f2fs/namei.c
Get a folio instead of a page. Saves two hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/segment.c | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index aa0f2f243dba
Remove a call to compound_head()
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/xattr.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
index d58b1e44e133..dd632df8d944 100644
--- a/fs/f2fs/xattr.c
+++ b/fs/f2fs/xattr.c
Remove two calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 8a94bae2ab78..241b374e8dc8 100644
--- a/fs/f2fs/node.c
+++ b/fs
Remove eight hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/inline.c | 26 +-
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 4b0a7062a0e0..9bac2c4e8937 100644
--- a/fs/f2fs
Get a folio from the pagecache and use it throughout. Removes two
calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 9c79ceed1c6d
Add f2fs_filemap_get_folio() as a wrapper around __filemap_get_folio()
which can inject an error. Removes seven calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/compress.c | 32
fs/f2fs/f2fs.h | 10 ++
2 files changed, 26
Get a folio instead of a page and use it throughout. Removes a
call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/dir.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 5a63ff0df03b
Convert f2fs_new_node_page() to f2fs_new_node_folio() and add
a compatibility wrapper. Removes five hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 8 +++-
fs/f2fs/node.c | 28 ++--
2 files changed, 21 insertions(+), 15
Remove a reference to page->mapping which is going away soon.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/compress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 668c04e93a95..a01567bbcd33 100644
--- a/fs/f
Look up a folio instead of a page, and if that fails, allocate a folio.
Removes five calls to compound_head(), one of the last few references to
add_to_page_cache_lru() and honours the cpuset_do_page_mem_spread()
setting.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/compress.c | 24
Removes two calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 241b374e8dc8..e29828c2f7b5 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs
Remove a call to f2fs_get_inode_page().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index af0106e4f184..5904a40fbf51 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
Get a folio instead of a page and operate on it. Saves a call to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/dir.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index f2dd3c159e28..a24f04fc9073 100644
Remove two calls to compound_head()
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/node.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 1c6eeed110c9..8a94bae2ab78 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs
Remove three hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/gc.c | 30 +++---
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 1f3c275099e5..bdc1d079c7b3 100644
--- a/fs/f2fs/gc.c
+++ b
Convert each page in rpages to a folio before operating on it. Replaces
eight calls to compound_head() with one and removes a reference to
page->mapping which is going away soon.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/compress.c | 22 --
1 file changed,
All callers now have a folio, so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 4 ++--
fs/f2fs/node.c | 4 ++--
fs/f2fs/xattr.c | 8
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 8e700621ee9d
Grab a folio instead of a page. Saves two hidden calls to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/segment.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 41b9a69c995c..3e6acb9ab610 100644
The only caller has a folio, so pass it in. Removes two hidden calls
to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/dir.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 4decec1800bf..85e42df34c99
Remove a hidden call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/recovery.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index 4b2c09d63bbf..dd69ff5b7661 100644
--- a/fs/f2fs/recovery.c
The only caller has a folio, so pass it in.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 2 +-
fs/f2fs/inline.c | 8
fs/f2fs/recovery.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index dc7463004c75
All callers now have a folio, so pass it in. Removes a call to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 4 ++--
fs/f2fs/file.c | 2 +-
fs/f2fs/inline.c | 18 +-
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/fs/f2fs
On Mon, Mar 24, 2025 at 08:47:05AM +0800, Nanzhe Zhao wrote:
> Knowing that the F2FS community is currently heavily invested in the
> folio support effort, I wanted to also bring up some observations and
> questions regarding folio support in F2FS garbage collection.
> Specifically, I'm concerned a
The folio equivalent of f2fs_get_node_page().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 1 +
fs/f2fs/node.c | 5 +
2 files changed, 6 insertions(+)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 8b5c81116653..62ae222824e9 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs
Convert f2fs_get_new_data_page() into f2fs_get_new_data_folio() and
add a f2fs_get_new_data_page() wrapper.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 6 +++---
fs/f2fs/f2fs.h | 9 -
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/data.c b/fs
Remove three hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/dir.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 2334995c9f9b..1e939c251752 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs
Convert all three callers to handle a folio return. Remove three
calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/dir.c| 30 +++---
fs/f2fs/f2fs.h | 2 +-
fs/f2fs/inline.c | 12 ++--
3 files changed, 22 insertions(+), 22
Both callers have a folio, so pass it in. Removes seven calls to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/data.c | 2 +-
fs/f2fs/f2fs.h | 4 ++--
fs/f2fs/inline.c | 18 +-
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/fs/f2fs
1 - 100 of 1249 matches
Mail list logo