Re: [f2fs-dev] [RFC PATCH] f2fs: don't set SBI_QUOTA_NEED_REPAIR flag if receive SIGKILL

2024-09-03 Thread Chao Yu via Linux-f2fs-devel
On 2024/9/3 14:06, wangzijie wrote: From: Chao Yu via Linux-f2fs-devel On 2024/8/27 14:22, wangzijie wrote: Thread A -dquot_initialize   -dqget    -f2fs_dquot_acquire     -v2_read_dquot -qtree_read_dquot   -find_tree_dqentry    -f2fs_quota_read     -read_cache_page_gfp   

Re: [f2fs-dev] [PATCH] f2fs: prevent atomic file from being dirtied before commit

2024-09-03 Thread Chao Yu via Linux-f2fs-devel
On 2024/9/4 10:52, Daeho Jeong wrote: On Tue, Sep 3, 2024 at 7:26 PM Chao Yu wrote: On 2024/9/4 1:07, Daeho Jeong wrote: On Mon, Sep 2, 2024 at 3:08 AM Chao Yu wrote: On 2024/8/27 4:23, Daeho Jeong wrote: From: Daeho Jeong Keep atomic file clean while updating and make it dirtied during

[f2fs-dev] [PATCH] f2fs: fix to check atomic_file in f2fs ioctl interfaces

2024-09-03 Thread Chao Yu via Linux-f2fs-devel
Some f2fs ioctl interfaces like f2fs_ioc_set_pin_file(), f2fs_move_file_range(), and f2fs_defragment_range() missed to check atomic_write status, which may cause potential race issue, fix it. Cc: sta...@vger.kernel.org Signed-off-by: Chao Yu --- fs/f2fs/file.c | 13 - 1 file changed,

[f2fs-dev] [PATCH 2/2] fsck.f2fs: support to add missing '.' or '..' dirent

2024-09-03 Thread Chao Yu via Linux-f2fs-devel
Previously, once fsck.f2fs detects that directory missed '.' or '..' dirent, it tags inode w/ F2FS_INLINE_DOTS flag, and expects f2fs kernel module can repaire it online during it runs to lookup() on target directory. This patch abandons previous implementation, and do repaires directly. Reviewed

[f2fs-dev] [PATCH 1/2] fsck.f2fs: fix to detect double '.' or '..'

2024-09-03 Thread Chao Yu via Linux-f2fs-devel
If there are double '.' or '..' dirents in directory, fsck.f2fs won't detect and repaire the issue correctly, fix it. Reviewed-by: Sheng Yong Signed-off-by: Chao Yu --- fsck/fsck.c | 55 +++ fsck/fsck.h | 3 ++- include/f2fs_fs.h | 6 +++

Re: [f2fs-dev] [PATCH 00/13] f2fs: introduce inline tail

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
On Tue, Sep 03, 2024 at 09:29:30AM -0700, Eric Biggers via Linux-f2fs-devel wrote: > On Tue, Sep 03, 2024 at 02:54:44AM -0600, Wu Bo via Linux-f2fs-devel wrote: > > The inode in F2FS occupies an entire 4k block. For many small files, this > > means > > they consume much more space than their actu

Re: [f2fs-dev] [PATCH] f2fs: prevent atomic file from being dirtied before commit

2024-09-03 Thread Daeho Jeong
On Tue, Sep 3, 2024 at 7:26 PM Chao Yu wrote: > > On 2024/9/4 1:07, Daeho Jeong wrote: > > On Mon, Sep 2, 2024 at 3:08 AM Chao Yu wrote: > >> > >> On 2024/8/27 4:23, Daeho Jeong wrote: > >>> From: Daeho Jeong > >>> > >>> Keep atomic file clean while updating and make it dirtied during commit > >

