On 9/4/2025 5:35 PM, Wang Xiaojun wrote:
Hi Chao,
We previously thought that "triggering checkpoint for fsync after falloc
-k" could solve this problem.
But I found that the above method can be invalid in the following scenarios.
case 1:
write fileA 2M | falloc -k 2M 100M | truncate 10M
At th
In error path of __get_node_folio(), if the folio is not uptodate, let's
avoid unnecessary folio_clear_uptodate() for cleanup.
Signed-off-by: Chao Yu
---
fs/f2fs/node.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 4254db453b2d..482a362
On 9/3/25 08:04, Zhiguo Niu wrote:
> Chao Yu via Linux-f2fs-devel
> 于2025年9月1日周一 10:08写道:
>>
>> It reports a bug from device w/ zufs:
>>
>> F2FS-fs (dm-64): Inconsistent segment (173822) type [1, 0] in SSA and SIT
>> F2FS-fs (dm-64): Stopped filesy
Below two functions should never fail, clean up error handling in their
callers:
1) f2fs_grab_read_bio() in f2fs_submit_page_read()
2) bio_add_folio() in f2fs_submit_page_read()
Signed-off-by: Chao Yu
---
fs/f2fs/data.c | 41 -
1 file changed, 8 insertions
This testcase tries to check whether f2fs can handle "usrjquota="
during remount correctly, it expects kernel will encounter NULL
pointer dereference bug w/o the fix ("f2fs: fix to avoid NULL pointer
dereference in f2fs_check_quota_consistency()").
Cc: Jaegeuk Kim
Signed-off-by: Chao Yu
---
tes
On 8/31/25 07:54, Jaegeuk Kim wrote:
> On 08/30, Chao Yu wrote:
>> On 8/30/2025 4:47 AM, Jaegeuk Kim wrote:
>>> On 08/29, Chao Yu wrote:
On 8/28/2025 11:23 PM, Jaegeuk Kim wrote:
> On 08/28, Chao Yu wrote:
>> On 8/28/25 05:52, Jaegeuk Kim via Linux-f2fs-devel wrote:
>>> Let's split
It reports a bug from device w/ zufs:
F2FS-fs (dm-64): Inconsistent segment (173822) type [1, 0] in SSA and SIT
F2FS-fs (dm-64): Stopped filesystem due to reason: 4
Thread AThread B
- f2fs_expand_inode_data
- f2fs_allocate_pinning_section
- f2fs_gc_range
- do
This is a regression test:
1. create foo & bar
2. write 8M data to foo
3. use inject.f2fs to inject i_nid[0] of foo w/ ino of bar
4. fpunch in foo w/ specified range
If we haven't applied kernel patch ("f2fs: fix to do sanity check on
node footer for non inode dnode"), f2fs may missed to do sanity
On 8/30/2025 4:47 AM, Jaegeuk Kim wrote:
On 08/29, Chao Yu wrote:
On 8/28/2025 11:23 PM, Jaegeuk Kim wrote:
On 08/28, Chao Yu wrote:
On 8/28/25 05:52, Jaegeuk Kim via Linux-f2fs-devel wrote:
Let's split IPU writes in hot data area to improve the GC efficiency.
I didn't get it, IPU may be no
On 8/28/2025 4:11 PM, Liao Yuanhong wrote:
Introduces two new sys nodes: allocate_section_hint and
allocate_section_policy. The allocate_section_hint identifies the boundary
between devices, measured in sections; it defaults to the end of the device
for single storage setups, and the end of the f
On 8/28/2025 11:23 PM, Jaegeuk Kim wrote:
On 08/28, Chao Yu wrote:
On 8/28/25 05:52, Jaegeuk Kim via Linux-f2fs-devel wrote:
Let's split IPU writes in hot data area to improve the GC efficiency.
I didn't get it, IPU may be not friendly for migrating data along w/ write in
hot area?
This dea
On 8/28/25 05:52, Jaegeuk Kim via Linux-f2fs-devel wrote:
> Let's split IPU writes in hot data area to improve the GC efficiency.
I didn't get it, IPU may be not friendly for migrating data along w/ write in
hot area?
Thanks,
>
> Signed-off-by: Jaegeuk Kim
> ---
> fs/f2fs/segment.c | 3 ++-
>
On 8/26/25 09:44, wangzijie wrote:
>> On 8/13/25 12:04, wangzijie wrote:
>>> Sometimes I suffered the nat_tree_lock contention between
>>> f2fs_write_checkpoint
>>> and f2fs_get_node_info. Commit a9419b6("f2fs: do not bother checkpoint by
>>> f2fs_get_node_info") also mentioned that situation.
>>>
On 8/27/25 14:15, Yangyang Zang wrote:
> Signed-off-by: Yangyang Zang
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
On 8/26/25 22:05, Liao Yuanhong wrote:
> Introduces two new sys nodes: allocate_section_hint and
> allocate_section_policy. The allocate_section_hint identifies the boundary
> between devices, measured in sections; it defaults to the end of the device
> for single storage setups, and the end of the
On 8/26/25 09:48, 王晓珺 wrote:
> 在 8/25/2025 10:08 AM, Chao Yu 写道:
>> On 8/20/25 15:54, Wang Xiaojun wrote:
>>> This patch fixes missing space reclamation during the recovery process.
>>>
>>> In the following scenarios, F2FS cannot reclaim truncated space.
>>> case 1:
>>> write file A, size is 1G | C
On 8/25/25 11:42, Liao Yuanhong wrote:
>
> On 8/25/2025 11:10 AM, Chao Yu wrote:
>> Yuanhong,
>>
>> On 8/20/25 16:21, Liao Yuanhong wrote:
>>> Introduces two new sys nodes: allocate_section_hint and
>>> allocate_section_policy. The allocate_section_hint identifies the boundary
>>> between devices,
Yuanhong,
On 8/20/25 16:21, Liao Yuanhong wrote:
> Introduces two new sys nodes: allocate_section_hint and
> allocate_section_policy. The allocate_section_hint identifies the boundary
> between devices, measured in sections; it defaults to the end of the device
> for single storage setups, and the
On 8/13/25 12:04, wangzijie wrote:
> Sometimes I suffered the nat_tree_lock contention between
> f2fs_write_checkpoint
> and f2fs_get_node_info. Commit a9419b6("f2fs: do not bother checkpoint by
> f2fs_get_node_info") also mentioned that situation.
>
> My idea is, when flush nat entries, we can u
On 8/21/25 10:40, Jiucheng Xu via B4 Relay wrote:
> From: Tao Zeng
>
> Always do checkpoint is a heavy behavior for compressed file.
> But for contiguous writing of a file, checkpoint need to be
> skipped to help improve performance.
>
> Tested with iozone for always do check point on compressed
On 8/20/25 15:54, Wang Xiaojun wrote:
> This patch fixes missing space reclamation during the recovery process.
>
> In the following scenarios, F2FS cannot reclaim truncated space.
> case 1:
> write file A, size is 1G | CP | truncate A to 1M | fsync A | SPO
>
> case 2:
> CP | write file A, size i
On 8/20/25 12:34, Bagas Sanjaya wrote:
> Hi,
>
> Here are documentation formatting cleanup for f2fs. This also includes
> docs retitle at the end of series ([6/6]) as a bonus.
>
> This series is based on docs-next tree.
This patchset looks good to me, thanks for your work.
Reviewed-by: Chao Yu
On 8/23/2025 6:23 AM, Hillf Danton wrote:
Date: Fri, 22 Aug 2025 11:56:27 -0700
Hello,
syzbot found the following issue on:
HEAD commit:3957a5720157 Merge tag 'cgroup-for-6.17-rc2-fixes' of git:..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13e20c42580
As syzbot reported below:
[ cut here ]
kernel BUG at fs/f2fs/file.c:1243!
Oops: invalid opcode: [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5354 Comm: syz.0.0 Not tainted
6.17.0-rc1-syzkaller-00211-g90d970cade8e #0 PREEMPT(full)
RIP: 0010:f2fs_truncate_hole+0x69e/0x6c0 fs
On 8/20/2025 8:42 PM, Sheng Yong wrote:
Hi, all,
Since we have not yet determined how to check the test result properly,
I split patchset v2 into two parts on Chao's suggestion. This is the
first part which contains some fixes/cleanups for f2fs-tools, and adds
new injections for inject.f2fs.
T
On 8/20/2025 8:42 PM, Sheng Yong wrote:
From: Sheng Yong
The following members are added to inject more fields in cp:
* next_blkaddr: inject fsync dnodes
An error is returned if no fsync dnode is found.
Furthermore, the injection is not supported on a zoned device. This
is because fs
On 8/6/25 20:32, mason.zhang wrote:
> This fix combines the space check for data_blocks and dent_blocks when
> verifying HOT_DATA segment capacity, preventing potential insufficient
> space issues during checkpoint.
>
> Fixes: bf34c93d2645 ("f2fs: check curseg space before foreground GC")
> Signed
On 8/18/25 11:51, 王晓珺 wrote:
> Hi Chao,
>
> The combination of truncate and falloc complicates the recovery process.
>
> For example, in the following scenario:
>
> write fileA 2M | fsync | truncate 256K | falloc -k 256K 1M | fsync A | SPO
> The falloc (256K, 1M) need to be recovered as pre-allo
On 8/18/25 16:06, Hongbo Li wrote:
> Hi Chao,
>
> On 2025/8/18 10:09, Chao Yu wrote:
>> The mount behavior changed after commit d18535132523 ("f2fs: separate the
>> options parsing and options checking"), let's fix it.
>>
>> [Scripts]
>> mkfs.f2fs -f /dev/vdb
>> mount -t f2fs -o usrquota /dev/vdb
syzbot reported a f2fs bug as below:
Oops: gen[ 107.736417][ T5848] Oops: general protection fault, probably for
non-canonical address 0xdc00: [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x-0x0007]
CPU: 1 UID: 0 PID: 5848 Comm: syz-executor263
The mount behavior changed after commit d18535132523 ("f2fs: separate the
options parsing and options checking"), let's fix it.
[Scripts]
mkfs.f2fs -f /dev/vdb
mount -t f2fs -o usrquota /dev/vdb /mnt/f2fs
quotacheck -uc /mnt/f2fs
umount /mnt/f2fs
mount -t f2fs -o usrjquota=aquota.user,jqfmt=vfsold
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git
bugfix/syzbot
On 2025/8/16 11:18, syzbot wrote:
Hello,
syzbot found the following issue on:
HEAD commit:0e39a731820a Merge tag 'for-6.17-rc1-tag' of git://git.ker..
git tree: upstream
console+strace: https://s
w/ below change [1], f2fs will enable lookup_mode=perf by default, it
will change f2fs dirent lookup method from linear based lookup to hash
based lookup.
So that, f2fs will ignore sb.s_encoding_flags by default, which is not
compatible w/ f2fs/012 testcase, in where it will control lookup method
On 2025/8/15 23:31, Zorro Lang wrote:
On Fri, Aug 15, 2025 at 04:14:03PM +0800, Chao Yu wrote:
This is a regression testcase, it is added to check below case
and its variants:
- write 16k data into compressed file (data will be compressed)
- truncate file to 12k (truncate partial data in compres
On 2025/8/15 23:54, Zorro Lang wrote:
On Fri, Aug 08, 2025 at 02:58:03PM +0800, Chao Yu wrote:
w/ below change [1], f2fs will enable lookup_mode=perf by default, it
will change f2fs dirent lookup method from linear based lookup to hash
based lookup.
So that, f2fs will ignore sb.s_encoding_flags
On 2025/8/15 19:27, Sheng Yong wrote:
On 8/15/25 18:38, Chao Yu wrote:
Yong,
Could you please split this patchset to two, 1~13 and 14~32? and update
1~13 first? I guess 1~13 are almost clear to be merged.
Hi, Chao,
Sorry for the delay. I will split the patchset and send a new version ASAP.
On 2025/8/15 23:12, Zorro Lang wrote:
On Fri, Aug 15, 2025 at 04:02:12PM +0800, Chao Yu wrote:
On 8/15/25 05:18, Zorro Lang wrote:
On Thu, Aug 14, 2025 at 05:07:12PM +0800, Chao Yu wrote:
This is a regression test:
1. create directory
2. add a new xattr entry to create xattr node
3. use inject
On 2025/8/16 00:20, Jaegeuk Kim via Linux-f2fs-devel wrote:
This patch introduces a proc entry to show the currently enrolled donation
files.
- "File path" indicates a file.
- "Status"
a. "Donated" means the file is registed in the donation list by
fadvise(offset, length, POSIX_FADV_NOREU
Yong,
Could you please split this patchset to two, 1~13 and 14~32? and update
1~13 first? I guess 1~13 are almost clear to be merged.
On 6/10/25 20:37, Sheng Yong wrote:
> Hi, folks,
>
> This patchset tries to add an auto testsuit for f2fs-tools, including
> fsck.f2fs, inject.f2fs for now.
>
>
This is a regression test:
1. create a file
2. write file to create a direct node at special offset
3. use inject.f2fs to inject nid of direct node w/ ino of the inode
4. check whether f2fs kernel module will detect and report such
corruption in the fil
Cc: Jaegeuk Kim
Reviewed-by: Zorro Lang
This is a regression test:
1. create directory
2. add a new xattr entry to create xattr node
3. use inject.f2fs to inject nid of xattr node w/ ino in a file
4. check whether f2fs kernel module will detect and report such
corruption in the file
Cc: Jaegeuk Kim
Signed-off-by: Chao Yu
---
v3:
-
This is a regression testcase, it is added to check below case
and its variants:
- write 16k data into compressed file (data will be compressed)
- truncate file to 12k (truncate partial data in compressed cluster)
- truncate file to 20k
- verify data in range of [12k, 16k] to see whether data is al
On 8/15/25 05:18, Zorro Lang wrote:
> On Thu, Aug 14, 2025 at 05:07:12PM +0800, Chao Yu wrote:
>> This is a regression test:
>> 1. create directory
>> 2. add a new xattr entry to create xattr node
>> 3. use inject.f2fs to inject nid of xattr node w/ ino in a file
>> 4. check whether f2fs kernel mod
On 8/15/25 04:53, Zorro Lang wrote:
> On Thu, Aug 14, 2025 at 05:07:10PM +0800, Chao Yu wrote:
>> This is a regression testcase, it is added to check below case
>> and its variants:
>> - write 16k data into compressed file (data will be compressed)
>> - truncate file to 12k (truncate partial data i
This is a regression test:
1. create a file
2. write file to create a direct node at special offset
3. use inject.f2fs to inject nid of direct node w/ ino of the inode
4. check whether f2fs kernel module will detect and report such
corruption in the fil
Cc: Jaegeuk Kim
Signed-off-by: Chao Yu
This is a regression test:
1. create directory
2. add a new xattr entry to create xattr node
3. use inject.f2fs to inject nid of xattr node w/ ino in a file
4. check whether f2fs kernel module will detect and report such
corruption in the file
Cc: Jaegeuk Kim
Signed-off-by: Chao Yu
---
v3:
-
This is a regression testcase, it is added to check below case
and its variants:
- write 16k data into compressed file (data will be compressed)
- truncate file to 12k (truncate partial data in compressed cluster)
- truncate file to 20k
- verify data in range of [12k, 16k] to see whether data is al
On 8/13/25 23:34, Zorro Lang wrote:
> On Mon, Aug 11, 2025 at 05:44:15PM +0800, Chao Yu wrote:
>> This is a regression test:
>> 1. create directory
>> 2. add a new xattr entry to create xattr node
>> 3. use inject.f2fs to inject nid of xattr node w/ ino in a file
>> 4. check whether f2fs kernel mod
On 8/13/25 23:21, Zorro Lang wrote:
> On Mon, Aug 11, 2025 at 05:44:14PM +0800, Chao Yu wrote:
>> This is a regression test:
>> 1. create a file
>> 2. write file to create a direct node at special offset
>> 3. use inject.f2fs to inject nid of direct node w/ ino of the inode
>> 4. check whether f2fs
On 8/14/25 00:24, Jaegeuk Kim via Linux-f2fs-devel wrote:
> This patch introduces a proc entry to show the currently enrolled donation
> files.
>
> - "File path" indicates a file.
> - "Status"
> a. "Donated" means the file is registed in the donation list by
> fadvise(offset, length, POSIX_FA
On 8/13/25 07:58, Jaegeuk Kim via Linux-f2fs-devel wrote:
> This patch introduces a proc entry to show the currently enrolled donation
> files.
>
> - "File path" indicates a file.
> - "Status"
> a. "Donated" means the file is registed in the donation list by
> fadvise(offset, length, POSIX_FA
On 8/7/25 21:35, Chunhai Guo wrote:
> This patch allows privileged users to reserve nodes via the
> 'reserve_node' mount option, which is similar to the existing
> 'reserve_root' option.
>
> "-o reserve_node=" means nodes are reserved for privileged
> users only.
>
> Signed-off-by: Chunhai Guo
On 8/12/25 16:56, Zorro Lang wrote:
> On Mon, Aug 11, 2025 at 05:44:13PM +0800, Chao Yu wrote:
>> This is a regression testcase, it is added to check below case
>> and its variants:
>> - write 16k data into compressed file (data will be compressed)
>> - truncate file to 12k (truncate partial data i
On 8/12/25 15:59, Christoph Hellwig wrote:
> On Tue, Aug 12, 2025 at 03:53:54PM +0800, Chao Yu wrote:
>>> What did you use before? At least for older qemu the default was
>>> buffered I/O, which can lead to very expensive fua or flush calls.
>>
>> Previously, I didn't use any cache= option, as man
On 8/12/25 15:32, Christoph Hellwig wrote:
> On Tue, Aug 12, 2025 at 02:28:46PM +0800, Chao Yu wrote:
>> BTW, I suffered extremely long latency of checkpoint which may block every
>> update operations when testing generic/299 w/ mode=lfs mount option in qemu,
>> then I propose to use PREFLUSH inste
On 8/11/25 21:44, Bart Van Assche wrote:
> On 8/11/25 3:52 AM, Christoph Hellwig wrote:
>> On Thu, Aug 07, 2025 at 11:48:38AM +0800, Chao Yu wrote:
>>> This patch introduces a new sysfs entry /sys/fs/f2fs//flush_policy
>>> in order to tune performance of f2fs data flush flow.
>>>
>>> For example, c
On 8/11/25 18:52, Christoph Hellwig wrote:
> On Thu, Aug 07, 2025 at 11:48:38AM +0800, Chao Yu wrote:
>> This patch introduces a new sysfs entry /sys/fs/f2fs//flush_policy
>> in order to tune performance of f2fs data flush flow.
>>
>> For example, checkpoint will use REQ_FUA to persist CP metadata,
Introduce get_left_section_blocks() for cleanup, no logic changes.
Signed-off-by: Chao Yu
---
fs/f2fs/segment.h | 28
1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index fdc2c34daa47..36427fdd6b15 100644
--- a/f
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git
bugfix/common
On 4/2/25 08:00, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:4e82c87058f4 Merge tag 'rust-6.15' of git://git.kernel.org..
> git tree: upstream
> console output:
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git
bugfix/common
On 4/15/25 22:14, syzbot wrote:
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit:834a4a689699 Merge tag 'for-linus' of git://git.kernel.org..
> git tree: upstream
> consol
Jaegeuk,
I guess we need to drop this patch from dev-test, since xfstests may suffer hang
issue w/ it.
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev-test&id=fb7e51d19b3dc00bb8e3887399eb3e8f8aa1d078
Thanks,
On 4/25/25 10:29, Chao Yu wrote:
> On 4/24/25 00:15, Dmi
Support to inject .i_xattr_nid on inode node.
Cc: Sheng Yong
Signed-off-by: Chao Yu
---
fsck/inject.c | 5 +
man/inject.f2fs.8 | 3 +++
2 files changed, 8 insertions(+)
diff --git a/fsck/inject.c b/fsck/inject.c
index bd6ab84..b291d9d 100644
--- a/fsck/inject.c
+++ b/fsck/inject.c
@@ -
This is a regression testcase, it is added to check below case
and its variants:
- write 16k data into compressed file (data will be compressed)
- truncate file to 12k (truncate partial data in compressed cluster)
- truncate file to 20k
- verify data in range of [12k, 16k] to see whether data is al
This is a regression test:
1. create a file
2. write file to create a direct node at special offset
3. use inject.f2fs to inject nid of direct node w/ ino of the inode
4. check whether f2fs kernel module will detect and report such
corruption in the fil
Signed-off-by: Chao Yu
---
tests/f2fs/0
This is a regression test:
1. create directory
2. add a new xattr entry to create xattr node
3. use inject.f2fs to inject nid of xattr node w/ ino in a file
4. check whether f2fs kernel module will detect and report such
corruption in the file
Signed-off-by: Chao Yu
---
tests/f2fs/020 | 5
On 8/8/2025 5:48 PM, Liao Yuanhong wrote:
Currently, we have encountered some issues while testing ZUFS. In
situations near the storage limit (e.g., 50GB remaining), and after
simulating fragmentation by repeatedly writing and deleting data, we found
that application installation and startup test
On 8/8/2025 3:29 PM, Liao Yuanhong wrote:
Currently, we have encountered some issues while testing ZUFS. In
situations near the storage limit (e.g., 50GB remaining), and after
simulating fragmentation by repeatedly writing and deleting data, we found
that application installation and startup test
w/ below change [1], f2fs will enable lookup_mode=perf by default, it
will change f2fs dirent lookup method from linear based lookup to hash
based lookup.
So that, f2fs will ignore sb.s_encoding_flags by default, which is not
compatible w/ f2fs/012 testcase, in where it will control lookup method
On 8/8/2025 9:07 AM, Zhiguo Niu wrote:
Chao Yu via Linux-f2fs-devel
于2025年8月7日周四 09:52写道:
mount -t f2fs -o checkpoint=disable:10% /dev/vdb /mnt/f2fs/
mount -t f2fs -o remount,checkpoint=enable /dev/vdb /mnt/f2fs/
kernel log:
F2FS-fs (vdb): Adjust unusable cap for checkpoint=disable = 204440
Xiaojun,
I just notice generic/483 will fail w/ this change, can you please take a
look?
Thanks,
On 8/7/2025 4:44 PM, Wang Xiaojun wrote:
This patch fixes missing space reclamation during the recovery process.
In the following scenarios, F2FS cannot reclaim truncated space.
case 1:
write file
On 2025/8/7 16:44, Wang Xiaojun wrote:
This patch fixes missing space reclamation during the recovery process.
In the following scenarios, F2FS cannot reclaim truncated space.
case 1:
write file A, size is 1G | CP | truncate A to 1M | fsync A | SPO
case 2:
CP | write file A, size is 1G | fsync A
Chunhai, can we test selinux case as well? It may need to revert selinux fix
to find out the problem scenario first.
Thanks,
On 2025/8/8 06:57, Jaegeuk Kim wrote:
By the way, can we also add some testcases in xfstests to check all this
works as intended?
On 08/07, Chunhai Guo wrote:
This patc
On 2025/8/7 17:12, Liao Yuanhong wrote:
On 8/7/2025 4:38 PM, Chao Yu wrote:
On 8/6/25 15:09, Liao Yuanhong wrote:
Currently, we have encountered some issues while testing ZUFS. In
situations near the storage limit (e.g., 50GB remaining), and after
simulating fragmentation by repeatedly writing
On 8/6/25 15:09, Liao Yuanhong wrote:
> Currently, we have encountered some issues while testing ZUFS. In
> situations near the storage limit (e.g., 50GB remaining), and after
> simulating fragmentation by repeatedly writing and deleting data, we found
> that application installation and startup te
On 8/6/25 17:19, Chunhai Guo wrote:
> This patch allows privileged users to reserve nodes via the
> 'reserve_node' mount option, which is similar to the existing
> 'reserve_root' option.
>
> "-o reserve_node=" means nodes are reserved for privileged
> users only.
>
> Signed-off-by: Chunhai Guo
On 8/6/25 17:53, Cherniaev Andrei wrote:
> Signed-off-by: Cherniaev Andrei
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
On 8/6/25 20:32, mason.zhang wrote:
> This fix combines the space check for data_blocks and dent_blocks when
> verifying HOT_DATA segment capacity, preventing potential insufficient
> space issues during checkpoint.
>
> Fixes: bf34c93d2645 ("f2fs: check curseg space before foreground GC")
> Signed
On 8/7/25 12:20, Wang Xiaojun wrote:
> This patch fixes missing space reclamation during the recovery process.
> In the following scenarios, F2FS cannot reclaim truncated space.
> case 1:
> write file A, size is 1G | CP | truncate A to 1M | fsync A | SPO
>
> case 2:
> CP | write file A, size is 1G
This patch introduces a new sysfs entry /sys/fs/f2fs//flush_policy
in order to tune performance of f2fs data flush flow.
For example, checkpoint will use REQ_FUA to persist CP metadata, however,
some kind device has bad performance on REQ_FUA command, result in that
checkpoint being blocked for lo
Changes as below:
- print more logs for f2fs_{enable,disable}_checkpoint()
- account and dump time stats for f2fs_enable_checkpoint()
Signed-off-by: Chao Yu
---
fs/f2fs/super.c | 16
1 file changed, 16 insertions(+)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 411265c75
During f2fs_enable_checkpoint() in remount(), if we flush a large
amount of dirty pages into slow device, it may take long time which
will block write IO, let's add a timeout machanism during dirty
pages flush to avoid long time block in f2fs_enable_checkpoint().
Signed-off-by: Chao Yu
---
fs/f2
On 8/7/25 11:47, Zhiguo Niu wrote:
> Chao Yu via Linux-f2fs-devel
> 于2025年8月7日周四 11:27写道:
>>
>> This patch introduces a new sysfs entry /sys/fs/f2fs//flush_policy
>> in order to tune performance of f2fs data flush flow.
>>
>> For example, checkpoint wil
This patch introduces a new sysfs entry /sys/fs/f2fs//flush_policy
in order to tune performance of f2fs data flush flow.
For example, checkpoint will use REQ_FUA to persist CP metadata, however,
some kind device has bad performance on REQ_FUA command, result in that
checkpoint being blocked for lo
As reported, on-disk footer.ino and footer.nid is the same and
out-of-range, let's add sanity check on f2fs_alloc_nid() to detect
any potential corruption in free_nid_list.
Signed-off-by: Chao Yu
---
fs/f2fs/node.c | 17 -
include/linux/f2fs_fs.h | 1 +
2 files changed,
On 8/7/25 10:16, Zhiguo Niu wrote:
> Chao Yu via Linux-f2fs-devel
> 于2025年7月31日周四 16:49写道:
>>
>> This patch introduces a new sysfs entry /sys/fs/f2fs//flush_policy
>> in order to tune performance of f2fs data flush flow.
>>
>> For example, checkpoint wil
Let fsck recognize STOP_CP_REASON_CORRUPTED_NID for repair.
Signed-off-by: Chao Yu
---
fsck/mount.c | 1 +
include/f2fs_fs.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/fsck/mount.c b/fsck/mount.c
index a1c4cbb..5399f16 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
@@ -730,6 +730,7
mount -t f2fs -o checkpoint=disable:10% /dev/vdb /mnt/f2fs/
mount -t f2fs -o remount,checkpoint=enable /dev/vdb /mnt/f2fs/
kernel log:
F2FS-fs (vdb): Adjust unusable cap for checkpoint=disable = 204440 / 10%
If we has assigned checkpoint=enable mount option, unusable_cap{,_perc}
parameters of che
On 8/1/25 10:45, Wang Xiaojun wrote:
> In the following scenarios, F2FS cannot reclaim truncated space.
>
> case 1:
> write file A, size is 1G | CP | truncate A to 1M | fsync A | SPO
>
> case 2:
> CP | write file A, size is 1G | fsync A | truncate A to 1M | fsync A |SPO
>
> During the recovery
generic/091 may fail, then it bisects to the bad commit ba8dac350faf
("f2fs: fix to zero post-eof page").
What will cause generic/091 to fail is something like below Testcase #1:
1. write 16k as compressed blocks
2. truncate to 12k
3. truncate to 20k
4. verify data in range of [12k, 16k], however
On 8/5/25 23:37, Jens Axboe wrote:
> On 8/5/25 12:19 AM, Chao Yu wrote:
>> f2fs doesn't support uncached write yet, for write() w/ IOCB_DONTCACHE
>> flag, let's return -EOPNOTSUPP instead of ignoring IOCB_DONTCACHE flag
>> and write w/o uncached IO.
>
> Didn't we agree that write support should be
On 7/31/25 16:46, Chao Yu wrote:
> On 7/31/25 15:57, Chunhai Guo wrote:
>> This patch allows privileged users to reserve nodes via the
>> 'reserve_node' mount option, which is similar to the existing
>> 'reserve_root' option.
>>
>> "-o reserve_node=" means nodes are reserved for privileged
>> user
On 8/5/25 14:52, Daniel Lee wrote:
> This commit introduces a new read-only sysfs entry at
> /sys/fs/f2fs//effective_lookup_mode.
>
> This entry displays the actual directory lookup mode F2FS is
> currently using. This is needed for debugging and verification,
> as the behavior is determined by bo
On 8/5/25 14:52, Daniel Lee wrote:
> For casefolded directories, f2fs may fall back to a linear search if
> a hash-based lookup fails. This can cause severe performance
> regressions.
>
> While this behavior can be controlled by userspace tools (e.g. mkfs,
> fsck) by setting an on-disk flag, a ker
generic/091 may fail, then it bisects to the bad commit ba8dac350faf
("f2fs: fix to zero post-eof page").
What will cause generic/091 to fail is something like below Testcase #1:
1. write 16k as compressed blocks
2. truncate to 12k
3. truncate to 20k
4. verify data in range of [12k, 16k], however
Clean up codes as below:
- avoid unnecessary "err > 0" check condition
- use "1 << log_cluster_size" instead of F2FS_I(inode)->i_cluster_size
No logic changes.
Signed-off-by: Chao Yu
---
v3:
- reorder patch 2 and patch 3
fs/f2fs/compress.c | 42 +++---
1 file
Should cast type of folio->index from pgoff_t to loff_t to avoid overflow
while left shift operation.
Fixes: 3265d3db1f16 ("f2fs: support partial truncation on compressed inode")
Signed-off-by: Chao Yu
---
fs/f2fs/compress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/
On 8/5/25 07:05, Daniel Lee wrote:
> For casefolded directories, f2fs may fall back to a linear search if
> a hash-based lookup fails. This can cause severe performance
> regressions.
>
> While this behavior can be controlled by userspace tools (e.g. mkfs,
> fsck) by setting an on-disk flag, a ker
f2fs doesn't support uncached write yet, for write() w/ IOCB_DONTCACHE
flag, let's return -EOPNOTSUPP instead of ignoring IOCB_DONTCACHE flag
and write w/o uncached IO.
Cc: Jens Axboe
Cc: Qi Han
Signed-off-by: Chao Yu
---
v2:
- fix author info
fs/f2fs/file.c | 5 +
1 file changed, 5 insert
f2fs doesn't support uncached write yet, for write() w/ IOCB_DONTCACHE
flag, let's return -EOPNOTSUPP instead of ignoring IOCB_DONTCACHE flag
and write w/o uncached IO.
Cc: Jens Axboe
Cc: Qi Han
Signed-off-by: Chao Yu
---
v2:
- fix author info
fs/f2fs/file.c | 5 +
1 file changed, 5 insert
On 8/2/25 00:13, Jaegeuk Kim via Linux-f2fs-devel wrote:
> external/f2fs-tools/mkfs/f2fs_format.c:392:31: error: format specifies type
> 'unsigned long long' but the argument has type 'size_t' (aka 'unsigned int')
> [-Werror,-Wformat]
> 391 | MSG(1, "\tError: Unaligned s
1 - 100 of 953 matches
Mail list logo