Re: [f2fs-dev] [PATCH 1/4] f2fs: rename logical_to_blk and blk_to_logical

2020-12-01 Thread Chao Yu
On 2020/12/1 12:09, Jaegeuk Kim wrote: Forgot to add f2fs mailing list. On 11/25, Jaegeuk Kim wrote: This patch renames two functions like below having u64. - logical_to_blk to bytes_to_blks - blk_to_logical to blks_to_bytes Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Thanks, __

Re: [f2fs-dev] [PATCH 2/4] f2fs: use new conversion functions between blks and bytes

2020-12-01 Thread Chao Yu
On 2020/12/1 12:09, Jaegeuk Kim wrote: On 11/25, Jaegeuk Kim wrote: This patch cleans up blks and bytes conversions. Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.ne

Re: [f2fs-dev] [PATCH 3/4] f2fs: fix wrong block count instead of bytes

2020-12-01 Thread Chao Yu
On 2020/12/1 12:09, Jaegeuk Kim wrote: On 11/25, Jaegeuk Kim wrote: We should convert cur_lblock, a block count, to bytes for len. Signed-off-by: Jaegeuk Kim Fixes: af4b6b8edf6a ("f2fs: introduce check_swap_activate_fast()") Reviewed-by: Chao Yu Thanks, _

[f2fs-dev] [PATCH v3] f2fs: compress: add compress_inode to cache compressed blocks

2020-12-01 Thread Chao Yu
Support to use address space of inner inode to cache compressed block, in order to improve cache hit ratio of random read. Signed-off-by: Chao Yu --- v3: - In f2fs_evict_inode(), drop compressed page cache belong to evicted inode. Documentation/filesystems/f2fs.rst | 3 + fs/f2fs/compress.c

[f2fs-dev] [PATCH] f2fs: compress: support compress level

2020-12-01 Thread Chao Yu
Expand 'compress_algorithm' mount option to accept parameter as format of :, by this way, it gives a way to allow user to do more specified config on lz4 and zstd compression level, then f2fs compression can provide higher compress ratio. In order to set compress level for lz4 algorithm, it needs

Re: [f2fs-dev] [PATCH 2/9] f2fs: remove f2fs_dir_open()

2020-12-01 Thread Eric Biggers
On Thu, Nov 26, 2020 at 03:04:55PM +0800, Chao Yu wrote: > On 2020/11/25 8:23, Eric Biggers wrote: > > From: Eric Biggers > > > > Since encrypted directories can be opened without their encryption key > > being available, and each readdir tries to set up the key, trying to set > > readdir -> rea

[f2fs-dev] [PATCH 2/3] f2fs-tools:sload.f2fs compression support

2020-12-01 Thread Robin Hsu
From: Robin Hsu Add F2FS compression support for sload * Support file extension filter, either default-accept or default-deny policy * Support choice of compression algorithm, LZO (version 2) or LZ4 (default) * Support custom log of cluster size * Support minimum number of compressed blocks p

[f2fs-dev] [PATCH 1/3] f2fs-tools: Added #ifdef WITH_func

2020-12-01 Thread Robin Hsu
From: Robin Hsu Add proprocessor defines (options) 'WITH_func', where func = DUMP, DEFRAG, RESIZE, or SLOAD Signed-off-by: Robin Hsu --- fsck/main.c | 16 1 file changed, 16 insertions(+) diff --git a/fsck/main.c b/fsck/main.c index e70048b..b20498f 100644 --- a/fsck/main.c +

[f2fs-dev] [PATCH 3/3] f2fs-tools:sload.f2fs compress: Fixed automake

2020-12-01 Thread Robin Hsu
From: Robin Hsu Fixed automake for sload.f2fs compression support ./configure now will by default depends on liblzo2 and liblz4. To compile without liblzo2 (and thus not support liblzo2 compression), run ./configure with '--without-lzo2' option. To compile without liblz4 (and thus not support

[f2fs-dev] [PATCH 0/3] f2fs-tools: sload.f2fs to support compression

2020-12-01 Thread Robin Hsu
From: Robin Hsu * 3 patch set: #1: added some #ifdef for easier support #2: main code change #3: automake changes Robin Hsu (3): f2fs-tools: Added #ifdef WITH_func f2fs-tools:sload.f2fs compression support f2fs-tools:sload.f2fs compress: Fixed automake configure.ac| 32

Re: [f2fs-dev] [PATCH 4/4] f2fs: remove buffer_head which has 32bits limit

2020-12-01 Thread Chao Yu
On 2020/12/1 12:09, Jaegeuk Kim wrote: On 11/25, Jaegeuk Kim wrote: This patch removes buffer_head dependency when getting block addresses. Light reported there's a 32bit issue in f2fs_fiemap where map_bh.b_size is 32bits while len is 64bits given by user. This will give wrong length to f2fs_map

Re: [f2fs-dev] [PATCH v2] f2fs: Remove unnecessary unlikely()

2020-12-01 Thread Chao Yu
On 2020/12/1 15:17, Shuosheng Huang wrote: From: Yangtao Li WARN_ON() already contains an unlikely(), so it's not necessary to use unlikely. Signed-off-by: Yangtao Li Signed-off-by: Shuosheng Huang Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-

Re: [f2fs-dev] [PATCH] f2fs: init dirty_secmap incorrectly

2020-12-01 Thread Chao Yu
On 2020/12/1 15:45, Jack Qiu wrote: section is dirty, but dirty_secmap may not set Reported-by: Jia Yang Fixes: da52f8ade40b ("f2fs: get the right gc victim section when section has several segments") Cc: Signed-off-by: Jack Qiu Reviewed-by: Chao Yu Thanks, _

[f2fs-dev] [PATCH v4] f2fs: compress: add compress_inode to cache compressed blocks

2020-12-01 Thread Chao Yu
Support to use address space of inner inode to cache compressed block, in order to improve cache hit ratio of random read. Signed-off-by: Chao Yu --- v4: - fix "two or more data types in declaration specifiers" compile error. Documentation/filesystems/f2fs.rst | 3 + fs/f2fs/compress.c

[f2fs-dev] [PATCH v3] f2fs: compress: support compress level

2020-12-01 Thread Chao Yu
Expand 'compress_algorithm' mount option to accept parameter as format of :, by this way, it gives a way to allow user to do more specified config on lz4 and zstd compression level, then f2fs compression can provide higher compress ratio. In order to set compress level for lz4 algorithm, it needs

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add compress_mode mount option

2020-12-01 Thread Chao Yu
On 2020/12/1 12:08, Daeho Jeong wrote: From: Daeho Jeong We will add a new "compress_mode" mount option to control file compression mode. This supports "fs" and "user". In "fs" mode (default), f2fs does automatic compression on the compression enabled files. In "user" mode, f2fs disables the au

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE

2020-12-01 Thread Chao Yu
On 2020/12/1 12:08, Daeho Jeong wrote: From: Daeho Jeong Added two ioctl to decompress/compress explicitly the compression enabled file in "compress_mode=user" mount option. Using these two ioctls, the users can make a control of compression and decompression of their files. Signed-off-by: Da