Re: [f2fs-dev] [PATCH 05/13] f2fs: set inline tail flag when create inode

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
On Tue, Sep 03, 2024 at 09:50:41AM +, Huang Jianan via Linux-f2fs-devel wrote: > On 2024/9/3 16:54, Wu Bo via Linux-f2fs-devel wrote: > > [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给mi...@xiaomi.com进行反馈 > > > > Set inline tail flag to enable this feature when new inode is created. > > Inherit

Re: [f2fs-dev] [PATCH] f2fs: prevent atomic file from being dirtied before commit

2024-09-03 Thread Chao Yu via Linux-f2fs-devel
On 2024/9/4 1:07, Daeho Jeong wrote: On Mon, Sep 2, 2024 at 3:08 AM Chao Yu wrote: On 2024/8/27 4:23, Daeho Jeong wrote: From: Daeho Jeong Keep atomic file clean while updating and make it dirtied during commit in order to avoid unnecessary and excessive inode updates in the previous fix.

[f2fs-dev] [PATCH v2] f2fs-tools: add write hint support

2024-09-03 Thread Daejun Park
This patch enables support for write hints by segment type. Signed-off-by: Daejun Park --- v2: - Add -H option for write hint enabling. - Keep last write hint to reduce fnctl call. configure.ac| 2 + fsck/defrag.c | 5 +- fsck/dir.c | 27 +++--- fs

Re: [f2fs-dev] [PATCH 13/13] f2fs: implement inline tail forward recovery

2024-09-03 Thread kernel test robot
Hi Wu, kernel test robot noticed the following build warnings: [auto build test WARNING on v6.11-rc6] [also build test WARNING on linus/master] [cannot apply to jaegeuk-f2fs/dev-test jaegeuk-f2fs/dev next-20240903] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [f2fs-dev] [RCF PATCH v3 09/10] inject.f2fs: add dentry injection

2024-09-03 Thread Jaegeuk Kim via Linux-f2fs-devel
On 09/03, Sheng Yong wrote: > Hi, Jaegeuk, > > I noticed that this commit is not queued in either dev or master branch. > Do you have any comments on this commit :-) Thanks, I missed. Let me queue in the branches. :) > > thanks, > shengyong > > On 2024/7/4 10:57, Sheng Yong wrote: > > This pat

Re: [f2fs-dev] [PATCH v2] f2fs: Do not check the FI_DIRTY_INODE flag when umounting a ro fs.

2024-09-03 Thread Jaegeuk Kim via Linux-f2fs-devel
On 09/03, Chao Yu wrote: > On 2024/9/2 21:01, Julian Sun wrote: > > On Mon, 2024-09-02 at 16:13 +0800, Chao Yu wrote: > > > > On 2024/8/29 0:54, Julian Sun wrote: > > > > > > Hi, all. > > > > > > > > > > > > Recently syzbot reported a bug as following: > > > > > > > > > > > > kernel BUG at fs/f2f

[f2fs-dev] [PATCH] mkfs.f2fs: use correct endian conversion for writing lpf inode

2024-09-03 Thread Daeho Jeong
From: Daeho Jeong The conversion between cpu and little endian is incorrect. Signed-off-by: Daeho Jeong --- mkfs/f2fs_format.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c index c9d335a..30d8e19 100644 --- a/mkfs/f2fs_format.c

Re: [f2fs-dev] [PATCH] f2fs: prevent atomic file from being dirtied before commit

2024-09-03 Thread Daeho Jeong
On Mon, Sep 2, 2024 at 3:08 AM Chao Yu wrote: > > On 2024/8/27 4:23, Daeho Jeong wrote: > > From: Daeho Jeong > > > > Keep atomic file clean while updating and make it dirtied during commit > > in order to avoid unnecessary and excessive inode updates in the previous > > fix. > > > > Fixes: 4bf78

Re: [f2fs-dev] [PATCH 00/13] f2fs: introduce inline tail

2024-09-03 Thread Eric Biggers via Linux-f2fs-devel
On Tue, Sep 03, 2024 at 02:54:44AM -0600, Wu Bo via Linux-f2fs-devel wrote: > The inode in F2FS occupies an entire 4k block. For many small files, this > means > they consume much more space than their actual size. Therefore, there is > significant potential to better utilize the inode block space

Re: [f2fs-dev] [syzbot] [f2fs?] kernel BUG in f2fs_evict_inode (3)

2024-09-03 Thread syzbot
Hello, syzbot has tested the proposed patch and the reproducer did not trigger any issue: Reported-by: syzbot+ebea2790904673d7c...@syzkaller.appspotmail.com Tested-by: syzbot+ebea2790904673d7c...@syzkaller.appspotmail.com Tested on: commit: 69dc8fbb f2fs: get rid of online repaire on c

Re: [f2fs-dev] [PATCH v4 0/5] Write-placement hints and FDP

2024-09-03 Thread Christian Brauner via Linux-f2fs-devel
On Tue, Sep 03, 2024 at 07:58:46PM GMT, Kanchan Joshi wrote: > Hi Amir, > > > On 8/26/2024 10:36 PM, Kanchan Joshi wrote: > > Current write-hint infrastructure supports 6 temperature-based data life > > hints. > > The series extends the infrastructure with a new temperature-agnostic > > placement

