Re: [External Mail][RFC PATCH 05/24] erofs: add inode data structure in Rust

2024-09-18 Thread Huang Jianan via Linux-erofs
On 2024/9/16 21:56, Yiyang Wu via Linux-erofs wrote: > > This patch introduces the same on-disk erofs data structure > in rust and also introduces multiple helpers for inode i_format > and chunk_indexing and later can be used to implement map_blocks. > > Signed-off-by: Yiyang Wu > --- > fs/ero

Re: [External Mail]Re: [PATCH v5] erofs-utils: fsck: introduce exporting xattrs

2024-09-05 Thread Huang Jianan via Linux-erofs
On 2024/9/6 10:31, Gao Xiang wrote: > > Hi Jianan, > > On 2024/9/6 10:22, Hongzhen Luo wrote: >> The current `fsck --extract` does not support exporting the extended >> attributes of files. This patch adds `--xattrs` option to dump the >> extended attributes, as well as the `--no-xattrs` option t

Re: [External Mail][PATCH v4] erofs-utils: fsck: introduce exporting xattrs

2024-09-05 Thread Huang Jianan via Linux-erofs
On 2024/9/5 19:37, Hongzhen Luo wrote: > > The current `fsck --extract` does not support exporting the extended > attributes of files. This patch adds `--xattrs` option to dump the > extended attributes, as well as the `--no-xattrs` option to not dump > the extended attributes. > > Signed-off-by:

[PATCH v2] erofs-utils: fix some style problems

2022-03-02 Thread Huang Jianan via Linux-erofs
Fix some minor issues, including: - Spelling mistakes; - Remove redundant spaces and parenthesis; - clean up file headers; - Match parameters with format parameters. Signed-off-by: Huang Jianan --- Changes since v1: - Removed modification related to alignment format; fuse/main.c

[PATCH v2] erofs-utils: fix fd leak when load compress hints file

2022-02-22 Thread Huang Jianan via Linux-erofs
Execute fclose before return error. Signed-off-by: Huang Jianan --- lib/compress_hints.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/compress_hints.c b/lib/compress_hints.c index 25adf35..92964eb 100644 --- a/lib/compress_hints.c +++ b/lib/compress_hints.c

Re: [PATCH] erofs-utils: fix some style problems

2022-02-22 Thread Huang Jianan via Linux-erofs
在 2022/2/18 14:20, Gao Xiang 写道: Hi Jianan, On Fri, Feb 18, 2022 at 11:11:37AM +0800, Huang Jianan via Linux-erofs wrote: Fix some minor issues, including: - Align with the left parenthesis; - Spelling mistakes; - Remove redundant spaces and parenthesis; - clean up file headers

Re: [PATCH] erofs-utils: fix memory leak when load compress hints file

2022-02-22 Thread Huang Jianan via Linux-erofs
在 2022/2/18 15:02, Gao Xiang 写道: On Fri, Feb 18, 2022 at 11:11:36AM +0800, Huang Jianan via Linux-erofs wrote: Execute fclose before return error. Signed-off-by: Huang Jianan It's actually a file descriptor leakage? Thanks, Gao Xiang Yes, I will fix this in the next version. T

[PATCH] erofs-utils: fix memory leak when load compress hints file

2022-02-17 Thread Huang Jianan via Linux-erofs
Execute fclose before return error. Signed-off-by: Huang Jianan --- lib/compress_hints.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/compress_hints.c b/lib/compress_hints.c index c3f3d48..c52e2d3 100644 --- a/lib/compress_hints.c +++ b/lib/compress_hints.c

[PATCH] erofs-utils: fix some style problems

2022-02-17 Thread Huang Jianan via Linux-erofs
Fix some minor issues, including: - Align with the left parenthesis; - Spelling mistakes; - Remove redundant spaces and parenthesis; - clean up file headers; - Match parameters with format parameters. Signed-off-by: Huang Jianan --- dump/main.c| 53 +++--

[PATCH] erofs-utils: check the return value of ftell

