[f2fs-dev] [PATCH] f2fs_io: Add get file name encryption mode

2021-04-22 Thread Jaegeuk Kim
From: Robin Hsu This patch add an ioctl to get filename encryption mode. Signed-off-by: Robin Hsu Signed-off-by: Jaegeuk Kim --- tools/f2fs_io/f2fs_io.c | 63 + tools/f2fs_io/f2fs_io.h | 36 +++ 2 files changed, 99 insertions(+) dif

[f2fs-dev] [RFC] Reclaiming PG_private

2021-04-22 Thread Matthew Wilcox
We're perenially short of page flags, and I don't really see the need for PG_private to exist. We have 32/64 bits available in page->private, and we don't seem to need the extra bit. Most users store a pointer in page->private, and so PagePrivate() being implemented as page->private != 0 is appro

[f2fs-dev] [PATCH] f2fs: set prefree as free segments after clear prefree segments

2021-04-22 Thread Yangtao Li
For now, when do_checkpoint fails, the prefree bitmap is not cleared, but these segments are already in the free state. If these segments are used, the segments in use will be reset to the free state when f2fs_clear_prefree_segments is called next time. So move set_prefree_as_free_segments after c

Re: [f2fs-dev] [RFC PATCH] f2fs: reduce expensive checkpoint trigger frequency

2021-04-22 Thread heyunlei 00015531
在 2021/4/22 15:14, Chao Yu 写道: On 2021/4/22 12:06, Jaegeuk Kim wrote: On 04/16, Chao Yu wrote: We may trigger high frequent checkpoint for below case: 1. mkdir /mnt/dir1; set dir1 encrypted 2. touch /mnt/file1; fsync /mnt/file1 3. mkdir /mnt/dir2; set dir2 encrypted 4. touch /mnt/file2; fsync

[f2fs-dev] [PATCH] f2fs: add no compress extensions support

2021-04-22 Thread Fengnan Chang
When we create a directory with enable compression, all file write into directory will try to compress.But sometimes we may know, new file cannot meet compression ratio requirements. We need a nocompress extension to skip those files to avoid unnecessary compress page test. There are a few limits a

[f2fs-dev] [PATCH] f2fs: drop inplace IO if fs status is abnormal

2021-04-22 Thread Chao Yu
If filesystem has cp_error or need_fsck status, let's drop inplace IO to avoid further corruption of fs data. Signed-off-by: Chao Yu --- fs/f2fs/segment.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 6e740ecf081

Re: [f2fs-dev] [RFC PATCH] f2fs: reduce expensive checkpoint trigger frequency

2021-04-22 Thread Chao Yu
On 2021/4/22 12:06, Jaegeuk Kim wrote: On 04/16, Chao Yu wrote: We may trigger high frequent checkpoint for below case: 1. mkdir /mnt/dir1; set dir1 encrypted 2. touch /mnt/file1; fsync /mnt/file1 3. mkdir /mnt/dir2; set dir2 encrypted 4. touch /mnt/file2; fsync /mnt/file2 ... Although, newly c