Re: [f2fs-dev] [PATCH v4 0/5] Write-placement hints and FDP

2024-09-03 Thread Kanchan Joshi
Hi Amir, On 8/26/2024 10:36 PM, Kanchan Joshi wrote: > Current write-hint infrastructure supports 6 temperature-based data life > hints. > The series extends the infrastructure with a new temperature-agnostic > placement-type hint. New fcntl codes F_{SET/GET}_RW_HINT_EX allow to > send the hint t

Re: [f2fs-dev] [syzbot] [f2fs?] kernel BUG in f2fs_evict_inode (3)

2024-09-03 Thread Chao Yu via Linux-f2fs-devel
#syz test git://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git wip On 2024/8/22 23:38, syzbot wrote: syzbot has found a reproducer for the following issue on: HEAD commit:872cf28b8df9 Merge tag 'platform-drivers-x86-v6.11-4' of g.. git tree: upstream console+strace: https://sy

Re: [f2fs-dev] [PATCH v2] f2fs: Do not check the FI_DIRTY_INODE flag when umounting a ro fs.

2024-09-03 Thread Chao Yu via Linux-f2fs-devel
On 2024/9/2 21:01, Julian Sun wrote: On Mon, 2024-09-02 at 16:13 +0800, Chao Yu wrote: On 2024/8/29 0:54, Julian Sun wrote: Hi, all. Recently syzbot reported a bug as following: kernel BUG at fs/f2fs/inode.c:896! CPU: 1 UID: 0 PID: 5217 Comm: syz-executor605 Not tainted 6.11.0-rc4-syzkaller-0

Re: [f2fs-dev] [PATCH v2] f2fs: Do not check the FI_DIRTY_INODE flag when umounting a ro fs.

2024-09-03 Thread Julian Sun
On Mon, 2024-09-02 at 16:13 +0800, Chao Yu wrote: > On 2024/8/29 0:54, Julian Sun wrote: > > Hi, all. > > > > Recently syzbot reported a bug as following: > > > > kernel BUG at fs/f2fs/inode.c:896! > > CPU: 1 UID: 0 PID: 5217 Comm: syz-executor605 Not tainted 6.11.0- > > rc4-syzkaller-00033-g872c

Re: [f2fs-dev] [RCF PATCH v3 09/10] inject.f2fs: add dentry injection

2024-09-03 Thread Sheng Yong via Linux-f2fs-devel
Hi, Jaegeuk, I noticed that this commit is not queued in either dev or master branch. Do you have any comments on this commit :-) thanks, shengyong On 2024/7/4 10:57, Sheng Yong wrote: This patch enables injecting dentry block or dir entry. print_raw_dentry_info() is added to show values of no

Re: [f2fs-dev] [External Mail] [PATCH 05/13] f2fs: set inline tail flag when create inode

