Re: [f2fs-dev] [RFC PATCH] f2fs: compress: avoid duplicate counting of valid blocks when read compressed file

2021-08-08 Thread Fengnan Chang
Hi chao: Since cc.cluster_idx only will be set in f2fs_compress_ctx_add_page, so for non-compressed cluster, cc.cluster_idx should always be NULL. it means that the handling process of non-compressed cluster is same as older. On 2021/8/6 8:57, Chao Yu wrote: On 2021/7/23 11:18, Fengnan Cha

[f2fs-dev] [PATCH v5] f2fs: compress: allow write compress released file after truncate to zero

2021-08-08 Thread Fengnan Chang
For compressed file, after release compress blocks, don't allow write direct, but we should allow write direct after truncate to zero. Reviewed-by: Chao Yu Signed-off-by: Fengnan Chang --- Documentation/filesystems/f2fs.rst | 7 +-- fs/f2fs/file.c | 8 2 files c

Re: [f2fs-dev] [PATCH v4] f2fs: compress: allow write compress released file after truncate to zero

2021-08-08 Thread Chao Yu
On 2021/8/6 17:59, Fengnan Chang wrote: For compressed file, after release compress blocks, don't allow write direct, but we should allow write direct after truncate to zero. Signed-off-by: Fengnan Chang --- Documentation/filesystems/f2fs.rst | 7 +-- fs/f2fs/file.c |

[f2fs-dev] [PATCH v3 2/2] f2fs: support fault injection for f2fs_kmem_cache_alloc()

2021-08-08 Thread Chao Yu
This patch supports to inject fault into f2fs_kmem_cache_alloc(). Usage: a) echo 32768 > /sys/fs/f2fs//inject_type or b) mount -o fault_type=32768 Signed-off-by: Chao Yu --- v3: - rebase to last g-dev-test branch Documentation/filesystems/f2fs.rst | 1 + fs/f2fs/checkpoint.c |

[f2fs-dev] [PATCH] f2fs-tools: change fiemap print out format

2021-08-08 Thread Daeho Jeong
From: Daeho Jeong Given fiemap way to print out extents in the kernel, we can correctly print the layout of each file in a unit of extent, not block. So, I changed fiemap print out way like below. Fiemap: offset = 0 len = 60 logical addr.physical addr. length flags 0