[f2fs-dev] f2fs: resize should update quota (w/ general experience on Android)

2022-06-18 Thread Juhyung Park
Hi, I'm currently trying out f2fs safe resize / shrink on Android. (Size: 98 GiB used out of 221 GiB, 501,313 nodes, resize to 180 GiB) It seems to work surprisingly well, the only improvement that can be made seems to be updating quota. After resize, fsck complains: [ERROR]

[f2fs-dev] [PATCH] f2fs: initialize page_array_entry slab only if compression feature is on

2022-06-18 Thread Chao Yu
Otherwise, in image which doesn't support compression feature, page_array_entry will be initialized w/o use. Signed-off-by: Chao Yu --- fs/f2fs/compress.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 24824cd96f36..fa237e5c7173 100644 ---

Re: [f2fs-dev] [PATCH 3/3] f2fs: do not skip updating inode when retrying to flush node page

2022-06-18 Thread Chao Yu
On 2022/6/18 6:31, Jaegeuk Kim wrote: Let's try to flush dirty inode again to improve subtle i_blocks mismatch. Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net

Re: [f2fs-dev] [PATCH 2/3] f2fs: run GCs synchronously given user requests

2022-06-18 Thread Chao Yu
On 2022/6/18 6:31, Jaegeuk Kim wrote: When users set GC_URGENT or GC_MID, they expected to do GCs right away. But, there's a condition to bypass it. Let's indicate we need to do now in the thread. .should_migrate_blocks is used to force migrating blocks in full section, so what is the

Re: [f2fs-dev] [PATCH 1/3] f2fs: attach inline_data after setting compression

2022-06-18 Thread Chao Yu
On 2022/6/18 6:31, Jaegeuk Kim wrote: This fixes the below corruption. [345393.335389] F2FS-fs (vdb): sanity_check_inode: inode (ino=6d0, mode=33206) should not have inline_data, run fsck to fix Cc: Fixes: 677a82b44ebf ("f2fs: fix to do sanity check for inline inode") Signed-off-by: Jaegeuk

Re: [f2fs-dev] [PATCH] f2fs: fix iostat related lock protection

2022-06-18 Thread Chao Yu
On 2022/6/16 0:54, Jaegeuk Kim wrote: On 06/15, Chao Yu wrote: On 2022/6/11 2:32, Daeho Jeong wrote: From: Daeho Jeong Made iostat related locks safe to be called from irq context again. Will be better to add a 'Fixes' line? Added some tags. Thanks,

Re: [f2fs-dev] [PATCH 2/2] f2fs_io: add dsync option for write

2022-06-18 Thread Chao Yu
On 2022/6/16 0:56, Jaegeuk Kim wrote: Signed-off-by: Jaegeuk Kim --- tools/f2fs_io/f2fs_io.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c index 2f0fc7b25d41..e7359836b126 100644 --- a/tools/f2fs_io/f2fs_io.c +++

Re: [f2fs-dev] [PATCH 2/2] f2fs-tools: fix to check free space before grow

2022-06-18 Thread Chao Yu
On 2022/6/14 19:49, qixiaoyu1 wrote: Otherwise, after grow, kernel may report below error message when we mount the image if -o parameter is specified during resize: F2FS-fs (loop0): invalid crc_offset: 0 F2FS-fs (loop0): Wrong valid_user_blocks: 16404, user_block_count: 13312 F2FS-fs (loop0):

Re: [f2fs-dev] [PATCH 1/2] resize.f2fs: add option to manually specify new overprovision

2022-06-18 Thread Chao Yu
On 2022/6/14 19:49, qixiaoyu1 wrote: From: liuchao12 Make.f2fs supports manually specifying overprovision, and we expect resize.f2fs to support it as well. This change add a new '-o' option to manually specify overprovision. Signed-off-by: liuchao12 --- fsck/main.c | 8 ++--

Re: [f2fs-dev] [PATCH 3/3] Improve compile-time type checking for f2fs_report_zone()

2022-06-18 Thread Chao Yu
On 2022/6/15 7:17, Bart Van Assche wrote: Change the type of the third argument of f2fs_report_zone() from void * into struct blk_zone * to enable type checking. Signed-off-by: Bart Van Assche Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel

Re: [f2fs-dev] [PATCH 1/3] Fix the struct f2fs_dentry_block size check

2022-06-18 Thread Chao Yu
On 2022/6/15 7:17, Bart Van Assche wrote: Fix the f2fs-tools build on systems for which PAGE_SIZE != 4096. Cc: Peter Collingbourne Reported-by: Peter Collingbourne Signed-off-by: Bart Van Assche Reviewed-by: Chao Yu Thanks, ___

Re: [f2fs-dev] [PATCH 2/3] Fix f2fs_report_zone()

2022-06-18 Thread Chao Yu
On 2022/6/15 7:17, Bart Van Assche wrote: The definition of struct blk_zone_report is as follows: struct blk_zone_report { __u64 sector; __u32 nr_zones; __u32 flags; struct blk_zone zones[0];

[f2fs-dev] [PATCH] f2fs: do not count ENOENT for error case

2022-06-18 Thread Jaegeuk Kim
Otherwise, we can get a wrong cp_error mark. Cc: Fixes: a7b8618aa2f0 ("f2fs: avoid infinite loop to flush node pages") Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index