[f2fs-dev] [PATCH] MAINTAINERS: Add f2fs bug tracker link

2022-11-25 Thread Chao Yu
As f2fs component in bugzilla.kernel.org was created and used since 2018-7. Signed-off-by: Chao Yu --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index cf0f18502372..01fdbb592ea7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7828,6 +7828,7 @@ M

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

2022-11-24 Thread Chao Yu
? Otherwise it looks good to me. 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

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

[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 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

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

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

2022-11-24 Thread Chao Yu
: support subsectional garbage collection") Signed-off-by: Yonggil Song 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

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

2022-11-24 Thread Chao Yu
aegeuk Kim 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

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 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] [PATCH] f2fs: init discard policy after thread wakeup

2022-11-24 Thread Chao Yu
meets expectations. Signed-off-by: Yangtao Li 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

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

2022-11-23 Thread Chao Yu
On 2022/11/24 5:29, Jaegeuk Kim wrote: + if (S_ISDIR(inode->i_mode)) + goto inherit_comp; Documentation/filesystems/f2fs.rst - Priority in between FS_COMPR_FL, FS_NOCOMP_FS, extensions: * compress_extension=so; nocompress_extension=zip; chattr +c dir; touch

Re: [f2fs-dev] [PATCH] f2fs: define DEFAULT_SMALL_VOLUME_DISCARD_GRANULARITY macro

2022-11-23 Thread Chao Yu
On 2022/11/19 2:02, Yangtao Li wrote: Do cleanup in f2fs_tuning_parameters(), let's use macro instead of number. Signed-off-by: Yangtao Li --- fs/f2fs/f2fs.h | 2 ++ fs/f2fs/super.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index

Re: [f2fs-dev] [PATCH] f2fs: fix description about discard_granularity node

2022-11-23 Thread Chao Yu
On 2022/11/19 1:40, Yangtao Li wrote: Let's fix the inconsistency in the text description. Default discard granularity is 16. For small devices, default value is 1. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel

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

2022-11-23 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] f2fs: introduce discard_urgent_util sysfs node

2022-11-23 Thread Chao Yu
On 2022/11/17 22:35, Yangtao Li wrote: Through this node, you can control the background discard to run more aggressively when reach the utilization rate of the space. Signed-off-by: Yangtao Li --- Documentation/ABI/testing/sysfs-fs-f2fs | 8 fs/f2fs/f2fs.h

Re: [f2fs-dev] [PATCH] f2fs: make __queue_discard_cmd() return void

2022-11-23 Thread Chao Yu
On 2022/11/17 1:10, Yangtao Li wrote: Since __queue_discard_cmd() never returns an error, let's make it return void. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net

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

2022-11-23 Thread Chao Yu
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 F2FS_IOC_START_ATOMIC_REPLACE and complete it with

Re: [f2fs-dev] [PATCH] f2fs: remove useless io_aware_gran variable

2022-11-23 Thread Chao Yu
On 2022/11/16 21:10, Yuwei Guan wrote: This 'io_aware_gran' is initialized as MAX_PLIST_NUM in __init_discard_policy(), and use as 'i < dpolicy->io_aware_gran' in __issue_discard_cmd(), but 'i < dpolicy->io_aware_gran' is true always, so remvoe this variable. I guess we can export it via sysfs

Re: [f2fs-dev] [PATCH] f2fs: fix to set DISCARD opt

2022-11-23 Thread Chao Yu
On 2022/11/16 2:40, Yangtao Li wrote: Some minor modifications to discard opt and related parameters: 1.introduce f2fs_is_readonly() and use it to simplify code 2.The FLUSH_MERGE opt is set by default only in non-ro mode. 3.When ro and DISCARD are set at the same time, an error is

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

2022-11-23 Thread Chao Yu
On 2022/11/17 9:12, 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.

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

2022-11-22 Thread Chao Yu
Hi Yonggil, I guess your email client forces converting tab and space characters of patch, please check that. On 2022/11/22 10:36, 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,

Re: [f2fs-dev] [PATCH v2 3/3] f2fs: change type for 'sbi->readdir_ra'

2022-11-15 Thread Chao Yu
On 2022/11/15 14:35, Yuwei Guan wrote: Before this patch, the varibale 'readdir_ra' takes effect if it's equal to '1' or not, so we can change type for it from 'int' to 'bool'. Signed-off-by: Yuwei Guan Reviewed-by: Chao Yu Thanks, ___ Linux