2024-09-03 Thread Huang Jianan via Linux-f2fs-devel
On 2024/9/3 16:54, Wu Bo via Linux-f2fs-devel wrote: > [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给mi...@xiaomi.com进行反馈 > > Set inline tail flag to enable this feature when new inode is created. > Inherit the conditions from inline data. > > Signed-off-by: Wu Bo > --- > fs/f2fs/namei.c | 3 +++

Re: [f2fs-dev] [External Mail] [PATCH 05/13] f2fs: set inline tail flag when create inode

2024-09-03 Thread Huang Jianan via Linux-f2fs-devel
On 2024/9/3 16:54, Wu Bo via Linux-f2fs-devel wrote: Hi Bo, > > Set inline tail flag to enable this feature when new inode is created. > Inherit the conditions from inline data. > > Signed-off-by: Wu Bo > --- > fs/f2fs/namei.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/f2

[f2fs-dev] [PATCH 10/13] f2fs: avoid inlining quota files

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
Quota files have a different write path and are incompatible with inlined inodes (whether data or tail inlined). To simplify the process, inlining is disabled for quota files here. Signed-off-by: Wu Bo --- fs/f2fs/data.c | 9 + fs/f2fs/super.c | 10 ++ 2 files changed, 19 inser

[f2fs-dev] [PATCH 06/13] f2fs: fix address info has been truncated

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
If there is no data inline, the address table should not be truncate, in case there may be reserved address info. Signed-off-by: Wu Bo --- fs/f2fs/inline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 30b18053e784..a542956d618a 1

[f2fs-dev] [PATCH 13/13] f2fs: implement inline tail forward recovery

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
The recovery logic is similar to that of inline data, except that the inline tail may require recovery of some blocks. This is because the inline tail has a 16-size block address array, whereas inline data does not. Signed-off-by: Wu Bo --- fs/f2fs/f2fs.h | 1 + fs/f2fs/inline.c | 51

[f2fs-dev] [PATCH 04/13] f2fs: implement inline tail read & fiemap

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
Expand the inline data read & fiemap to support inline tail. Signed-off-by: Wu Bo --- fs/f2fs/data.c | 31 ++- fs/f2fs/inline.c | 26 -- 2 files changed, 42 insertions(+), 15 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index cd

[f2fs-dev] [PATCH 05/13] f2fs: set inline tail flag when create inode

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
Set inline tail flag to enable this feature when new inode is created. Inherit the conditions from inline data. Signed-off-by: Wu Bo --- fs/f2fs/namei.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 38b4750475db..13c295ea19de 100644 --- a/fs/f2fs/

[f2fs-dev] [PATCH 11/13] f2fs: fix inline tail data lost

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
Before adding a new page to the tail, the old inlined tail page must be converted first; otherwise, the data on that page could be lost. Signed-off-by: Wu Bo --- fs/f2fs/data.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2f

[f2fs-dev] [PATCH 09/13] f2fs: fix data loss during inline tail writing

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
This is detected by xfstest generic/114. The inline data needs to be read out before writing to avoid losing the already inline data. Signed-off-by: Wu Bo --- fs/f2fs/data.c | 3 ++- fs/f2fs/file.c | 7 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2

[f2fs-dev] [PATCH 01/13] f2fs: add inline tail mount option

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
Same as inline data, use mount option to control inline tail enable or disable. And enable inline tail as default. Signed-off-by: Wu Bo --- fs/f2fs/f2fs.h | 1 + fs/f2fs/super.c | 15 +++ 2 files changed, 16 insertions(+) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index ac19c61f

[f2fs-dev] [PATCH 12/13] f2fs: convert inline tails to avoid potential issues

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
Like the commit: b3d208f96d6b ("f2fs: revisit inline_data to avoid data races and potential bugs") Due to the limitations of inline data, there are many scenarios where inline isn't supported well, such as move file range. Therefore, in these scenarios, convert the inline tail file to a regular

[f2fs-dev] [PATCH 02/13] f2fs: add inline tail disk layout definition

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
When inline tail is enabled, use a compact block address array. And the rest space is used to save file tail data. The layout of an inode block as following: | inode block | 4096 | inline tail enable| | --- | | --| | inode info | 360 |

[f2fs-dev] [PATCH 03/13] f2fs: implement inline tail write & truncate

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
As f2fs inline data is a special case of inline tail, we can expand inline tail based on inline data. If file tail can inline to inode block, not bother to pre-allocate block at write begin. When tail page writing back, inline it or normally write it if the tail is oversize. And when inode page wr

[f2fs-dev] [PATCH 07/13] f2fs: support seek for inline tail

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
Fix to support seek for inline tail files Signed-off-by: Wu Bo --- fs/f2fs/file.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 957d1ff55350..dda4cf6d7325 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -400,6 +400

[f2fs-dev] [PATCH 08/13] f2fs: convert inline tail when inode expand

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
Convert an inline tail file to a normal file when the inode expansion exceeds the maximum size allowed for the inline tail. Signed-off-by: Wu Bo --- fs/f2fs/f2fs.h | 1 + fs/f2fs/file.c | 6 ++ fs/f2fs/inline.c | 43 +++ 3 files changed, 50 inser

[f2fs-dev] [PATCH 00/13] f2fs: introduce inline tail

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
The inode in F2FS occupies an entire 4k block. For many small files, this means they consume much more space than their actual size. Therefore, there is significant potential to better utilize the inode block space. Currently, F2FS has two features to make use of the inode block space: inline data

[f2fs-dev] [PATCH] f2fs-tools: support inline tail

2024-09-03 Thread Wu Bo via Linux-f2fs-devel
To maximize the utilization of inode space, we introduced the inline tail feature. This feature modifies the inode structure, requiring support from the f2fs tools. The inode layout /w inline tail: | inode block | 4096 | inline tail enable| | --- | | --