Re: [f2fs-dev] [PATCH v3] f2fs: prevent writing without fallocate() for pinned files

2024-03-22 Thread Chao Yu
On 2024/3/21 1:42, Daeho Jeong wrote: On Wed, Mar 20, 2024 at 2:38 AM Chao Yu wrote: On 2024/3/20 5:23, Daeho Jeong wrote: From: Daeho Jeong In a case writing without fallocate(), we can't guarantee it's allocated in the conventional area for zoned stroage. Signed-off-by: Daeho Jeong ---

Re: [f2fs-dev] [PATCH] f2fs: fix to adjust appropirate defragment pg_end

2024-03-22 Thread Chao Yu
On 2024/3/22 14:03, Zhiguo Niu wrote: A length that exceeds the real size of the inode may be specified from user, although these out-of-range areas are not mapped, but they still need to be check in while loop, which is unnecessary. Signed-off-by: Zhiguo Niu --- fs/f2fs/file.c | 4 +++- 1

Re: [f2fs-dev] [PATCH] f2fs: Prevent s_writer rw_sem count mismatch in f2fs_evict_inode

2024-03-22 Thread Chao Yu
On 2024/3/22 12:16, Yeongjin Gil wrote: If f2fs_evict_inode is called between freeze_super and thaw_super, the s_writer rwsem count may become negative, resulting in hang. CPU1 CPU2 f2fs_resize_fs() f2fs_evict_inode() f2fs_freeze set SBI_IS_FREEZING

Re: [f2fs-dev] 回覆: [PATCH] f2fs: avoid the deadlock case when stopping discard thread

2024-03-22 Thread Jaegeuk Kim
On 03/22, Light Hsieh (謝明燈) wrote: > I don't see my added log in sb_free_unlock() which will invoke > percpu_up_write to release the write semaphore. May I ask more details whether thaw_super() was called or not? > > > > 寄件者: Jaegeuk Kim > 寄件日期: 2024年3月22日 上午

Re: [f2fs-dev] [PATCH v10 7/8] ext4: Move CONFIG_UNICODE defguards into the code flow

2024-03-22 Thread Gabriel Krisman Bertazi
Eugen Hristev via Linux-f2fs-devel writes: > From: Gabriel Krisman Bertazi > > Instead of a bunch of ifdefs, make the unicode built checks part of the > code flow where possible, as requested by Torvalds. > > Reviewed-by: Eric Biggers > Signed-off-by: Gabriel Krisman Bertazi >

Re: [f2fs-dev] [PATCH v14 7/9] f2fs: Log error when lookup of encoded dentry fails

2024-03-22 Thread Gabriel Krisman Bertazi
Eugen Hristev writes: > If the volume is in strict mode, generi c_ci_compare can report a broken > encoding name. This will not trigger on a bad lookup, which is caught > earlier, only if the actual disk name is bad. > > Suggested-by: Gabriel Krisman Bertazi > Signed-off-by: Eugen Hristev >

[f2fs-dev] [PATCH v4] f2fs: prevent writing without fallocate() for pinned files

2024-03-22 Thread Daeho Jeong
From: Daeho Jeong In a case writing without fallocate(), we can't guarantee it's allocated in the conventional area for zoned stroage. Signed-off-by: Daeho Jeong --- v2: covered the direct io case v3: covered the mkwrite case v4: moved pin file check position in prepare_write_begin() ---

[f2fs-dev] [PATCH] f2fs: fix to detect inconsistent nat entry during truncation

2024-03-22 Thread Chao Yu
As Roman Smirnov reported as below: " There is a possible bug in f2fs_truncate_inode_blocks(): if (err < 0 && err != -ENOENT) goto fail; ... offset[1] = 0; offset[0]++; nofs += err; If err = -ENOENT then nofs will sum with an error

Re: [f2fs-dev] [PATCH] f2fs: avoid the deadlock case when stopping discard thread

2024-03-22 Thread Hillf Danton
On Thu, 21 Mar 2024 17:29:03 -0700 Jaegeuk Kim > > I posted this patch before Light reported. Yeah, his report's timestamp is 2024-03-20 6:59, nearly 7 hours later, which shows that you constructed the deadlock with nothing to do with his report. > > And, in the report, I didn't get this: >

[f2fs-dev] [bug report] fs: f2fs: integer overflow in f2fs_truncate_inode_blocks()

2024-03-22 Thread Roman Smirnov
Hello. There is a possible bug in f2fs_truncate_inode_blocks(): if (err < 0 && err != -ENOENT) goto fail; ... offset[1] = 0; offset[0]++; nofs += err; If err = -ENOENT then nofs will sum with an error code, which is strange behaviour.

[f2fs-dev] [PATCH] f2fs: fix to adjust appropirate defragment pg_end

2024-03-22 Thread Zhiguo Niu
A length that exceeds the real size of the inode may be specified from user, although these out-of-range areas are not mapped, but they still need to be check in while loop, which is unnecessary. Signed-off-by: Zhiguo Niu --- fs/f2fs/file.c | 4 +++- 1 file changed, 3 insertions(+), 1