2022-02-17 Thread Huang Jianan via Linux-erofs
Need to check if we got a normal length. Signed-off-by: Huang Jianan --- lib/blobchunk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/blobchunk.c b/lib/blobchunk.c index 4a440d6..483362b 100644 --- a/lib/blobchunk.c +++ b/lib/blobchunk.c @@ -221,6 +221,8 @@ int erofs_blob_remap(void

[PATCH v3] erofs-utils: sort shared xattr

2021-12-15 Thread Huang Jianan via Linux-erofs
Sort shared xattr before writing to disk to ensure the consistency of reproducible builds. Signed-off-by: Huang Jianan --- since v2: - Only traverse shared_xattrs_list once to clean up code. since v1: - Use strncmp instead of strcmp. lib/xattr.c | 42 --

Re: [PATCH v2 1/2] erofs-utils: sort shared xattr

2021-12-14 Thread Huang Jianan via Linux-erofs
在 2021/12/15 11:22, Gao Xiang 写道: On Wed, Dec 15, 2021 at 10:43:40AM +0800, Huang Jianan via Linux-erofs wrote: Hi Xiang, 在 2021/12/14 23:31, Gao Xiang 写道: Hi Jianan, On Tue, Dec 14, 2021 at 05:52:01PM +0800, Huang Jianan via Linux-erofs wrote: Sort shared xattr before writing to disk to

Re: [PATCH v2 1/2] erofs-utils: sort shared xattr

2021-12-14 Thread Huang Jianan via Linux-erofs
Hi Xiang, 在 2021/12/14 23:31, Gao Xiang 写道: Hi Jianan, On Tue, Dec 14, 2021 at 05:52:01PM +0800, Huang Jianan via Linux-erofs wrote: Sort shared xattr before writing to disk to ensure the consistency of reproducible builds. Signed-off-by: Huang Jianan I still fail to understand why the

[PATCH 2/2] erofs-utils: tests: add test for xattr

2021-12-14 Thread Huang Jianan via Linux-erofs
Add basic function check for xattr. Signed-off-by: Huang Jianan --- tests/Makefile.am | 3 +++ tests/erofs/019 | 63 + tests/erofs/019.out | 2 ++ 3 files changed, 68 insertions(+) create mode 100755 tests/erofs/019 create mode 100644 tests/e

[PATCH v2 1/2] erofs-utils: sort shared xattr

2021-12-14 Thread Huang Jianan via Linux-erofs
Sort shared xattr before writing to disk to ensure the consistency of reproducible builds. Signed-off-by: Huang Jianan --- since v1: - use strncmp instead of strcmp. lib/xattr.c | 36 ++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/lib/xattr.c

[PATCH v2] erofs-utils: add Apache 2.0 license

2021-12-01 Thread Huang Jianan via Linux-erofs
Let's release liberofs under GPL-2.0+ OR Apache-2.0 license for better integration. Signed-off-by: Huang Jianan --- include/erofs/blobchunk.h | 2 +- include/erofs/block_list.h | 2 +- include/erofs/cache.h | 2 +- include/erofs/compress.h | 2 +- include/erofs/compress_h

[PATCH] erofs-utils: update AUTHORS

2021-12-01 Thread Huang Jianan via Linux-erofs
Add myself to the AUTHORS file. Signed-off-by: Huang Jianan --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 812042a..6b41df8 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,6 +1,7 @@ EROFS USERSPACE UTILITIES M: Li Guifu M: Gao Xiang +M: Huang Jianan R: Ch

Re: [PATCH] erofs: Deadlock caused by kswap work in low memory scenarios

2021-11-22 Thread Huang Jianan via Linux-erofs
在 2021/11/23 10:59, Jianhua1 Hao 郝建华 via Linux-erofs 写道: *We also found that it is easy to cause deadlock in the kswap scene, We observed the following deadlock in the stress test under low memory scenario,****Same as "erofs: fix deadlock when shrink erofs slab".* ** Thread A: Thread B: erof

[PATCH] erofs: fix deadlock when shrink erofs slab

2021-11-18 Thread Huang Jianan via Linux-erofs
We observed the following deadlock in the stress test under low memory scenario: Thread A Thread B - erofs_shrink_scan - erofs_try_to_release_workgroup - erofs_workgroup_try_to_freeze -- A - z_erofs_do_read_page

[PATCH] erofs-utils: check the return value of erofs_d_alloc

2021-11-17 Thread Huang Jianan via Linux-erofs
Need to check whether the allocation of erofs_dentry is successful. Signed-off-by: Huang Jianan --- lib/inode.c | 4 1 file changed, 4 insertions(+) diff --git a/lib/inode.c b/lib/inode.c index 5cbfc78..2fa74e2 100644 --- a/lib/inode.c +++ b/lib/inode.c @@ -162,11 +162,15 @@ int erofs_prep

[PATCH] erofs-utils: fix memory leak when get blob chunk

2021-11-17 Thread Huang Jianan via Linux-erofs
Release memory allocated for chunk before return error. Signed-off-by: Huang Jianan --- lib/blobchunk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/blobchunk.c b/lib/blobchunk.c index 5cbb831..b605b0b 100644 --- a/lib/blobchunk.c +++ b/lib/blobchunk.c @@ -78,6 +78,7 @@ static struct

Re: [PATCH v5 1/2] erofs: add sysfs interface

2021-11-12 Thread Huang Jianan via Linux-erofs
在 2021/11/12 13:36, Gao Xiang 写道: Hi Jianan, On Fri, Nov 12, 2021 at 10:30:02AM +0800, Huang Jianan wrote: Add sysfs interface to configure erofs related parameters later. Signed-off-by: Huang Jianan Reviewed-by: Chao Yu --- since v4: - Resend in a clean chain. since v3: - Add description o

Re: [PATCH] erofs-utils: mkfs: add block list support for chunked files

2021-11-11 Thread Huang Jianan via Linux-erofs
在 2021/11/11 14:17, Gao Xiang 写道: Hi David, On Thu, Nov 11, 2021 at 05:30:31AM +, David Anderson via Linux-erofs wrote: When using the --block-list-file option, add block mapping lines for chunked files. The extent printing code has been slightly refactored to accommodate multiple extent ra

[PATCH v5 1/2] erofs: add sysfs interface

2021-11-11 Thread Huang Jianan via Linux-erofs
Add sysfs interface to configure erofs related parameters later. Signed-off-by: Huang Jianan Reviewed-by: Chao Yu --- since v4: - Resend in a clean chain. since v3: - Add description of sysfs in erofs documentation. since v2: - Check whether t in erofs_attr_store is illegal. - Print raw value

[PATCH v5 2/2] erofs: add sysfs node to control sync decompression strategy

2021-11-11 Thread Huang Jianan via Linux-erofs
Although readpage is a synchronous path, there will be no additional kworker scheduling overhead in non-atomic contexts. So add a sysfs node to allow disable sync decompression. Signed-off-by: Huang Jianan Reviewed-by: Chao Yu --- since v4: - Resend in a clean chain. since v3: - Clean up the sy

Re: [PATCH 2/2] erofs: add sysfs node to control sync decompression strategy

2021-11-11 Thread Huang Jianan via Linux-erofs
在 2021/11/12 4:17, kernel test robot 写道: Hi Huang, Thank you for the patch! Yet something to improve: [auto build test ERROR on xiang-erofs/dev-test] [also build test ERROR on next-2021] [cannot apply to v5.15] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

[PATCH v2 2/2] erofs: add sysfs node to control sync decompression strategy

2021-11-08 Thread Huang Jianan via Linux-erofs
Although readpage is a synchronous path, there will be no additional kworker scheduling overhead in non-atomic contexts. So add a sysfs node to allow disable sync decompression. Signed-off-by: Huang Jianan --- changes since v1: - leave auto default - add a disable strategy for sync_decompress D

[PATCH v2 1/2] erofs: add sysfs interface

2021-11-08 Thread Huang Jianan via Linux-erofs
Add sysfs interface to configure erofs related parameters later. Signed-off-by: Huang Jianan --- changes since v1: - Add sysfs API documentation. - Use sysfs_emit over snprintf. Documentation/ABI/testing/sysfs-fs-erofs | 7 + fs/erofs/Makefile| 2 +- fs/erofs/interna

Re: [PATCH 2/2] erofs: add sysfs node to control sync decompression strategy

2021-11-08 Thread Huang Jianan via Linux-erofs
Hi Xiang, 在 2021/11/9 11:16, Gao Xiang 写道: On Tue, Nov 09, 2021 at 10:54:45AM +0800, Huang Jianan via Linux-erofs wrote: Although readpage is a synchronous path, there will be no additional kworker scheduling overhead in non-atomic contexts. So we can add a sysfs node to allow disable sync

Re: [PATCH 1/2] erofs: add sysfs interface

2021-11-08 Thread Huang Jianan via Linux-erofs
在 2021/11/9 11:14, Joe Perches 写道: On Tue, 2021-11-09 at 10:54 +0800, Huang Jianan wrote: Add sysfs interface to configure erofs related parameters in the future. [] diff --git a/fs/erofs/sysfs.c b/fs/erofs/sysfs.c [] +static ssize_t erofs_attr_show(struct kobject *kobj, +

Re: [PATCH 1/2] erofs: add sysfs interface

2021-11-08 Thread Huang Jianan via Linux-erofs
Hi Xiang, 在 2021/11/9 11:10, Gao Xiang 写道: Hi Jianan, On Tue, Nov 09, 2021 at 10:54:44AM +0800, Huang Jianan via Linux-erofs wrote: You might need to add a "From:" tag here, otherwise, the author will show "Huang Jianan via Linux-erofs" due to your mailing server... I hav

[PATCH 2/2] erofs: add sysfs node to control sync decompression strategy

2021-11-08 Thread Huang Jianan via Linux-erofs
Although readpage is a synchronous path, there will be no additional kworker scheduling overhead in non-atomic contexts. So we can add a sysfs node to allow disable sync decompression. Signed-off-by: Huang Jianan --- fs/erofs/internal.h | 2 +- fs/erofs/super.c| 2 +- fs/erofs/sysfs.c| 6

[PATCH 1/2] erofs: add sysfs interface

2021-11-08 Thread Huang Jianan via Linux-erofs
Add sysfs interface to configure erofs related parameters in the future. Signed-off-by: Huang Jianan --- fs/erofs/Makefile | 2 +- fs/erofs/internal.h | 10 ++ fs/erofs/super.c| 12 +++ fs/erofs/sysfs.c| 239 4 files changed, 262 inserti

Re: [PATCH] erofs-utils: sort shared xattr

2021-10-21 Thread Huang Jianan via Linux-erofs
在 2021/10/21 15:25, Gao Xiang 写道: Hi Jianan, On Thu, Oct 21, 2021 at 10:58:47AM +0800, Huang Jianan via Linux-erofs wrote: Sort shared xattr before writing to disk to ensure the consistency of reproducible builds. How about adding it as an option? Can we consider turning on this by

[PATCH v2] erofs-utils: add dump.erofs to .gitignore

2021-10-21 Thread Huang Jianan via Linux-erofs
The compiled product should be added to gitignore. Signed-off-by: Huang Jianan --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7bc3f58..27403d4 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ stamp-h stamp-h1 /mkfs/mkfs.erofs /fuse/e

[PATCH] erofs-utils: add dump.erofs to .gitignore

2021-10-20 Thread Huang Jianan via Linux-erofs
--- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7bc3f58..27403d4 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ stamp-h stamp-h1 /mkfs/mkfs.erofs /fuse/erofsfuse +/dump/dump.erofs -- 2.25.1

[PATCH] erofs-utils: sort shared xattr

2021-10-20 Thread Huang Jianan via Linux-erofs
Sort shared xattr before writing to disk to ensure the consistency of reproducible builds. --- lib/xattr.c | 34 ++ 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/lib/xattr.c b/lib/xattr.c index 196133a..f17e57e 100644 --- a/lib/xattr.c +++ b/lib/xat

Re: [PATCH v3] ovl: fix null pointer when filesystemdoesn'tsupportdirect IO

2021-09-28 Thread Huang Jianan via Linux-erofs
在 2021/9/27 17:38, Miklos Szeredi 写道: On Wed, Sep 22, 2021 at 04:00:47PM +0200, Miklos Szeredi wrote: First let's fix the oops: ovl_read_iter()/ovl_write_iter() must check real file's ->direct_IO if IOCB_DIRECT is set in iocb->ki_flags and return -EINVAL if not. And here's that fix. Please te

Re: [PATCH v3] ovl: fix null pointer when filesystem doesn't support direct IO

2021-09-22 Thread Huang Jianan via Linux-erofs
在 2021/9/22 16:06, Chengguang Xu 写道: 在 2021/9/22 15:23, Huang Jianan 写道: From: Huang Jianan At present, overlayfs provides overlayfs inode to users. Overlayfs inode provides ovl_aops with noop_direct_IO to avoid open failure with O_DIRECT. But some compressed filesystems, such as erofs and

[PATCH v3] ovl: fix null pointer when filesystem doesn't support direct IO

2021-09-22 Thread Huang Jianan via Linux-erofs
From: Huang Jianan At present, overlayfs provides overlayfs inode to users. Overlayfs inode provides ovl_aops with noop_direct_IO to avoid open failure with O_DIRECT. But some compressed filesystems, such as erofs and squashfs, don't support direct_IO. Users who use f_mapping->a_ops->direct_IO t

Re: [PATCH v2] ovl: fix null pointer when filesystem doesn't support direct IO

2021-09-22 Thread Huang Jianan via Linux-erofs
在 2021/9/22 13:09, Chengguang Xu 写道: 在 2021/9/22 11:47, Huang Jianan 写道: At present, overlayfs provides overlayfs inode to users. Overlayfs inode provides ovl_aops with noop_direct_IO to avoid open failure with O_DIRECT. But some compressed filesystems, such as erofs and squashfs, don't support

[PATCH v2] ovl: fix null pointer when filesystem doesn't support direct IO

2021-09-21 Thread Huang Jianan via Linux-erofs
At present, overlayfs provides overlayfs inode to users. Overlayfs inode provides ovl_aops with noop_direct_IO to avoid open failure with O_DIRECT. But some compressed filesystems, such as erofs and squashfs, don't support direct_IO. Users who use f_mapping->a_ops->direct_IO to check O_DIRECT supp

Re: [PATCH] ovl: fix null pointer when filesystem doesn't support direct IO

2021-09-21 Thread Huang Jianan via Linux-erofs
在 2021/9/22 9:56, Chengguang Xu 写道: 在 2021/9/18 20:13, Huang Jianan 写道: From: Huang Jianan At present, overlayfs provides overlayfs inode to users. Overlayfs inode provides ovl_aops with noop_direct_IO to avoid open failure with O_DIRECT. But some compressed filesystems, such as erofs and squa

[PATCH] ovl: fix null pointer when filesystem doesn't support direct IO

2021-09-18 Thread Huang Jianan via Linux-erofs
From: Huang Jianan At present, overlayfs provides overlayfs inode to users. Overlayfs inode provides ovl_aops with noop_direct_IO to avoid open failure with O_DIRECT. But some compressed filesystems, such as erofs and squashfs, don't support direct_IO. Users who use f_mapping->a_ops->direct_IO t

[PATCH] erofs-utils: tests: check the compress-hints functionality

2021-09-15 Thread Huang Jianan via Linux-erofs
Signed-off-by: Huang Jianan --- tests/Makefile.am | 5 ++- tests/common/rc | 2 +- tests/erofs/017 | 78 + tests/erofs/017.out | 2 ++ 4 files changed, 85 insertions(+), 2 deletions(-) create mode 100755 tests/erofs/017 create mode 100644

Re: [PATCH v1 3/5] dump.erofs: add -S options for collecting statistics of the whole filesystem

2021-09-12 Thread Huang Jianan via Linux-erofs
在 2021/9/12 0:13, Gao Xiang 写道: (+Cc Jianan.) On Sat, Sep 11, 2021 at 09:46:33PM +0800, Guo Xuenan wrote: From: mpiglet Signed-off-by: Guo Xuenan Signed-off-by: mpiglet --- dump/main.c | 474 1 file changed, 474 insertions(+) diff --g

[PATCH] erofs-utils: add support for the full decompressed length

2021-09-12 Thread Huang Jianan via Linux-erofs
Previously, there is no need to get the full decompressed length since EROFS supports partial decompression. However for some other cases such as fiemap, the full decompressed length is necessary for iomap to make it work properly. This patch adds a way to get the full decompressed length. Note th

Re: [PATCH V2] erofs-utils: fix random data for block-aligned uncompressed file

2021-09-07 Thread Huang Jianan via Linux-erofs
在 2021/9/7 21:20, Gao Xiang 写道: On Tue, Sep 07, 2021 at 11:53:45AM +0800, Huang Jianan via Linux-erofs wrote: If the file size is block-aligned for uncompressed files, i_u is meaningless for erofs_inode on disk, but it's not cleared when datalayout is seted in erofs_prepare_inode_buffer.

[PATCH V2] erofs-utils: fix random data for block-aligned uncompressed file

2021-09-06 Thread Huang Jianan via Linux-erofs
If the file size is block-aligned for uncompressed files, i_u is meaningless for erofs_inode on disk, but it's not cleared when datalayout is seted in erofs_prepare_inode_buffer. This problem will cause inconsistent reproducible builds. Clear the entire erofs_inode to zero to fix this. Signed-off

Re: [PATCH] uerofs-utils: fix random data for block-aligned uncompressed file

2021-09-06 Thread Huang Jianan via Linux-erofs
在 2021/9/7 8:46, Gao Xiang 写道: On Tue, Sep 07, 2021 at 08:10:45AM +0800, Gao Xiang wrote: On Mon, Sep 06, 2021 at 04:13:59PM +0800, Huang Jianan via Linux-erofs wrote: If the file size is block-aligned for uncompressed files, i_u is meaningless for erofs_inode on disk, but it's not cl

Re: [PATCH v3] erofs-utils: support per-inode compress pcluster

2021-09-06 Thread Huang Jianan via Linux-erofs
在 2021/9/6 1:59, Gao Xiang 写道: On Wed, Aug 25, 2021 at 11:35:23AM +0800, Huang Jianan via Linux-erofs wrote: Add an option to configure per-inode compression strategy. Each line of the file should be in the following form: When pcluster is 0, it means that the file shouldn't be compr

[PATCH] uerofs-utils: fix random data for block-aligned uncompressed file

2021-09-06 Thread Huang Jianan via Linux-erofs
If the file size is block-aligned for uncompressed files, i_u is meaningless for erofs_inode on disk, but it's not cleared when datalayout is seted in erofs_prepare_inode_buffer. Clear the entire erofs_inode to zero to fix this. Signed-off-by: Huang Jianan --- lib/inode.c | 2 +- 1 file changed,

[PATCH] erofs-utils: remove unnecessary "\n"

2021-09-06 Thread Huang Jianan via Linux-erofs
Signed-off-by: Huang Jianan --- lib/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/inode.c b/lib/inode.c index 5bad75e..0ad703d 100644 --- a/lib/inode.c +++ b/lib/inode.c @@ -744,7 +744,7 @@ int erofs_droid_inode_fsconfig(struct erofs_inode *inode,

[PATCH v2] AOSP: erofs-utils: increase val for WITH_ANDROID option

2021-08-25 Thread Huang Jianan via Linux-erofs
Use larger numbers for AOSP-specific options in case of bump up generic options to >= 256 in the future. Signed-off-by: Huang Jianan --- changes since v1: - use 512 for AOSP-specific options in case of bump up generic options to >= 256 in the future. (Gao Xiang) mkfs/main.c | 16 ---

Re: [PATCH] AOSP: erofs-utils: increase val for WITH_ANDROID option

2021-08-25 Thread Huang Jianan via Linux-erofs
在 2021/8/25 15:25, Gao Xiang 写道: Hi Jianan, On Wed, Aug 25, 2021 at 11:34:16AM +0800, Huang Jianan via Linux-erofs wrote: Subject: AOSP: erofs-utils: increase val for AOSP-specific long options Signed-off-by: Huang Jianan --- mkfs/main.c | 16 1 file changed, 8

[PATCH v3] erofs-utils: support per-inode compress pcluster

2021-08-24 Thread Huang Jianan via Linux-erofs
Add an option to configure per-inode compression strategy. Each line of the file should be in the following form: When pcluster is 0, it means that the file shouldn't be compressed. Signed-off-by: Huang Jianan --- changes since v2: - change compress_rule to compress_hints for better understa

[PATCH] AOSP: erofs-utils: increase val for WITH_ANDROID option

2021-08-24 Thread Huang Jianan via Linux-erofs
Signed-off-by: Huang Jianan --- mkfs/main.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mkfs/main.c b/mkfs/main.c index 10fe14d..9369b72 100644 --- a/mkfs/main.c +++ b/mkfs/main.c @@ -45,10 +45,10 @@ static struct option long_options[] = { #endif

Re: [PATCH v2] erofs-utils: support per-inode compress pcluster

2021-08-24 Thread Huang Jianan via Linux-erofs
在 2021/8/25 9:27, Gao Xiang 写道: On Wed, Aug 25, 2021 at 09:17:38AM +0800, Gao Xiang wrote: On Wed, Aug 18, 2021 at 12:27:15PM +0800, Huang Jianan via Linux-erofs wrote: Add an option to configure per-inode compression strategy. Each line of the file should be in the following form: When

[PATCH v2] erofs-utils: add mkfs.erofs and erofsfuse to .gitignore

2021-08-18 Thread Huang Jianan via Linux-erofs
--- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8bdd505..7bc3f58 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,5 @@ configure.scan libtool stamp-h stamp-h1 - +/mkfs/mkfs.erofs +/fuse/erofsfuse -- 2.25.1

Re: [PATCH] erofs-utils: add mkfs.erofs and erofsfuse to .gitignore

2021-08-18 Thread Huang Jianan via Linux-erofs
On 2021/8/19 0:49, Gao Xiang wrote: On Wed, Aug 18, 2021 at 12:35:39PM +0800, Huang Jianan via Linux-erofs wrote: --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8bdd505..0e54836 100644 --- a/.gitignore +++ b/.gitignore

[PATCH] erofs-utils: add mkfs.erofs and erofsfuse to .gitignore

2021-08-17 Thread Huang Jianan via Linux-erofs
--- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8bdd505..0e54836 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,5 @@ configure.scan libtool stamp-h stamp-h1 - +mkfs.erofs +erofsfuse -- 2.25.1

[PATCH v2] erofs-utils: support per-inode compress pcluster

2021-08-17 Thread Huang Jianan via Linux-erofs
Add an option to configure per-inode compression strategy. Each line of the file should be in the following form: When pcluster is 0, it means that the file shouldn't be compressed. Signed-off-by: Huang Jianan --- changes since v1: - rename c_pclusterblks to c_physical_clusterblks and place

[PATCH] erofs-utils: support per-inode compress pcluster

2021-08-16 Thread Huang Jianan via Linux-erofs
Add an option to configure per-inode compression strategy. Each line of the file should be in the following form: When pcluster is 0, it means that the file shouldn't be compressed. Signed-off-by: Huang Jianan --- include/erofs/compress_rule.h | 25 include/erofs/config.h|

Re: [PATCH v6] iomap: support tail packing inline read

2021-07-22 Thread Huang Jianan via Linux-erofs
Hi Xiang, I have tested this patch based on the erofs dax support below, It works well for me. https://git.kernel.org/pub/scm/linux/kernel/git/xiang/linux.git/log/?h=erofs/dax Tested-by: Huang Jianan Thanks, Jianan On 2021/7/23 9:26, Gao Xiang wrote: Hi Darrick, On Thu, Jul 22, 2021 at

Re: [PATCH v4] AOSP: erofs-utils: add block list support

2021-06-24 Thread Huang Jianan via Linux-erofs
Hi Xiang, This verison works well. Tested-by: Huang Jianan Thanks, Jianan On 2021/6/24 16:04, Gao Xiang wrote: [hsiang...@linux.alibaba.com 与之前向你发送电子邮件的用户相似,但可能不是其人。请访问 http://aka.ms/LearnAboutSenderIdentification,了解这种情况的风险所在。] On Thu, Jun 24, 2021 at 03:02:34PM +0800, Yue Hu wrote: From

Re: [PATCH] AOSP: erofs-utils: add block list support

2021-06-23 Thread Huang Jianan via Linux-erofs
Hi all, This patch works well for us. Tested-by: Huang Jianan Thanks, Jianan On 2021/6/22 11:02, Yue Hu wrote: From: Yue Hu Android update engine will treat EROFS filesystem image as one single file. Let's add block list support to optimize OTA size. Change-Id: I21d6177dff0ee65d3c57023b1

[PATCH] erofs-utils: remove duplicate __func__ print

2021-04-20 Thread Huang Jianan via Linux-erofs
__func__ has been printed in the macro definition of erofs_err. Signed-off-by: Huang Jianan --- lib/inode.c | 4 ++-- lib/xattr.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/inode.c b/lib/inode.c index 40189fe..b964b98 100644 --- a/lib/inode.c +++ b/lib/inode.c @

[PATCH 2/2] erofs: use sync decompression for atomic contexts only

2021-03-16 Thread Huang Jianan via Linux-erofs
Sync decompression was introduced to get rid of additional kworker scheduling overhead. But there is no such overhead in non-atomic contexts. Therefore, it should be better to turn off sync decompression to avoid the current thread waiting in z_erofs_runqueue. Signed-off-by: Huang Jianan Signed-o

[PATCH 0/2] erofs: decompress in endio if possible

2021-03-16 Thread Huang Jianan via Linux-erofs
This patch set was separated form erofs: decompress in endio if possible since it does these things: - combine dm-verity and erofs workqueue - change policy of decompression in context of thread Huang Jianan (2): erofs: use workqueue decompression for atomic contexts only erofs: use sync deco

[PATCH 1/2] erofs: use workqueue decompression for atomic contexts only

2021-03-16 Thread Huang Jianan via Linux-erofs
z_erofs_decompressqueue_endio may not be executed in the atomic context, for example, when dm-verity is turned on. In this scenario, data can be decompressed directly to get rid of additional kworker scheduling overhead. Signed-off-by: Huang Jianan Signed-off-by: Guo Weichao Reviewed-by: Gao Xia

Re: [PATCH v6 2/2] erofs: decompress in endio if possible

2021-03-16 Thread Huang Jianan via Linux-erofs
On 2021/3/16 16:26, Chao Yu wrote: Hi Jianan, On 2021/3/16 11:15, Huang Jianan via Linux-erofs wrote: z_erofs_decompressqueue_endio may not be executed in the atomic context, for example, when dm-verity is turned on. In this scenario, data can be decompressed directly to get rid of

[PATCH v6 2/2] erofs: decompress in endio if possible

2021-03-15 Thread Huang Jianan via Linux-erofs
z_erofs_decompressqueue_endio may not be executed in the atomic context, for example, when dm-verity is turned on. In this scenario, data can be decompressed directly to get rid of additional kworker scheduling overhead. Also, it makes no sense to apply synchronous decompression for such case. Sig

[PATCH v6 1/2] erofs: avoid memory allocation failure during rolling decompression

2021-03-15 Thread Huang Jianan via Linux-erofs
Currently, err would be treated as io error. Therefore, it'd be better to ensure memory allocation during rolling decompression to avoid such io error. In the long term, we might consider adding another !Uptodate case for such case. Signed-off-by: Huang Jianan Signed-off-by: Guo Weichao Reviewe

[PATCH v4 2/2] erofs: decompress in endio if possible

2021-03-05 Thread Huang Jianan via Linux-erofs
z_erofs_decompressqueue_endio may not be executed in the atomic context, for example, when dm-verity is turned on. In this scenario, data can be decompressed directly to get rid of additional kworker scheduling overhead. Also, it makes no sense to apply synchronous decompression for such case. Sig

Re: [PATCH v2 2/2] erofs: decompress in endio if possible

2021-03-05 Thread Huang Jianan via Linux-erofs
On 2021/3/5 16:08, Huang Jianan wrote: z_erofs_decompressqueue_endio may not be executed in the atomic context, for example, when dm-verity is turned on. In this scenario, data can be decompressed directly to get rid of additional kworker scheduling overhead. Also, it makes no sense to apply sy

[PATCH v2 1/2] erofs: avoid memory allocation failure during rolling decompression

2021-03-05 Thread Huang Jianan via Linux-erofs
Currently, err would be treated as io error. Therefore, it'd be better to ensure memory allocation during rolling decompression to avoid such io error. In the long term, we might consider adding another !Uptodate case for such case. Signed-off-by: Huang Jianan Signed-off-by: Guo Weichao --- fs

[PATCH 1/2] erofs: avoid memory allocation failure during rolling decompression

2021-03-04 Thread Huang Jianan via Linux-erofs
It should be better to ensure memory allocation during rolling decompression to avoid io error. Signed-off-by: Huang Jianan Signed-off-by: Guo Weichao --- fs/erofs/decompressor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/erofs/decompressor.c b/fs/erofs/decompressor.

[PATCH 2/2] erofs: decompress in endio if possible

2021-03-04 Thread Huang Jianan via Linux-erofs
z_erofs_decompressqueue_endio may not be executed in the interrupt context, for example, when dm-verity is turned on. In this scenario, io should be decompressed directly to avoid additional scheduling overhead. Also there is no need to wait for endio to execute synchronous decompression. Signed-o

[PATCH v3] erofs: support adjust lz4 history window size

2021-02-22 Thread Huang Jianan via Linux-erofs
lz4 uses LZ4_DISTANCE_MAX to record history preservation. When using rolling decompression, a block with a higher compression ratio will cause a larger memory allocation (up to 64k). It may cause a large resource burden in extreme cases on devices with small memory and a large number of concurrent

[PATCH v3] erofs-utils: support adjust lz4 history window size

2021-02-22 Thread Huang Jianan via Linux-erofs
lz4 uses LZ4_DISTANCE_MAX to record history preservation. When using rolling decompression, a block with a higher compression ratio will cause a larger memory allocation (up to 64k). It may cause a large resource burden in extreme cases on devices with small memory and a large number of concurrent

[PATCH v2] erofs-utils: support adjust lz4 history window size

2021-02-22 Thread Huang Jianan via Linux-erofs
lz4 uses LZ4_DISTANCE_MAX to record history preservation. When using rolling decompression, a block with a higher compression ratio will cause a larger memory allocation (up to 64k). It may cause a large resource burden in extreme cases on devices with small memory and a large number of concurrent

[PATCH v2] erofs: support adjust lz4 history window size

2021-02-22 Thread Huang Jianan via Linux-erofs
From: huangjianan lz4 uses LZ4_DISTANCE_MAX to record history preservation. When using rolling decompression, a block with a higher compression ratio will cause a larger memory allocation (up to 64k). It may cause a large resource burden in extreme cases on devices with small memory and a large n

Re: [PATCH] erofs: support adjust lz4 history window size

2021-02-22 Thread Huang Jianan via Linux-erofs
Hi Xiang, On 2021/2/22 12:44, Gao Xiang wrote: Hi Jianan, On Thu, Feb 18, 2021 at 08:00:49PM +0800, Huang Jianan via Linux-erofs wrote: From: huangjianan lz4 uses LZ4_DISTANCE_MAX to record history preservation. When using rolling decompression, a block with a higher compression ratio will

[PATCH] erofs: support adjust lz4 history window size

2021-02-18 Thread Huang Jianan via Linux-erofs
From: huangjianan lz4 uses LZ4_DISTANCE_MAX to record history preservation. When using rolling decompression, a block with a higher compression ratio will cause a larger memory allocation (up to 64k). It may cause a large resource burden in extreme cases on devices with small memory and a large n

[PATCH] erofs-utils: support adjust lz4 history window size

2021-02-18 Thread Huang Jianan via Linux-erofs
lz4 uses LZ4_DISTANCE_MAX to record history preservation. When using rolling decompression, a block with a higher compression ratio will cause a larger memory allocation (up to 64k). It may cause a large resource burden in extreme cases on devices with small memory and a large number of concurrent