[PATCH v2] erofs: remove dead code in erofs_fc_parse_param

2025-01-17 Thread Chen Linxuan
If an option is unknown to erofs, which means that option is not in `erofs_fs_parameters`, `fs_parse` will return -ENOPARAM, which makes `erofs_fc_parse_param` returns earlier. Signed-off-by: Chen Linxuan --- Change Log: v1->v2: Improve "erofs: add error log in erofs_fc_parse_param&

Re: [PATCH] erofs: add error log in erofs_fc_parse_param

2025-01-17 Thread Chen Linxuan
On Fri, 2025-01-17 at 17:54 +0800, Gao Xiang wrote: > > On 2025/1/17 17:50, Chen Linxuan wrote: > > On Fri, 2025-01-17 at 17:28 +0800, Gao Xiang wrote: > > > Hi Linxuan, > > > > > > On 2025/1/17 16:52, Chen Linxuan wrote: > > > > While read

Re: [PATCH] erofs: add error log in erofs_fc_parse_param

2025-01-17 Thread Chen Linxuan
On Fri, 2025-01-17 at 17:54 +0800, Gao Xiang wrote: > > On 2025/1/17 17:50, Chen Linxuan wrote: > > On Fri, 2025-01-17 at 17:28 +0800, Gao Xiang wrote: > > > Hi Linxuan, > > > > > > On 2025/1/17 16:52, Chen Linxuan wrote: > > > > While read

Re: [PATCH] erofs: add error log in erofs_fc_parse_param

2025-01-17 Thread Chen Linxuan
On Fri, 2025-01-17 at 17:28 +0800, Gao Xiang wrote: > Hi Linxuan, > > On 2025/1/17 16:52, Chen Linxuan wrote: > > While reading erofs code, I notice that `erofs_fc_parse_param` will > > return -ENOPARAM, which means that erofs do not support this option, > > without rep

[PATCH] erofs: add error log in erofs_fc_parse_param

2025-01-17 Thread Chen Linxuan
, `fs_parse` will return -ENOPARAM, which means that `erofs_fs_parameters` should has returned earlier. Entering `default` means `fs_parse` return something we unexpected. I am not sure about it but I think we should return -EINVAL here, just like `xfs_fs_parse_param`. Signed-off-by: Chen Linxuan

Re: [PATCH] erofs(shrinker): return SHRINK_EMPTY if no objects to free

2025-01-16 Thread Chen Linxuan
On Thu, 2025-01-16 at 16:45 +0800, Gao Xiang wrote: > > On 2025/1/16 16:24, Chen Linxuan wrote: > > On Thu, 2025-01-16 at 15:51 +0800, Gao Xiang wrote: > > > Hi Linxuan, > > > > > > On 2025/1/16 15:20, Chen Linxuan wrote: > > > >

[PATCH v2] erofs(shrinker): return SHRINK_EMPTY if no objects to free

2025-01-16 Thread Chen Linxuan
t > be determined or shrinker should skip this cache for this time > (e.g., their number is below shrinkable limit). Signed-off-by: Chen Linxuan --- fs/erofs/zutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/erofs/zutil.c b/fs/erofs/zutil.c index 0dd65cefce33..83fbcab

Re: [PATCH] erofs(shrinker): return SHRINK_EMPTY if no objects to free

2025-01-16 Thread Chen Linxuan
On Thu, 2025-01-16 at 15:51 +0800, Gao Xiang wrote: > Hi Linxuan, > > On 2025/1/16 15:20, Chen Linxuan wrote: > > Comments in file include/linux/shrinker.h says that > > `count_objects` of `struct shrinker` should return SHRINK_EMPTY > > when there are no objects to fr

[PATCH] erofs(shrinker): return SHRINK_EMPTY if no objects to free

2025-01-15 Thread Chen Linxuan
t > be determined or shrinker should skip this cache for this time > (e.g., their number is below shrinkable limit). Signed-off-by: Chen Linxuan --- fs/erofs/zutil.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/erofs/zutil.c b/fs/erofs/zutil.c index 0dd65cefce33..

Re: [PATCH] build: support building static library

2024-06-05 Thread Chen Linxuan
On 2024/6/6 11:13, Gao Xiang wrote: On 2024/6/6 11:06, Chen Linxuan wrote: On 2024/6/6 10:45, Gao Xiang wrote: On 2024/6/6 10:25, Chen Linxuan wrote: Hi, On 2024/6/6 10:22, Gao Xiang wrote: Hi, On 2024/6/6 10:13, Chen Linxuan wrote: Hi Xiang! On 2024/5/23 16:05, Gao Xiang wrote: Hi

Re: [PATCH] build: support building static library

2024-06-05 Thread Chen Linxuan
On 2024/6/6 10:45, Gao Xiang wrote: On 2024/6/6 10:25, Chen Linxuan wrote: Hi, On 2024/6/6 10:22, Gao Xiang wrote: Hi, On 2024/6/6 10:13, Chen Linxuan wrote: Hi Xiang! On 2024/5/23 16:05, Gao Xiang wrote: Hi Comix! On 2024/5/23 15:31, ComixHe wrote: In some cases, developer may need

Re: [PATCH] build: support building static library

2024-06-05 Thread Chen Linxuan
Hi, On 2024/6/6 10:22, Gao Xiang wrote: Hi, On 2024/6/6 10:13, Chen Linxuan wrote: Hi Xiang! On 2024/5/23 16:05, Gao Xiang wrote: Hi Comix! On 2024/5/23 15:31, ComixHe wrote: In some cases, developer may need to integrate erofs-utils into their proejct as a static library to reduce

Re: [PATCH] build: support building static library

2024-06-05 Thread Chen Linxuan
Hi Xiang! On 2024/5/23 16:05, Gao Xiang wrote: Hi Comix! On 2024/5/23 15:31, ComixHe wrote: In some cases, developer may need to integrate erofs-utils into their proejct as a static library to reduce package dependencies and have more finer control over the feature used by the project. Thank

[PATCH] erofs-utils: erofs-utils: lib: fix dev_read

2022-10-20 Thread Chen Linxuan
pread call. I write this little patch try to fix this issue. Signed-off-by: Chen Linxuan --- lib/io.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/lib/io.c b/lib/io.c index 524cfb4..ccd433f 100644 --- a/lib/io.c +++ b/lib/io.c @@ -256,7 +256,7