[f2fs-dev] [PATCH v2] mkfs.f2fs: Introduce configurable reserved sections

2023-04-03 Thread Yonggil Song
Overview This option allows zoned block device users to configure GC reserved and overprovision area manually according to their demands on performance of sustained write latency and WAF. Problem === The overprovision segments that mkfs generates are mostly occupied by GC reserved.

[f2fs-dev] [PATCH] fsck.f2fs: fix sanity check logic for cp_payload

2023-04-03 Thread Juhyung Park
cp_payload is set differently [1] when extended node bitmap feature is enabled. Commit b79c3ba4ea9d broke fsck on f2fs file systems created on 2+ TB device with extended node bitmap feature enabled. As the sanity check is for checking overflows, fix this to assume the max possible cp_payload size

[f2fs-dev] [PATCH v2] f2fs: remove struct victim_selection default_v_ops

2023-04-03 Thread Yangtao Li via Linux-f2fs-devel
There is only single instance of these ops, and Jaegeuk point out that: Originally this was intended to give a chance to provide other allocation option. Anyway, it seems quit hard to do it anymore. So remove the indirection and call f2fs_get_victim() directly. Signed-off-by: Yangtao Li

[f2fs-dev] [PATCH v2] f2fs: add sanity compress level check for compressed file

2023-04-03 Thread Yangtao Li via Linux-f2fs-devel
Commit 3fde13f817e2 ("f2fs: compress: support compress level") forgot to do basic compress level check, let's add it. Signed-off-by: Yangtao Li --- v2: -convert to zstd_max_clevel() fs/f2fs/inode.c | 96 ++--- 1 file changed, 67 insertions(+), 29 delet

[f2fs-dev] [PATCH] f2fs: use common implementation of file type

2023-04-03 Thread Weizhao Ouyang
Use common implementation of file type conversion helpers. Signed-off-by: Weizhao Ouyang --- fs/f2fs/dir.c | 39 +++ fs/f2fs/f2fs.h | 1 - fs/f2fs/inline.c| 2 +- include/linux/f2fs_fs.h | 15 --- 4 files changed, 4 ins

Re: [f2fs-dev] [PATCH v3] f2fs: add iostat latency statistics support for discard

2023-04-03 Thread Chao Yu
On 2023/4/4 1:49, Jaegeuk Kim wrote: Could you split the patch which cleans up and adds it on top of it? On 03/30, Yangtao Li wrote: In this patch, it adds to account discard latency. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303211005.rgxljvli-...@intel.co

[f2fs-dev] Patchwork summary for: f2fs

2023-04-03 Thread patchwork-bot+f2fs
Hello: The following patches were marked "accepted", because they were applied to jaegeuk/f2fs.git (dev): Patch: [f2fs-dev] f2fs: fix null pointer panic in tracepoint in __replace_atomic_write_block Submitter: Jaegeuk Kim Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/pro

Re: [f2fs-dev] [PATCH] f2fs: fix null pointer panic in tracepoint in __replace_atomic_write_block

2023-04-03 Thread patchwork-bot+f2fs
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Mon, 3 Apr 2023 09:50:38 -0700 you wrote: > We got a kernel panic if old_addr is NULL. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/segment.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Here is the summ

Re: [f2fs-dev] [PATCH] f2fs: support to show noage_extent_cache mount option

2023-04-03 Thread Chao Yu
On 2023/4/4 1:40, Jaegeuk Kim wrote: On 03/31, Yangtao Li wrote: This patch support noage_extent_cache mount option. Signed-off-by: Yangtao Li --- Documentation/filesystems/f2fs.rst | 2 ++ fs/f2fs/super.c| 7 +++ 2 files changed, 9 insertions(+) diff --git a/Docum

Re: [f2fs-dev] [PATCH v2] f2fs: Fix system crash due to lack of free space in LFS

2023-04-03 Thread Chao Yu
On 2023/4/4 1:01, Jaegeuk Kim wrote: On 04/01, Chao Yu wrote: On 2023/3/21 8:12, Yonggil Song wrote: When f2fs tries to checkpoint during foreground gc in LFS mode, system crash occurs due to lack of free space if the amount of dirty node and dentry pages generated by data migration exceeds fre

Re: [f2fs-dev] [PATCH v2] f2fs: fix null pointer panic in tracepoint in __replace_atomic_write_block

2023-04-03 Thread Chao Yu
On 2023/4/4 0:54, Jaegeuk Kim wrote: We got a kernel panic if old_addr is NULL. https://bugzilla.kernel.org/show_bug.cgi?id=217266 BUG: kernel NULL pointer dereference, address: Call Trace: f2fs_commit_atomic_write+0x619/0x990 [f2fs a1b985b80f5babd6f3ea778384908880812

