Re: [f2fs-dev] [PATCH v2 1/2] f2fs: define MIN_DISCARD_GRANULARITY macro

2022-11-24 Thread Chao Yu
On 2022/11/24 0:44, Yangtao Li wrote: Do cleanup in f2fs_tuning_parameters() and __init_discard_policy(), let's use macro instead of number. Suggested-by: Chao Yu Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel

Re: [f2fs-dev] [RESEND][PATCH] f2fs: avoid victim selection from previous victim section

2022-11-24 Thread Chao Yu
On 2022/11/22 17:03, Yonggil Song wrote: When f2fs chooses GC victim in large section & LFS mode, next_victim_seg[gc_type] is referenced first. After segment is freed, next_victim_seg[gc_type] has the next segment number. However, next_victim_seg[gc_type] still has the last segment number even

Re: [f2fs-dev] [PATCH] f2fs: init discard policy after thread wakeup

2022-11-24 Thread Chao Yu
On 2022/11/18 11:46, Yangtao Li wrote: Under the current logic, after the discard thread wakes up, it will not run according to the expected policy, but will use the expected policy before sleep. Move the strategy selection to after the thread wakes up, so that the running state of the thread

Re: [f2fs-dev] [PATCH v5] f2fs: fix to enable compress for newly created file if extension matches

2022-11-24 Thread Chao Yu
On 2022/11/24 5:46, Jaegeuk Kim wrote: If compress_extension is set, and a newly created file matches the extension, the file could be marked as compression file. However, if inline_data is also enabled, there is no chance to check its extension since f2fs_should_compress() always returns false.

[f2fs-dev] [PATCH] f2fs: truncate blocks in batch in __complete_revoke_list()

2022-11-24 Thread Chao Yu
Use f2fs_do_truncate_blocks() to truncate all blocks in-batch in __complete_revoke_list(). Signed-off-by: Chao Yu --- fs/f2fs/segment.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 14ece4bf7c7e..37c721e1eb03 100644 ---

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: introduce discard_urgent_util sysfs node

2022-11-24 Thread Chao Yu
On 2022/11/24 0:44, Yangtao Li wrote: Through this node, you can control the background discard to run more aggressively or not aggressively when reach the utilization rate of the space. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Thanks,

Re: [f2fs-dev] [PATCH v7] f2fs: introduce F2FS_IOC_START_ATOMIC_REPLACE

2022-11-24 Thread Chao Yu
On 2022/11/24 5:58, Jaegeuk Kim wrote: On 11/23, Chao Yu wrote: On 2022/11/12 1:04, Daeho Jeong wrote: From: Daeho Jeong introduce a new ioctl to replace the whole content of a file atomically, which means it induces truncate and content update at the same time. We can start it with

Re: [f2fs-dev] [PATCH] f2fs: set zstd compress level correctly

2022-11-24 Thread Chao Yu
On 2022/11/17 23:10, Sheng Yong wrote: Fixes: cf30f6a5f0c6 ("lib: zstd: Add kernel-specific API") Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net

Re: [f2fs-dev] [PATCH v3] fsverity: stop using PG_error to track error status

2022-11-24 Thread Eric Biggers
On Fri, Nov 25, 2022 at 11:06:43AM +0800, Chao Yu wrote: > On 2022/11/24 6:19, Eric Biggers wrote: > > On Thu, Nov 10, 2022 at 12:21:06AM -0800, Eric Biggers wrote: > > > On Fri, Oct 28, 2022 at 10:58:07AM -0700, Eric Biggers wrote: > > > > From: Eric Biggers > > > > > > > > As a step towards

Re: [f2fs-dev] [PATCH v3] fsverity: stop using PG_error to track error status

2022-11-24 Thread Chao Yu
On 2022/10/29 1:58, Eric Biggers wrote: @@ -116,43 +116,51 @@ struct bio_post_read_ctx { struct f2fs_sb_info *sbi; struct work_struct work; unsigned int enabled_steps; + bool decompression_attempted; How about adding some comments for decompression_attempted?

Re: [f2fs-dev] [PATCH v3] fsverity: stop using PG_error to track error status

2022-11-24 Thread Chao Yu
On 2022/11/24 6:19, Eric Biggers wrote: On Thu, Nov 10, 2022 at 12:21:06AM -0800, Eric Biggers wrote: On Fri, Oct 28, 2022 at 10:58:07AM -0700, Eric Biggers wrote: From: Eric Biggers As a step towards freeing the PG_error flag for other uses, change ext4 and f2fs to stop using PG_error to