[f2fs-dev] [PATCH] fsck.f2fs: relocate chksum verification step during f2fs_do_mount()

2023-02-01 Thread Chao Yu
Keep sanity_check_raw_super flow in fsck.f2fs being consistent w/ sanity_check_raw_super() in f2fs kernel module, otherwise, it outputs different error information when mounting/fscking the same image which contains corrupted superblock. Signed-off-by: Chao Yu --- fsck/mount.c | 8 1 fi

Re: [f2fs-dev] [PATCH v4 1/2] f2fs: use iostat_lat_type directly as a parameter in the iostat_update_and_unbind_ctx()

2023-02-01 Thread Chao Yu
On 2023/2/1 18:47, Yangtao Li wrote: Convert to use iostat_lat_type as parameter instead of raw number. BTW, move NUM_PREALLOC_IOSTAT_CTXS to the header file, adjust iostat_lat[{0,1,2}] to iostat_lat[{READ_IO,WRITE_SYNC_IO,WRITE_ASYNC_IO}] in tracepoint function, and rename iotype to page_type to

Re: [f2fs-dev] [PATCH] f2fs: Fix type of single bit bitfield in f2fs_io_info

2023-02-01 Thread Chao Yu
On 2023/2/2 14:15, Nathan Chancellor wrote: On Thu, Feb 02, 2023 at 02:13:18PM +0800, Chao Yu wrote: On 2023/2/2 0:40, Nathan Chancellor wrote: Clang warns: ../fs/f2fs/data.c:995:17: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Ws

[f2fs-dev] [PATCH v3] f2fs: reduce stack memory cost by using bitfield in struct f2fs_io_info