Re: [f2fs-dev] [RESEND] f2fs: add sanity compress level check for compressed file

2023-04-03 Thread Chao Yu
On 2023/4/3 21:33, Yangtao Li wrote: Hi Chao, Why not zstd_max_clevel()? zstd_max_clevel() is only defined when CONFIG_F2FS_FS_ZSTD is enabled, using zstd_max_clevel() will result in compile errors otherwise. If using the following code, -

Re: [f2fs-dev] [PATCH v2] f2fs: fix align check for npo2

2023-04-03 Thread patchwork-bot+f2fs
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Sun, 2 Apr 2023 12:12:59 +0900 you wrote: > From: Yohan Joung > > Fix alignment check to be correct in npo2 as well > > Signed-off-by: Yohan Joung > --- > fs/f2fs/segment.c | 5 +++-- > 1 file changed, 3 insertions(

Re: [f2fs-dev] [PATCH 1/2] f2fs: fix iostat lock protection

2023-04-03 Thread patchwork-bot+f2fs
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Fri, 31 Mar 2023 17:26:56 +0800 you wrote: > From: Qilin Tan > > Made iostat lock irq safe to avoid potentinal deadlock. > > Deadlock scenario: > f2fs_attr_store > -> f2fs_sbi_store > -> _sbi_store > -> spin_loc

[f2fs-dev] Patchwork summary for: f2fs

2023-04-03 Thread patchwork-bot+f2fs
Hello: The following patches were marked "accepted", because they were applied to jaegeuk/f2fs.git (dev): Series: [f2fs-dev,1/2] f2fs: fix iostat lock protection Submitter: Bo Ye Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=735769 Lore link: h

Re: [f2fs-dev] [PATCH] f2fs: fix to trigger a checkpoint in the end of foreground garbage collection

2023-04-03 Thread Jaegeuk Kim
On 03/24, Chao Yu wrote: > In order to reclaim free blocks in prefree sections before latter use. We were supposed to do checkpoint as is? > > Fixes: 6f8d4455060d ("f2fs: avoid fi->i_gc_rwsem[WRITE] lock in f2fs_gc") > Signed-off-by: Chao Yu > --- > fs/f2fs/f2fs.h| 1 + > fs/f2fs/gc.c

Re: [f2fs-dev] [PATCH] f2fs: remove struct victim_selection default_v_ops

2023-04-03 Thread Jaegeuk Kim
On 04/03, Yangtao Li wrote: > There is only single instance of these ops, so remove the indirection > and call get_victim_by_default directly. Originally this was intended to give a chance to provide other allocation option. Anyway, it seems quit hard to do it anymore. Minor tip is it'd be better

Re: [f2fs-dev] [PATCH] f2fs: fix to check readonly condition correctly

2023-04-03 Thread Jaegeuk Kim
On 04/02, Chao Yu wrote: > This patch does below changes: > > - If f2fs enables readonly feature or device is readonly, allow to > mount readonly mode only > - Introduce f2fs_dev_is_readonly() to indicate whether image or device > is readonly > - remove unnecessary f2fs_hw_is_readonly() in f2fs_wr

Re: [f2fs-dev] [PATCH v3] f2fs: add iostat latency statistics support for discard

2023-04-03 Thread Jaegeuk Kim
Could you split the patch which cleans up and adds it on top of it? On 03/30, Yangtao Li wrote: > In this patch, it adds to account discard latency. > > Reported-by: kernel test robot > Link: > https://lore.kernel.org/oe-kbuild-all/202303211005.rgxljvli-...@intel.com/ > Signed-off-by: Yangtao L

Re: [f2fs-dev] [PATCH] f2fs: support to show noage_extent_cache mount option

2023-04-03 Thread Jaegeuk Kim
On 03/31, Yangtao Li wrote: > This patch support noage_extent_cache mount option. > > Signed-off-by: Yangtao Li > --- > Documentation/filesystems/f2fs.rst | 2 ++ > fs/f2fs/super.c| 7 +++ > 2 files changed, 9 insertions(+) > > diff --git a/Documentation/filesystems/f2fs

Re: [f2fs-dev] [Bug 217266] kernel panic on f2fs filesystem when f2fs_commit_atomic_write

2023-04-03 Thread Micha L via Linux-f2fs-devel
Am Mo., 3. Apr. 2023 um 16:08 Uhr schrieb : > > https://bugzilla.kernel.org/show_bug.cgi?id=217266 > > Chao Yu (c...@kernel.org) changed: > >What|Removed |Added > > Status|N

[f2fs-dev] [Bug 217266] kernel panic on f2fs filesystem when f2fs_commit_atomic_write

2023-04-03 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=217266 --- Comment #7 from michalechne...@googlemail.com --- Am Mo., 3. Apr. 2023 um 16:08 Uhr schrieb : > > https://bugzilla.kernel.org/show_bug.cgi?id=217266 > > Chao Yu (c...@kernel.org) changed: > >What|Removed |Ad

Re: [f2fs-dev] [PATCH v2] f2fs: Fix system crash due to lack of free space in LFS

2023-04-03 Thread Jaegeuk Kim
On 04/01, Chao Yu wrote: > On 2023/3/21 8:12, Yonggil Song wrote: > > When f2fs tries to checkpoint during foreground gc in LFS mode, system > > crash occurs due to lack of free space if the amount of dirty node and > > dentry pages generated by data migration exceeds free space. > > The reproducti

[f2fs-dev] [Bug 217266] kernel panic on f2fs filesystem when f2fs_commit_atomic_write

2023-04-03 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=217266 Jaegeuk Kim (jaeg...@kernel.org) changed: What|Removed |Added CC||jaeg...@kernel.org ---

Re: [f2fs-dev] [PATCH v2] f2fs: fix null pointer panic in tracepoint in __replace_atomic_write_block

2023-04-03 Thread Jaegeuk Kim
We got a kernel panic if old_addr is NULL. https://bugzilla.kernel.org/show_bug.cgi?id=217266 BUG: kernel NULL pointer dereference, address: Call Trace: f2fs_commit_atomic_write+0x619/0x990 [f2fs a1b985b80f5babd6f3ea778384908880812bfa43] __f2fs_ioctl+0xd8e/0x4080 [f2fs a

[f2fs-dev] [PATCH] f2fs: fix null pointer panic in tracepoint in __replace_atomic_write_block

2023-04-03 Thread Jaegeuk Kim
We got a kernel panic if old_addr is NULL. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 72bce3808394..2439d7029e64 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -257,7

[f2fs-dev] [Bug 217266] kernel panic on f2fs filesystem when f2fs_commit_atomic_write

2023-04-03 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=217266 Chao Yu (c...@kernel.org) changed: What|Removed |Added Status|NEW |ASSIGNED CC|

Re: [f2fs-dev] [RESEND] f2fs: add sanity compress level check for compressed file

2023-04-03 Thread Yangtao Li via Linux-f2fs-devel
Hi Chao, > Why not zstd_max_clevel()? zstd_max_clevel() is only defined when CONFIG_F2FS_FS_ZSTD is enabled, using zstd_max_clevel() will result in compile errors otherwise. If using the following code, switch

Re: [f2fs-dev] [RESEND] f2fs: add sanity compress level check for compressed file

2023-04-03 Thread Chao Yu
On 2023/4/3 11:46, Chao Yu wrote: On 2023/3/31 0:28, Yangtao Li wrote: Commit 3fde13f817e2 ("f2fs: compress: support compress level") forgot to do basic compress level check, let's add it. Signed-off-by: Yangtao Li --- fs/f2fs/inode.c | 94 +

[f2fs-dev] [PATCH v5] f2fs: support FAULT_LOCK type fault injection

2023-04-03 Thread Yangtao Li via Linux-f2fs-devel
Similar to FAULT_LOCK_OP, this patch supports to inject fault into variant of _trylock(), including: - inode_trylock - down_read_trylock - down_write_trylock - mutex_trylock - sb_start_write_trylock - trylock_page Usage: a) echo 524288 > /sys/fs/f2fs//inject_type or b) mount -o fau

Re: [f2fs-dev] [PATCH v4] f2fs: support FAULT_LOCK type fault injection

2023-04-03 Thread kernel test robot
to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Yangtao-Li/f2fs-support-FAULT_LOCK-type-fault-injection/20230403-111853 base: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeu

[f2fs-dev] [PATCH] f2fs: remove struct victim_selection default_v_ops

2023-04-03 Thread Yangtao Li via Linux-f2fs-devel
There is only single instance of these ops, so remove the indirection and call get_victim_by_default directly. Signed-off-by: Yangtao Li --- fs/f2fs/f2fs.h| 5 - fs/f2fs/gc.c | 12 +++- fs/f2fs/segment.c | 7 --- fs/f2fs/segment.h | 7 --- 4 files changed, 11 inse