Re: [f2fs-dev] [PATCH v2 2/3] f2fs: cleanup for 'f2fs_tuning_parameters' function

2022-11-15 Thread Chao Yu
On 2022/11/15 14:35, Yuwei Guan wrote: A cleanup patch for 'f2fs_tuning_parameters' function. Signed-off-by: Yuwei Guan Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https

Re: [f2fs-dev] [PATCH v2 1/3] f2fs: fix to alloc_mode changed after remount on a small volume device

2022-11-15 Thread Chao Yu
ize dievce. This patch fo fix alloc_mode changed when do remount for a small volume device. Signed-off-by: Yuwei Guan Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge

Re: [f2fs-dev] [PATCH] f2fs: Fix error log cluster size warning in sanity_check_inode()

2022-11-15 Thread Chao Yu
On 2022/11/15 16:46, Zhang Qilong wrote: Mounting f2fs with following issue: sanity_check_inode: inode (ino=4827) has unsupported log cluster size: 0, run fsck to fix ->find_fsync_dnodes ->add_fsync_inode ->f2fs_iget_retry ->f2fs_iget ->do_read_inode ->sanity_check_inode

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: fix to enable compress for newly created file if extension matches

2022-11-14 Thread Chao Yu
On 2022/11/15 8:20, Jaegeuk Kim wrote: On 11/14, 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

Re: [f2fs-dev] [PATCH] f2fs: remove submit label in __submit_discard_cmd()