2023-02-01 Thread Chao Yu
This patch tries to use bitfield in struct f2fs_io_info to improve memory usage. struct f2fs_io_info { ... unsigned int need_lock:8; /* indicate we need to lock cp_rwsem */ unsigned int version:8; /* version of the node */ unsigned int submitted:1; /* in

[f2fs-dev] [PATCH] f2fs: fix some format WARNING in super.c

2023-02-01 Thread Yangtao Li via Linux-f2fs-devel
To fix: WARNING: It's generally not useful to have the filename in the file + * fs/f2fs/super.c WARNING: quoted string split across lines + f2fs_warn(sbi, "using deprecated layout of large_nat_bitmap, " + "please run fsck v1.13.0 or higher to repair, chksum_

Re: [f2fs-dev] [PATCH] f2fs: Fix type of single bit bitfield in f2fs_io_info

2023-02-01 Thread Nathan Chancellor
On Thu, Feb 02, 2023 at 02:13:18PM +0800, Chao Yu wrote: > On 2023/2/2 0:40, Nathan Chancellor wrote: > > Clang warns: > > > >../fs/f2fs/data.c:995:17: error: implicit truncation from 'int' to a > > one-bit wide bit-field changes value from 1 to -1 > > [-Werror,-Wsingle-bit-bitfield-constant

Re: [f2fs-dev] [PATCH] f2fs: Fix type of single bit bitfield in f2fs_io_info

2023-02-01 Thread Chao Yu
On 2023/2/2 0:40, Nathan Chancellor wrote: Clang warns: ../fs/f2fs/data.c:995:17: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] fio->submitted = 1; ^ ~

[f2fs-dev] [PATCH -next] f2fs: Remove unneeded semicolon

2023-02-01 Thread Yang Li
./fs/f2fs/checkpoint.c:1485:55-56: Unneeded semicolon Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3925 Signed-off-by: Yang Li --- fs/f2fs/checkpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.

[f2fs-dev] [PATCH] f2fs: Fix type of single bit bitfield in f2fs_io_info

2023-02-01 Thread Nathan Chancellor
/* writeback control */ struct bio **bio; /* bio for ipu */ --- base-commit: de6b3a5e09b29c014bd04044b023896107cfa2ee change-id: 20230201-f2fs-fix-single-length-bitfields-df8cc78e880a Best regards, -- Nathan Chancellor ___ Linux-f2fs-devel ma

Re: [f2fs-dev] [PATCH 1/2 v2] f2fs: fix wrong calculation of block age

2023-02-01 Thread qixiaoyu
On Wed, Feb 01, 2023 at 08:57:33PM +0800, Chao Yu wrote: > On 2023/2/1 20:23, qixiaoyu wrote: > > > > > > > > How about updating as below to avoid lossing accuracy if new is less > > > > than 100? > > > > > > > > return div_u64(new * (100 - LAST_AGE_WEIGHT), 100) + > > > > div_u6

Re: [f2fs-dev] [PATCH v3 00/10] acl: drop posix acl handlers from xattr handlers

2023-02-01 Thread Christian Brauner
On Wed, Feb 01, 2023 at 02:30:20PM +0100, Christoph Hellwig wrote: > This version looks good to me, but I'd really prefer if a reiserfs > insider could look over the reiserfs patches. I consider this material for v6.4 even with an -rc8 for v6.3. So there's time but we shouldn't block it on reiserf

Re: [f2fs-dev] [PATCH v3 00/10] acl: drop posix acl handlers from xattr handlers

2023-02-01 Thread Christoph Hellwig
This version looks good to me, but I'd really prefer if a reiserfs insider could look over the reiserfs patches. ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

[f2fs-dev] [PATCH v3 05/10] fs: simplify ->listxattr() implementation

2023-02-01 Thread Christian Brauner
The ext{2,4}, erofs, f2fs, and jffs2 filesystems use the same logic to check whether a given xattr can be listed. Simplify them and avoid open-coding the same check by calling the helper we introduced earlier. Reviewed-by: Christoph Hellwig Cc: linux-f2fs-devel@lists.sourceforge.net Cc: linux-er.

[f2fs-dev] [PATCH v3 00/10] acl: drop posix acl handlers from xattr handlers

2023-02-01 Thread Christian Brauner
Hey everyone, After we finished the introduction of the new posix acl api last cycle we still left the generic POSIX ACL xattr handlers around in the filesystems xattr handlers for two reasons: (1) Because a few filesystems rely on the ->list() method of the generic POSIX ACL xattr handlers i

Re: [f2fs-dev] [PATCH 1/2 v2] f2fs: fix wrong calculation of block age

2023-02-01 Thread Chao Yu
On 2023/2/1 20:23, qixiaoyu wrote: How about updating as below to avoid lossing accuracy if new is less than 100? return div_u64(new * (100 - LAST_AGE_WEIGHT), 100) + div_u64(old * LAST_AGE_WEIGHT, 100); Thanks, We want to avoid overflow by doing the division first. To keep

Re: [f2fs-dev] [PATCH 1/2 v2] f2fs: fix wrong calculation of block age

2023-02-01 Thread qixiaoyu
> > > > How about updating as below to avoid lossing accuracy if new is less than > > 100? > > > > return div_u64(new * (100 - LAST_AGE_WEIGHT), 100) + > > div_u64(old * LAST_AGE_WEIGHT, 100); > > > > Thanks, > > > > We want to avoid overflow by doing the division first. To keep t

[f2fs-dev] [PATCH v4 2/2] f2fs: clean up parameters of iostat_update_and_unbind_ctx()

2023-02-01 Thread Yangtao Li via Linux-f2fs-devel
From: Chao Yu Parsing sync/rw type from bio inside iostat_update_and_unbind_ctx() to avoid unnecessary parameters. Signed-off-by: Chao Yu [Yangtao: remove lat_type check] Signed-off-by: Yangtao Li --- change: -remove lat_type check fs/f2fs/data.c | 4 ++-- fs/f2fs/iostat.c | 19 ++-

[f2fs-dev] [PATCH v4 1/2] f2fs: use iostat_lat_type directly as a parameter in the iostat_update_and_unbind_ctx()

2023-02-01 Thread Yangtao Li via Linux-f2fs-devel
Convert to use iostat_lat_type as parameter instead of raw number. BTW, move NUM_PREALLOC_IOSTAT_CTXS to the header file, adjust iostat_lat[{0,1,2}] to iostat_lat[{READ_IO,WRITE_SYNC_IO,WRITE_ASYNC_IO}] in tracepoint function, and rename iotype to page_type to match the definition. Reported-by: ke

Re: [f2fs-dev] [PATCH 1/3] f2fs: clean up __update_extent_tree_range()

2023-02-01 Thread Chao Yu
On 2023/2/1 2:56, Jaegeuk Kim wrote: I wanted to avoid a deep if/else statement. So how about this: From 418b408420367ac5491c97a7c4d26e3d0e68ea57 Mon Sep 17 00:00:00 2001 From: Chao Yu Date: Tue, 31 Jan 2023 22:46:59 +0800 Subject: [PATCH v2] f2fs: clean up __update_extent_tree_range() Intro