[f2fs-dev] [PATCH v2] f2fs: do not allow to decompress files have FI_COMPRESS_RELEASED

2022-08-03 Thread Jaewook Kim
If a file has FI_COMPRESS_RELEASED, all writes for it should not be allowed. However, as of now, in case of compress_mode=user, writes triggered by IOCTLs like F2FS_IOC_DE/COMPRESS_FILE are allowed unexpectly, which could crash that file. To fix it, let's do not allow F2FS_IOC_DE/COMPRESS_IOCTL if

[f2fs-dev] [Bug 216050] f2fs_gc occupies 100% cpu

2022-08-03 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216050 --- Comment #48 from bernd_b (bbutsche...@yahoo.de) --- (In reply to Yuriy Garin from comment #47) > > First time I had this problem was ~2022-06-15, at that time I was probably > on > kernel 5.18.3 or 5.18.4. I had it on 5.18.6, see #25. > > A

[f2fs-dev] [PATCH] f2fs: do not set compression bit if kernel doesn't support

2022-08-03 Thread Jaegeuk Kim
If kernel doesn't have CONFIG_F2FS_FS_COMPRESSION, a file having FS_COMPR_FL via ioctl(FS_IOC_SETFLAGS) is unaccessible due to f2fs_is_compress_backend_ready(). Let's avoid it. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 7 ++- fs/f2fs/file.c | 4 ++-- 2 files changed, 8 insertions(+), 3

Re: [f2fs-dev] [PATCH v4 3/3] f2fs: support compressed file write/read amplifiction

2022-08-03 Thread Jaegeuk Kim
I feel that this adds lots of codes only for accounting purpose. Can we discuss why we need to know WA? If it's for debugging purpose, can we debug by tracepoints? On 07/31, Fengnan Chang wrote: > Try to support compressed file write and amplifiction accounting. > > Signed-off-by: Fengnan Chang

Re: [f2fs-dev] [PATCH -next] f2fs: Replace kmalloc() with f2fs_kmalloc

2022-08-03 Thread Jaegeuk Kim
On 08/01, Joe Perches wrote: > On Mon, 2022-08-01 at 11:23 -0700, Christoph Hellwig wrote: > > On Mon, Aug 01, 2022 at 05:22:02PM +0800, studentxs...@163.com wrote: > > > From: Xie Shaowen > > > > > > replace kmalloc with f2fs_kmalloc to keep f2fs code consistency. > > > > For that removing f2fs

Re: [f2fs-dev] [PATCH -next] f2fs: Replace kmalloc() with f2fs_kmalloc

2022-08-03 Thread Jaegeuk Kim
On 08/01, studentxs...@163.com wrote: > From: Xie Shaowen > > replace kmalloc with f2fs_kmalloc to keep f2fs code consistency. > > Reported-by: Hacash Robot > Signed-off-by: Xie Shaowen > --- > fs/f2fs/dir.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/f2fs/dir