2022-11-14 Thread Chao Yu
_BLOCK(len), GFP_NOFS, ); Thanks. I added {} to meet the coding style. Reviewed-by: Chao Yu Thanks, -submit: if (err) { spin_lock_irqsave(>lock, flags); if (dc->state == D_PA

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: fix to enable compress for newly created file if extension matches

2022-11-14 Thread Chao Yu
On 2022/11/15 6:39, 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.

Re: [f2fs-dev] [PATCH 1/3] f2fs: fix to alloc_mode changed after remount on a small volume device

2022-11-14 Thread Chao Yu
On 2022/11/15 0:13, Yuwei Guan wrote: On 2022/11/14 22:42, Chao Yu wrote: On 2022/11/12 16:32, Yuwei Guan wrote: The commit 84b89e5d943d8 ("f2fs: add auto tuning for small devices") add tuning for small volume device, now support to tune alloce_mode to 'reuse' if it's

[f2fs-dev] [PATCH] f2fs: fix to do sanity check on i_extra_isize in is_alive()

2022-11-14 Thread Chao Yu
invalid address later, fix it. - gc_data_segment - is_alive - data_blkaddr - offset_in_addr Reported-by: syzbot+f8f3dfa4abc489e76...@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-f2fs-devel/3cb3c405ed5c1...@google.com/T/#u Signed-off-by: Chao Yu --- fs/f2fs/gc.c

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: fix to enable compress for newly created file if extension matches

2022-11-14 Thread Chao Yu
On 2022/11/12 9:27, Jaegeuk Kim wrote: Does thes make sense? Jaegeuk, Could you please send modified patches to mailing list, otherwise, I can not add comments on specified line. Thanks,

Re: [f2fs-dev] [BUG REPORT] f2fs: use-after-free during garbage collection

2022-11-14 Thread Chao Yu
On 2022/11/14 9:47, Jun Nie wrote: Hi Chao & Jaegeuk, There is a KASAN report[0] that shows invalid memory access(use-after-free) in f2fs garbage collection process, and this issue is fixed by a recent f2fs patch set[1]. The KASAN report is caused by an abnormal sum->ofs_in_node value 0xc3f1

[f2fs-dev] [PATCH] f2fs: fix to do sanity check on i_extra_isize in is_alive()

2022-11-14 Thread Chao Yu
invalid address later, fix it. - gc_data_segment - is_alive - data_blkaddr - offset_in_addr Reported-by: syzbot+f8f3dfa4abc489e76...@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-f2fs-devel/3cb3c405ed5c1...@google.com/T/#u Signed-off-by: Chao Yu --- fs/f2fs/gc.c

Re: [f2fs-dev] [PATCH 3/3] f2fs: change type for 'sbi->readdir_ra'

2022-11-14 Thread Chao Yu
On 2022/11/12 16:32, Yuwei Guan wrote: Before this patch, the varibale 'readdir_ra' takes effect if it's equal to '1' or not, so we can change type for it from 'int' to 'bool'. Signed-off-by: Yuwei Guan --- fs/f2fs/dir.c | 7 +++ fs/f2fs/f2fs.h | 2 +- fs/f2fs/super.c | 2 +-

Re: [f2fs-dev] [PATCH v2] fsck.f2fs: avoid uncessary recalculation

2022-11-14 Thread Chao Yu
On 2022/11/14 22:17, Sheng Yong wrote: There is no need to recalculate ADDRS_PER_INODE and ADDRS_PER_BLOCK, especially in a for loop. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel

Re: [f2fs-dev] [PATCH 1/3] f2fs: fix to alloc_mode changed after remount on a small volume device

2022-11-14 Thread Chao Yu
On 2022/11/12 16:32, Yuwei Guan wrote: The commit 84b89e5d943d8 ("f2fs: add auto tuning for small devices") add tuning for small volume device, now support to tune alloce_mode to 'reuse' if it's small size. But the alloc_mode will change to 'default' when do remount on this small size dievce.

Re: [f2fs-dev] [PATCH 4/4] fsck.f2fs: avoid uncessary recalculation

2022-11-13 Thread Chao Yu
On 2022/11/10 22:07, Sheng Yong wrote: There is no need to recalculate ADDRS_PER_INODE and ADDRS_PER_BLOCK, especially in a for loop. Signed-off-by: Sheng Yong --- fsck/fsck.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/fsck/fsck.c b/fsck/fsck.c

Re: [f2fs-dev] [PATCH 3/4] fsck.f2fs: fix potential overflow of copying i_name

2022-11-13 Thread Chao Yu
On 2022/11/10 22:07, Sheng Yong wrote: If i_namelen is corrupted, there may be an overflow when doing memcpy. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https

Re: [f2fs-dev] [PATCH 2/4] fsck.f2fs: add parentheses for SB_MASK

2022-11-13 Thread Chao Yu
On 2022/11/10 22:07, Sheng Yong wrote: Signed-off-by: Sheng Yong 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

Re: [f2fs-dev] [PATCH 1/4] dump.f2fs: remove unavailable optiont -g

2022-11-13 Thread Chao Yu
On 2022/11/10 22:07, Sheng Yong wrote: Option "-g" for dump.f2fs is unavailable and not used in dump.f2fs. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge

Re: [f2fs-dev] [PATCH v3 14/23] f2fs: Convert f2fs_write_cache_pages() to use filemap_get_folios_tag()

2022-11-13 Thread Chao Yu
On 2022/10/18 4:24, Vishal Moola (Oracle) wrote: Converted the function to use a folio_batch instead of pagevec. This is in preparation for the removal of find_get_pages_range_tag(). Also modified f2fs_all_cluster_page_ready to take in a folio_batch instead of pagevec. This does NOT support

Re: [f2fs-dev] [PATCH v6] f2fs: support errors=remount-ro|continue|panic mountoption

2022-11-13 Thread Chao Yu
On 2022/11/8 9:17, Chao Yu wrote: Jaegeuk, On 2022/11/8 5:49, Jaegeuk Kim wrote: Chao, Could you please run xfstests since I met some issues with this? I had to drop this to test other patches. Oops, I ran xfstests on v5, I didn't see any issus... and in v6 I just rebase codes on ("

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: fix to enable compress for newly created file if extension matches

2022-11-11 Thread Chao Yu
. This patch moves set_compress_inode(), which do extension check, in f2fs_should_compress() to check extensions before setting inline data flag. Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode conversion") Signed-off-by: Sheng Yong Reviewed-by: Chao Y

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: move set_file_temperature into f2fs_new_inode

2022-11-11 Thread Chao Yu
On 2022/11/11 18:08, Sheng Yong wrote: Since the file name has already passed to f2fs_new_inode(), let's move set_file_temperature() into f2fs_new_inode(). Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list

Re: [f2fs-dev] [PATCH v6 2/2] f2fs: introduce F2FS_IOC_START_ATOMIC_REPLACE

2022-11-10 Thread Chao Yu
On 2022/11/1 3:24, 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 F2FS_IOC_START_ATOMIC_REPLACE and complete it with

Re: [f2fs-dev] [PATCH v6 1/2] f2fs: correct i_size change for atomic writes

2022-11-10 Thread Chao Yu
On 2022/11/1 3:24, Daeho Jeong wrote: From: Daeho Jeong We need to make sure i_size doesn't change until atomic write commit is successful and restore it when commit is failed. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Thanks, ___ Linux

Re: [f2fs-dev] [PATCH v2] f2fs: allow to read node block after shutdown

2022-11-10 Thread Chao Yu
fully") Signed-off-by: Jaegeuk Kim 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

Re: [f2fs-dev] [PATCH] f2fs: initialize locks earlier in f2fs_fill_super()

2022-11-10 Thread Chao Yu
per() to immediately after memory allocation. Link: https://syzkaller.appspot.com/bug?extid=40642be9b7e0bb28e0df [1] Reported-by: syzbot Signed-off-by: Tetsuo Handa Tested-by: syzbot Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-de

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

2022-11-09 Thread Chao Yu
On 2022/11/9 19:01, Sheng Yong 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.

Re: [f2fs-dev] [PATCH] f2fs: separate IPU policy for fdatasync from F2FS_IPU_FSYNC

2022-11-09 Thread Chao Yu
On 2022/11/9 20:56, qixiaoyu wrote: On Tue, Nov 08, 2022 at 10:30:13PM +0800, Chao Yu wrote: On 2022/11/8 20:32, qixiaoyu wrote: On Sun, Nov 06, 2022 at 09:54:59PM +0800, Chao Yu wrote: On 2022/11/2 20:25, qixiaoyu wrote: Hi Chao, fdatasync do in-place-update to avoid additional node writes

[f2fs-dev] [PATCH v2] f2fs: optimize iteration over sparse directories

2022-11-08 Thread Chao Yu
. Link: https://lore.kernel.org/lkml/536944df-a0ae-1dd8-148f-510b476e1...@kernel.org/T/ Reported-by: Wei Chen Cc: Eric Biggers Signed-off-by: Chao Yu --- v2: - update commit title suggested by Eric. fs/f2fs/data.c | 17 - fs/f2fs/dir.c | 34 -- f

Re: [f2fs-dev] [PATCH] f2fs: separate IPU policy for fdatasync from F2FS_IPU_FSYNC

2022-11-08 Thread Chao Yu
On 2022/11/8 20:32, qixiaoyu wrote: On Sun, Nov 06, 2022 at 09:54:59PM +0800, Chao Yu wrote: On 2022/11/2 20:25, qixiaoyu wrote: Hi Chao, fdatasync do in-place-update to avoid additional node writes, but currently it only do that with F2FS_IPU_FSYNC as: f2fs_do_sync_file

Re: [f2fs-dev] [PATCH v6] f2fs: support errors=remount-ro|continue|panic mountoption

2022-11-07 Thread Chao Yu
lized spinlock"), there is no critial changes. Did you keep any kernel/xfstest logs? Thanks, Thanks, On 11/06, Chao Yu wrote: This patch supports errors=remount-ro|continue|panic mount option. Signed-off-by: Chao Yu Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim --- v6: - rebas

Re: [f2fs-dev] [PATCH] f2fs: speed up f2fs_empty_dir()

2022-11-07 Thread Chao Yu
On 2022/11/8 2:29, Eric Biggers wrote: On Sun, Nov 06, 2022 at 05:48:55PM +0800, Chao Yu wrote: Wei Chen reports a kernel bug as blew: INFO: task syz-executor.0:29056 blocked for more than 143 seconds. Not tainted 5.15.0-rc5 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs&q

Re: [f2fs-dev] [PATCH] f2fs: fix atgc bug on issue in 32bits platform

2022-11-07 Thread Chao Yu
On 2022/11/7 13:04, Zhiguo Niu wrote: Dear Chao Chao Yu mailto:c...@kernel.org>> 于2022年11月7日周一 09:25写道: On 2022/11/4 15:40, zhiguo.niu wrote: > From: Zhiguo Niu mailto:zhiguo@unisoc.com>> > > There is bug on issue after atgc feature is enabled in

Re: [f2fs-dev] [PATCH] f2fs: fix atgc bug on issue in 32bits platform

2022-11-06 Thread Chao Yu
On 2022/11/4 15:40, zhiguo.niu wrote: From: Zhiguo Niu There is bug on issue after atgc feature is enabled in 32bits platform as the following log: F2FS-fs (dm-x): inconsistent rbtree, cur(3470333575168) next(3320009719808) [ cut here ] kernel BUG at fs/f2fs/gc.c:602!

Re: [f2fs-dev] [PATCH] f2fs: separate IPU policy for fdatasync from F2FS_IPU_FSYNC

2022-11-06 Thread Chao Yu
FSYNC F2FS_IPU_SSR_UTIL F2FS_IPU_SSR_UTIL(with patch) SQLite Insert(QPS) 6818.08 6327.09(-7.20%) 6757.72 SQLite Update(QPS) 6528.81 6336.57(-2.94%) 6490.77 SQLite Delete(QPS) 9724.68 9378.37(-3.56%) 9622.27 Thanks On Tue, Nov 01, 2022 at 11:14:55PM +0800, Chao Yu wrote: On 202

[f2fs-dev] [PATCH v6] f2fs: support errors=remount-ro|continue|panic mountoption

2022-11-06 Thread Chao Yu
This patch supports errors=remount-ro|continue|panic mount option. Signed-off-by: Chao Yu Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim --- v6: - rebase the code Documentation/filesystems/f2fs.rst | 4 + fs/f2fs/checkpoint.c | 7 +- fs/f2fs/f2fs.h

[f2fs-dev] [PATCH] f2fs: fix to avoid accessing uninitialized spinlock

2022-11-06 Thread Chao Yu
5a7 ("f2fs: support recording errors into superblock") Signed-off-by: Chao Yu --- fs/f2fs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 5fc800444f86..afa6f9155bed 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super

[f2fs-dev] [PATCH] f2fs: speed up f2fs_empty_dir()

2022-11-06 Thread Chao Yu
. Link: https://lore.kernel.org/lkml/536944df-a0ae-1dd8-148f-510b476e1...@kernel.org/T/ Reported-by: Wei Chen Cc: Eric Biggers Signed-off-by: Chao Yu --- fs/f2fs/data.c | 17 - fs/f2fs/dir.c | 34 -- fs/f2fs/f2fs.h | 5 +++-- fs/f2fs/gc.c

[f2fs-dev] [PATCH v5] f2fs: support errors=remount-ro|continue|panic mountoption

2022-11-06 Thread Chao Yu
This patch supports errors=remount-ro|continue|panic mount option. Signed-off-by: Chao Yu Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim --- v5: - skip in gc/discard thread instead of stopping them, leave flush/ckpt thread as running status. Documentation/filesystems/f2fs.rst | 4

Re: [f2fs-dev] f2fs_empty_dir() can be extremely slow on malicious disk images

2022-11-02 Thread Chao Yu
On 2022/11/2 23:12, Chao Yu wrote: On 2022/11/2 14:17, Eric Biggers wrote: [+f2fs list and maintainers] Thanks for the forwarding. [changed subject from "INFO: task hung in fscrypt_ioctl_set_policy"] On Mon, Oct 31, 2022 at 10:18:02PM +0800, Wei Chen wrote: Dear Linux develop

Re: [f2fs-dev] f2fs_empty_dir() can be extremely slow on malicious disk images

2022-11-02 Thread Chao Yu
f2fs_empty_dir() should be fixed? Is there an easy way to just iterate through the blocks that are actually allocated? I send this just for requesting comments, no test now. Thoughts? From 38ea5f172c47853536a9f70857e4438a69d16f39 Mon Sep 17 00:00:00 2001 From: Chao Yu Date: Wed, 2 Nov 2022

Re: [f2fs-dev] [PATCH] f2fs: use sysfs_emit instead of sprintf

2022-11-01 Thread Chao Yu
On 2022/10/29 0:58, Jaegeuk Kim wrote: Let's use sysfs_emit. Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux

Re: [f2fs-dev] [PATCH] f2fs: replace ternary operator with max()

2022-11-01 Thread Chao Yu
On 2022/10/29 22:49, wangkail...@jari.cn wrote: Fix the following coccicheck warning: ./fs/f2fs/segment.c:877:24-25: WARNING opportunity for max() Signed-off-by: KaiLong Wang Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux

Re: [f2fs-dev] [PATCH v2] f2fs: stop discard thread if has fsck tag

2022-11-01 Thread Chao Yu
On 2022/10/28 22:37, Yangtao Li wrote: Under the current logic, after the fsck flag is set, the discard thread will still run periodically. So stop the discard thread from running to avoid energy consumption after the fsck flag is set. Fixes: d618477473eb ("f2fs: stop issue discard if

Re: [f2fs-dev] [PATCH] f2fs: separate IPU policy for fdatasync from F2FS_IPU_FSYNC

2022-11-01 Thread Chao Yu
On 2022/10/21 10:31, qixiaoyu1 wrote: Currently IPU policy for fdatasync is coupled with F2FS_IPU_FSYNC. Fix to apply it to all IPU policy. Xiaoyu, Sorry for the delay. I didn't get the point, can you please explain more about the issue? Thanks, Signed-off-by: qixiaoyu1 ---

Re: [f2fs-dev] [PATCH v2] f2fs: fix hungtask when decompressed fail

2022-11-01 Thread Chao Yu
Hi Fengnan, Sorry for the delay. I guess we can merge this patch, but let me check whether there is another solution, since mm guys want to remove PG_error usage to save one bit slot in page.flags. On 2022/11/1 17:41, fengnan chang wrote: friendly ping... fengnan chang 于2022年10月14日周五

[f2fs-dev] [PATCH v4] f2fs: support errors=remount-ro|continue|panic mountoption

2022-10-29 Thread Chao Yu
This patch supports errors=remount-ro|continue|panic mount option. Signed-off-by: Chao Yu Signed-off-by: Yangtao Li --- v4: Yangtao: - rename flush_error_work() to f2fs_record_error_work() for better debug in backtrace - stop flush thread in f2fs_handle_critical_error() Jaegeuk: - do not stop

Re: [f2fs-dev] [PATCH v3 13/23] f2fs: Convert f2fs_sync_node_pages() to use filemap_get_folios_tag()

2022-10-28 Thread Chao Yu
On 2022/10/18 4:24, Vishal Moola (Oracle) wrote: Convert function to use a folio_batch instead of pagevec. This is in preparation for the removal of find_get_pages_range_tag(). Signed-off-by: Vishal Moola (Oracle) Acked-by: Chao Yu Thanks, --- fs/f2fs/node.c | 17 + 1

Re: [f2fs-dev] [PATCH v3 12/23] f2fs: Convert f2fs_flush_inline_data() to use filemap_get_folios_tag()

2022-10-28 Thread Chao Yu
On 2022/10/18 4:24, Vishal Moola (Oracle) wrote: Convert function to use a folio_batch instead of pagevec. This is in preparation for the removal of find_get_pages_tag(). Signed-off-by: Vishal Moola (Oracle) Acked-by: Chao Yu Thanks, --- fs/f2fs/node.c | 17 + 1 file

Re: [f2fs-dev] [PATCH v3 11/23] f2fs: Convert f2fs_fsync_node_pages() to use filemap_get_folios_tag()

2022-10-28 Thread Chao Yu
On 2022/10/18 4:24, Vishal Moola (Oracle) wrote: Convert function to use a folio_batch instead of pagevec. This is in preparation for the removal of find_get_pages_range_tag(). Signed-off-by: Vishal Moola (Oracle) Acked-by: Chao Yu Thanks, --- fs/f2fs/node.c | 19

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

2022-10-28 Thread Chao Yu
Minor comments below. On 2022/10/25 11:32, Yangtao Li wrote: gc_mode sysfs node can show the current gc_mode as a string. Introducing it increases readability. Introducing it to increase readability. Signed-off-by: Yangtao Li --- Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++

Re: [f2fs-dev] [PATCH] f2fs: fix to set flush_merge opt and show noflush_merge

2022-10-28 Thread Chao Yu
On 2022/10/26 21:05, Yangtao Li via Linux-f2fs-devel wrote: Some minor modifications to flush_merge and related parameters: 1.The FLUSH_MERGE opt is set by default only in non-ro mode. 2.When ro and merge are set at the same time, an error is reported. 3.Display noflush_merge mount

Re: [f2fs-dev] [PATCH v2] f2fs: add proc entry to show discard_plist info

2022-10-28 Thread Chao Yu
On 2022/10/25 21:26, Yangtao Li via Linux-f2fs-devel wrote: This patch adds a new proc entry to show discard_plist information in more detail, which is very helpful to know the discard pend list count clearly. Such as: Discard pend list(Show diacrd_cmd count on each entry, .:not exist):

Re: [f2fs-dev] [PATCH] f2fs: Fix typo in comments

2022-10-28 Thread Chao Yu
On 2022/10/27 19:01, Keoseong Park wrote: Change "truncateion" to "truncation". Signed-off-by: Keoseong Park Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://l

Re: [f2fs-dev] [PATCH 2/2] f2fs: fix the msg data type

2022-10-28 Thread Chao Yu
On 2022/10/27 17:12, Mukesh Ojha wrote: Data type of msg in f2fs_write_checkpoint trace should be const char * instead of char *. Signed-off-by: Mukesh Ojha Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: fix the assign logic of iocb

2022-10-28 Thread Chao Yu
-off-by: Mukesh Ojha 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

Re: [f2fs-dev] [PATCH v5 1/2] f2fs: correct i_size change for atomic writes

2022-10-28 Thread Chao Yu
On 2022/10/19 1:00, Daeho Jeong wrote: From: Daeho Jeong We need to make sure i_size doesn't change until atomic write commit is successful and restore it when commit is failed. Signed-off-by: Daeho Jeong --- v5: prevent only i_size update for atomic files when dirtying inode v4: move i_size

[f2fs-dev] [PATCH] f2fs: fix to destroy sbi->post_read_wq in error path of f2fs_fill_super()

2022-10-28 Thread Chao Yu
In error path of f2fs_fill_super(), this patch fixes to call f2fs_destroy_post_read_wq() once if we fail in f2fs_start_ckpt_thread(). Fixes: 261eeb9c1585 ("f2fs: introduce checkpoint_merge mount option") Signed-off-by: Chao Yu --- fs/f2fs/super.c | 2 +- 1 file changed, 1 inser

Re: [f2fs-dev] [syzbot] BUG: unable to handle kernel NULL pointer dereference in f2fs_stop_discard_thread

2022-10-27 Thread Chao Yu
Hello, Thanks for the report, the bug has been fixed w/ below patch: https://lore.kernel.org/linux-f2fs-devel/20221021023422.3101585-1-c...@kernel.org/T/#u On 2022/10/28 11:34, syzbot wrote: syzbot has bisected this issue to: commit 4d67490498acb4ffcef5ba7bc44990d46e66a44c Author: Fengnan

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: introducr gc_urgent_idle_remaining sysfs node and mark gc_urgent_high_remaining node deprecated

2022-10-27 Thread Chao Yu
On 2022/10/28 11:22, Jaegeuk Kim wrote: On 10/28, Chao Yu wrote: On 2022/10/25 14:50, Yangtao Li wrote: Added a new sysfs node called gc_urgent_idle_remaining. The user can set the trial count limit for GC urgent and idle mode with this value. If GC thread gets to the limit, the mode will turn

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix to f2fs_handle_critical_error when errors=remount-ro

2022-10-27 Thread Chao Yu
On 2022/10/28 11:17, Jaegeuk Kim wrote: On 10/28, Chao Yu wrote: On 2022/10/28 10:33, Yangtao Li wrote: It won't pollute global namespace since it's a static function just be used in f2fs/super.c... emm, I think it would be nice to see the f2fs_record_error_work symbol in the stack, it can

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix to f2fs_handle_critical_error when errors=remount-ro

2022-10-27 Thread Chao Yu
On 2022/10/28 10:33, Yangtao Li wrote: It won't pollute global namespace since it's a static function just be used in f2fs/super.c... emm, I think it would be nice to see the f2fs_record_error_work symbol in the stack, it can be explicitly a function of f2fs. personal opinion for reference

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: introducr gc_urgent_idle_remaining sysfs node and mark gc_urgent_high_remaining node deprecated

2022-10-27 Thread Chao Yu
On 2022/10/25 14:50, Yangtao Li wrote: Added a new sysfs node called gc_urgent_idle_remaining. The user can set the trial count limit for GC urgent and idle mode with this value. If GC thread gets to the limit, the mode will turn back to GC normal mode finally. This method is not only

Re: [f2fs-dev] [PATCH] f2fs: fix possible memory leak in f2fs_init_sysfs()

2022-10-27 Thread Chao Yu
Jaegeuk, There is a generic fix [1], let's drop this one... https://lore.kernel.org/lkml/20221025071549.1280528-1-yangyingli...@huawei.com/T/ On 2022/10/20 16:45, Chao Yu wrote: On 2022/10/18 15:32, Yang Yingliang wrote: Inject fault while probing module, kset_register() may fail

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix to f2fs_handle_critical_error when errors=remount-ro

2022-10-27 Thread Chao Yu
On 2022/10/27 20:08, Yangtao Li wrote: When a fatal error occurs in the file system and it is remounted to ro mode, the flush thread needs to be stopped. Fixes: d81ab30e85a5 ("f2fs: support errors=remount-ro|continue|panic mountoption") Do you mind letting me merge these two patches into

Re: [f2fs-dev] [PATCH 1/3] f2fs: rename flush_error_work() to f2fs_record_error_work()

2022-10-27 Thread Chao Yu
On 2022/10/27 20:08, Yangtao Li wrote: Since it is an f2fs module, it is best to prefix function names with f2fs_. At the same time, there is already a flush thread and related functions in the system, rename flush_error_work() to f2fs_record_error_work(). It won't pollute global namespace

Re: [f2fs-dev] [PATCH 2/2] f2fs: fix return val in f2fs_start_ckpt_thread()

2022-10-27 Thread Chao Yu
On 2022/10/27 18:24, Yangtao Li wrote: Return PTR_ERR(cprc->f2fs_issue_ckpt) instead of -ENOMEM; Fixes line? Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.

Re: [f2fs-dev] [PATCH 1/2] f2fs: cleanup in f2fs_create_flush_cmd_control() and f2fs_start_gc_thread()

2022-10-27 Thread Chao Yu
On 2022/10/27 18:24, Yangtao Li wrote: Just cleanup for readable, no functional changes. How about doing such cleanup in one patch? Thanks, Signed-off-by: Yangtao Li --- fs/f2fs/gc.c | 14 ++ fs/f2fs/segment.c | 3 +-- 2 files changed, 7 insertions(+), 10

Re: [f2fs-dev] [PATCH v2] f2fs: allow to set compression for inlined file

2022-10-26 Thread Chao Yu
On 2022/10/27 1:06, Jaegeuk Kim wrote: The below commit disallows to set compression on empty created file which has a inline_data. Let's fix it. Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode conversion") Signed-off-by: Jaegeuk Kim Reviewed-b

Re: [f2fs-dev] [PATCH] f2fs: allow to set compression for inlined file

2022-10-25 Thread Chao Yu
On 2022/10/26 1:46, Jaegeuk Kim wrote: On 10/25, Chao Yu wrote: On 2022/10/25 7:36, Jaegeuk Kim wrote: The below commit disallows to set compression on empty created file which has a inline_data. Let's fix it. Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed

Re: [f2fs-dev] [PATCH v3] f2fs: cleanup in f2fs_create_flush_cmd_control()

2022-10-25 Thread Chao Yu
On 2022/10/25 16:05, Yangtao Li wrote: Just cleanup for readable, no functional changes. Suggested-by: Chao Yu Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net

Re: [f2fs-dev] [PATCH v2] f2fs: fix normal discard process

2022-10-25 Thread Chao Yu
gned-off-by: Dongdong Zhang 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

Re: [f2fs-dev] [PATCH v2] f2fs: cleanup in f2fs_create_flush_cmd_control()

2022-10-25 Thread Chao Yu
On 2022/10/25 15:56, Yangtao Li wrote: Remove the local 'err' variable for readable, no functional changes. Signed-off-by: Yangtao Li --- fs/f2fs/segment.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index

Re: [f2fs-dev] 答复: 答复: 答复: 答复: [PATCH] f2fs: Fix data consistency in f2fs_move_file_range()

2022-10-25 Thread Chao Yu
On 2022/10/25 15:36, zhangqilong wrote: On 2022/10/25 15:01, zhangqilong wrote: On 2022/10/25 14:27, zhangqilong wrote: On 2022/10/20 15:27, zhangqilong via Linux-f2fs-devel wrote: On 2022/10/18 10:45, Zhang Qilong wrote: In the following case: process 1 process 2

Re: [f2fs-dev] [PATCH v2] f2fs: introduce max_ordered_discard sysfs node

2022-10-25 Thread Chao Yu
discard granularity */ + unsigned int max_ordered_discard; /* maximum discard granularity issued by lba order */ unsigned int max_ordered_discard; /* maximum discard granularity issued by lba order */ Otherwise, it looks good to me. Reviewed-by: Chao Yu Thanks,

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: fix gc mode when gc_urgent_high_remaining is 1

2022-10-25 Thread Chao Yu
emove gc_urgent_high_limited for cleanup") Unneeded empty line here, it's trivial though... Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourc

Re: [f2fs-dev] [PATCH] f2fs: remove redundant return in f2fs_create_flush_cmd_control()

2022-10-25 Thread Chao Yu
On 2022/10/25 15:08, Yangtao Li wrote: Hi Chao, In my point of view, it should not return 0. Because calling kthread_run() to create a kernel thread may fails, and err is assigned a value. I commented on last 'return err' rather than the one in error path... Maybe: --- fs/f2fs/segment.c |

  1   2   3   4   5   6   7   8   9   10   >