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
+++
dump.f2fs -b $blkaddr -d 3 /dev/vda
[dump_dirent: 991] bitmap pos[0x2] name[❤️] len[0x6] hash[0x19dd7132] ino[0x5]
type[0x1]
[dump_dirent: 998] name(hex)[0xe2 0x9d 0xa4 0xef 0xb8 0x8f 0x0]
Signed-off-by: Chao Yu
---
fsck/dump.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff
On 4/1/25 15:47, yohan.joung wrote:
>
>
>> -Original Message-
>> From: Chao Yu
>> Sent: Tuesday, April 1, 2025 2:42 PM
>> To: 정요한(JOUNG YOHAN) Mobile AE ; linux-f2fs-
>> de...@lists.sourceforge.net
>> Cc: c...@kernel.org; jaeg...@kernel.org; jyh...@gmail.com; linux-
>> ker...@vger.kernel
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
-
I was working on next steps for this, and I have a followup question.
Today, several mount options are simply ignored if the on-disk format
does not support them. For example:
case Opt_compress_mode:
if (!f2fs_sb_has_compression(sbi)) {
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 | 68
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..61888496
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
@@ -2
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/f2fs
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/inl
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..2301daf57e56
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..f2dd3c159
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 d
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/f2fs/compress.c
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
@
> From: Chao Yu
> Sent: Thursday, March 27, 2025 4:30 PM
> To: 정요한(JOUNG YOHAN) Mobile AE ; Yohan Joung
> ; jaeg...@kernel.org; daeh...@gmail.com
> Cc: c...@kernel.org; linux-f2fs-devel@lists.sourceforge.net; linux-
> ker...@vger.kernel.org; 김필현(KIM PILHYUN) Mobile AE
> Subject: [External Mail] R
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
--- a
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/node
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, 12 insert
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..60381c3c3d9
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
--- a
When selecting a victim using next_victim_seg in a large section, the
selected section might already have been cleared and designated as the
new current section, making it actively in use.
This behavior causes inconsistency between the SIT and SSA.
F2FS-fs (dm-54): Inconsistent segment (70961) typ
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 10064
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..210f0cf
After commit 91b587ba79e1 ("f2fs: Introduce linear search for
dentries"), f2fs forced to use linear lookup whenever a hash-based
lookup fails on casefolded directory, it may affect performance
for scenarios: a) create a new file w/ filename it doesn't exist
in directory, b) lookup a file which may
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/f2f
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/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/f2fs
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/di
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 deletio
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/d
Thank you very much for your prompt and insightful reply! I truly
appreciate you taking the time to address my question so quickly.
I understand now. It seems the kernel's flusher threads are indeed
sufficient for handling dirty page writeback effectively. And I
realize that they ultimately call `
All callers now use f2fs_new_node_folio().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 6 --
fs/f2fs/node.c | 4 ++--
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 768f5fd9b45d..b546c720cf03 100644
--- a/fs/f2fs/f2fs.h
++
All callers have now been converted to f2fs_grab_cache_folio() so
we can remove this wrapper.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 10 --
1 file changed, 10 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index d975d7f7d269..a32ac1ecb61c 100644
--- a/fs/
All callers now have a folio, so pass it in. Remove two calls to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/dir.c| 4 ++--
fs/f2fs/f2fs.h | 2 +-
fs/f2fs/inline.c | 2 +-
fs/f2fs/inode.c | 16
fs/f2fs/node.c | 6 +++---
5 files changed, 15
All callers have now been converted to call f2fs_get_inode_folio().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h | 1 -
fs/f2fs/node.c | 7 ---
2 files changed, 8 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index cf61763e2209..0fe764c30eac 100644
--- a/fs/f2fs/f2f
Convert f2fs_get_sum_page() to f2fs_get_sum_folio() and add a
f2fs_get_sum_page() wrapper.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/f2fs.h| 8 +++-
fs/f2fs/segment.c | 6 +++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
inde
On 03/19, Dan Carpenter wrote:
> On Wed, Mar 19, 2025 at 11:30:10AM +, Colin Ian King wrote:
> > The variable err is being assigned a value zero and then the following
> > goto page_hit reassigns err a new value. The zero assignment is redundant
> > and can be removed.
> >
> > Signed-off-by: C
From: Chao Yu
[ Upstream commit e6494977bd4a83862118a05f57a8df40256951c0 ]
syzbot reports an UBSAN issue as below:
[ cut here ]
UBSAN: array-index-out-of-bounds in fs/f2fs/node.h:381:10
index 18446744073709550692 is out of range for type '__le32[5]' (aka 'unsigned
int[5
Iterate over each folio rather than each page. Convert
f2fs_compress_control_page() to f2fs_compress_control_folio() since
this is the only caller. Removes a reference to page->mapping which
is going away soon as well as calls to fscrypt_is_bounce_page() and
fscrypt_pagecache_page().
Signed-off-
1. After we start atomic write in a database file, before committing
all data, we'd better not set inode w/ vfs dirty status to avoid
redundant updates, instead, we only set inode w/ atomic dirty status.
2. After we commit all data, before committing metadata, we need to
clear atomic dirty status,
Grab a folio instead of a page. Also convert seg_info_to_sit_page() to
seg_info_to_sit_folio() and use a folio in f2fs_flush_sit_entries().
Saves a couple of calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/segment.c | 20 ++--
fs/f2fs/segment.h | 6
Also convert get_current_nat_page() to get_current_nat_folio().
Removes three hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/checkpoint.c | 4 ++--
fs/f2fs/f2fs.h | 2 +-
fs/f2fs/node.c | 28 ++--
fs/f2fs/segment.c|
Remove two hidden calls to compound_head()
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/inline.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 9bac2c4e8937..4684ecc0cb5a 100644
--- a/fs/f2fs/inline.c
+++ b/f
Dear f2fs developers,
My name is [Your Name], and I am an undergraduate student from Nanjing
University of Technology in China. I am a newcomer to kernel
development, and I am currently learning about f2fs and working on
enabling large folio support.
After studying the concept of folios, especial
51 matches
Mail list logo