[f2fs-dev] [PATCH v2] f2fs: support fault injection for flush submission error

2022-11-09 Thread Yangtao Li via Linux-f2fs-devel
Since we now support read, write, and discard in FAULT_INJECT, let's add support for flush. This patch supports to inject fault into __submit_flush_wait() to simulate flush cmd io error. Usage: a) echo 524288 > /sys/fs/f2fs//inject_type or b) mount -o fault_type=524288 Signed-off-by: Yangtao

Re: [f2fs-dev] [PATCH] f2fs: fix to enable compress for newly created file if extension matches

2022-11-09 Thread Sheng Yong via Linux-f2fs-devel
在 2022/11/9 21:57, Chao Yu 写道: On 2022/11/9 19:01, Sheng Yong wrote: If compress_extension is set, and a newly created file matches the extension, the file could be marked as compression file. However, if inline_data is also enabled, there is no chance to check its extension since

Re: [f2fs-dev] [PATCH] f2fs: support fault injection for flush submission error

2022-11-09 Thread Matthew Wilcox
On Thu, Nov 10, 2022 at 02:35:49AM +0800, Yangtao Li wrote: > +++ b/fs/f2fs/segment.c > @@ -486,7 +486,17 @@ void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi, bool > from_bg) > static int __submit_flush_wait(struct f2fs_sb_info *sbi, > struct block_device *bdev) >

[f2fs-dev] [PATCH] f2fs: support fault injection for flush submission error

2022-11-09 Thread Yangtao Li via Linux-f2fs-devel
This patch supports to inject fault into __submit_flush_wait() to simulate flush cmd io error. Usage: a) echo 524288 > /sys/fs/f2fs//inject_type or b) mount -o fault_type=524288 Signed-off-by: Yangtao Li --- Documentation/filesystems/f2fs.rst | 1 + fs/f2fs/f2fs.h | 1 +

Re: [f2fs-dev] [PATCH] f2fs: fix to enable compress for newly created file if extension matches

2022-11-09 Thread Chao Yu
On 2022/11/9 19:01, Sheng Yong wrote: If compress_extension is set, and a newly created file matches the extension, the file could be marked as compression file. However, if inline_data is also enabled, there is no chance to check its extension since f2fs_should_compress() always returns false.

Re: [f2fs-dev] [PATCH] f2fs: separate IPU policy for fdatasync from F2FS_IPU_FSYNC

2022-11-09 Thread Chao Yu
On 2022/11/9 20:56, qixiaoyu wrote: On Tue, Nov 08, 2022 at 10:30:13PM +0800, Chao Yu wrote: On 2022/11/8 20:32, qixiaoyu wrote: On Sun, Nov 06, 2022 at 09:54:59PM +0800, Chao Yu wrote: On 2022/11/2 20:25, qixiaoyu wrote: Hi Chao, fdatasync do in-place-update to avoid additional node

Re: [f2fs-dev] [PATCH] f2fs: separate IPU policy for fdatasync from F2FS_IPU_FSYNC

2022-11-09 Thread qixiaoyu
On Tue, Nov 08, 2022 at 10:30:13PM +0800, Chao Yu wrote: > On 2022/11/8 20:32, qixiaoyu wrote: > >On Sun, Nov 06, 2022 at 09:54:59PM +0800, Chao Yu wrote: > >>On 2022/11/2 20:25, qixiaoyu wrote: > >>>Hi Chao, > >>> > >>>fdatasync do in-place-update to avoid additional node writes, but currently >

[f2fs-dev] [PATCH] f2fs: fix to enable compress for newly created file if extension matches

2022-11-09 Thread Sheng Yong via Linux-f2fs-devel
If compress_extension is set, and a newly created file matches the extension, the file could be marked as compression file. However, if inline_data is also enabled, there is no chance to check its extension since f2fs_should_compress() always returns false. So if a new file is created (its inode