[f2fs-dev] [PATCH v3] f2fs: compress: add nocompress extensions support

2021-05-06 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. Signed-off-by: Fengnan

[f2fs-dev] [PATCH] f2fs: return -EPERM given generic mask

2021-05-06 Thread Jaegeuk Kim
In f2fs_fileattr_set(), if (!fa->flags_valid) mask &= FS_COMMON_FL; In this case, we should not allow to set FS_COMPR_FL, instead of BUG_ON. /* Flags shared betwen flags/xflags */ (FS_SYNC_FL | FS_IMMUTABLE_FL | FS_APPEND_FL | \ FS_NODUMP_FL |

Re: [f2fs-dev] 答复: 答复: [PATCH] f2fs: compress: avoid unnecessary check in f2fs_prepare_compress_overwrite

2021-05-06 Thread Gao Xiang via Linux-f2fs-devel
On Thu, May 06, 2021 at 08:15:40PM +0800, changfeng...@vivo.com wrote: > This patch will not bring significant performance improvements, I > test this on mobile phone, use androbench, the sequential write test > case was open file with O_TRUNC, set write size to 4KB, performance > improved about

Re: [f2fs-dev] 答复: [PATCH] f2fs: compress: avoid unnecessary check in f2fs_prepare_compress_overwrite

2021-05-06 Thread Gao Xiang via Linux-f2fs-devel
On Thu, May 06, 2021 at 06:37:45PM +0800, Chao Yu wrote: > Hi Xiang, > > On 2021/5/6 17:58, Gao Xiang wrote: > > Hi Chao, > > > > On Thu, May 06, 2021 at 05:15:04PM +0800, Chao Yu wrote: > > > On 2021/4/26 17:00, Gao Xiang wrote: > > > > On Mon, Apr 26, 2021 at 04:42:20PM +0800,

[f2fs-dev] 答复: 答复: [PATCH] f2fs: compress: avoid unnecessary check in f2fs_prepare_compress_overwrite

2021-05-06 Thread changfengnan
This patch will not bring significant performance improvements, I test this on mobile phone, use androbench, the sequential write test case was open file with O_TRUNC, set write size to 4KB, performance improved about 2%-3%. If write size set to 32MB, performance improved about 0.5% .

Re: [f2fs-dev] 答复: [PATCH] f2fs: compress: avoid unnecessary check in f2fs_prepare_compress_overwrite

2021-05-06 Thread Chao Yu
Hi Xiang, On 2021/5/6 17:58, Gao Xiang wrote: Hi Chao, On Thu, May 06, 2021 at 05:15:04PM +0800, Chao Yu wrote: On 2021/4/26 17:00, Gao Xiang wrote: On Mon, Apr 26, 2021 at 04:42:20PM +0800, changfeng...@vivo.com wrote: Thank you for the reminder, I hadn't thought about fallocate before. I

Re: [f2fs-dev] 答复: [PATCH] f2fs: compress: avoid unnecessary check in f2fs_prepare_compress_overwrite

2021-05-06 Thread Gao Xiang via Linux-f2fs-devel
Hi Chao, On Thu, May 06, 2021 at 05:15:04PM +0800, Chao Yu wrote: > On 2021/4/26 17:00, Gao Xiang wrote: > > On Mon, Apr 26, 2021 at 04:42:20PM +0800, changfeng...@vivo.com wrote: > > > Thank you for the reminder, I hadn't thought about fallocate before. > > > I have done some tests and the

Re: [f2fs-dev] 答复: [PATCH] f2fs: compress: avoid unnecessary check in f2fs_prepare_compress_overwrite

2021-05-06 Thread Chao Yu
On 2021/4/26 17:00, Gao Xiang wrote: On Mon, Apr 26, 2021 at 04:42:20PM +0800, changfeng...@vivo.com wrote: Thank you for the reminder, I hadn't thought about fallocate before. I have done some tests and the results are as expected. Here is my test method, create a compressed file, and use

[f2fs-dev] [PATCH] f2fs: compress: fix to free compress page correctly

2021-05-06 Thread Chao Yu
In error path of f2fs_write_compressed_pages(), it needs to call f2fs_compress_free_page() to release temporary page. Fixes: 5e6bbde95982 ("f2fs: introduce mempool for {,de}compress intermediate page allocation") Signed-off-by: Chao Yu --- fs/f2fs/compress.c | 3 ++- 1 file changed, 2

Re: [f2fs-dev] [PATCH] f2fs: set file as cold when file defragmentation

2021-05-06 Thread Chao Yu
On 2021/5/6 12:46, Jaegeuk Kim wrote: On 05/06, Chao Yu wrote: On 2021/4/29 14:20, Daejun Park wrote: In file defragmentation by ioctl, all data blocks in the file are re-written out-of-place. File defragmentation implies user will not update and mostly read the file. So before the

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

2021-05-06 Thread Chao Yu
On 2021/5/6 12:43, Jaegeuk Kim wrote: On 05/06, Chao Yu wrote: On 2021/5/4 22:36, Jaegeuk Kim wrote: On 04/27, Chao Yu wrote: On 2021/4/27 1:09, Jaegeuk Kim wrote: On 04/25, Chao Yu wrote: We may trigger high frequent checkpoint for below case: 1. mkdir /mnt/dir1; set dir1 encrypted 2.