Re: [PATCH v6] erofs: free pclusters if no cached folio is attached

2024-11-11 Thread Gao Xiang
On 2024/11/12 12:32, Chunhai Guo wrote: Once a pcluster is fully decompressed and there are no attached cached folios, its corresponding `struct z_erofs_pcluster` will be freed. This will significantly reduce the frequency of calls to erofs_shrink_scan() and the memory allocated for `struct z_

[PATCH v6] erofs: free pclusters if no cached folio is attached

2024-11-11 Thread Chunhai Guo via Linux-erofs
Once a pcluster is fully decompressed and there are no attached cached folios, its corresponding `struct z_erofs_pcluster` will be freed. This will significantly reduce the frequency of calls to erofs_shrink_scan() and the memory allocated for `struct z_erofs_pcluster`. The tables below show appro

Re: [PATCH v5] erofs: free pclusters if no cached folio is attached

2024-11-11 Thread Gao Xiang
On 2024/11/12 12:11, Chunhai Guo wrote: Once a pcluster is fully decompressed and there are no attached cached folios, its corresponding `struct z_erofs_pcluster` will be freed. This will significantly reduce the frequency of calls to erofs_shrink_scan() and the memory allocated for `struct z_

[PATCH v5] erofs: free pclusters if no cached folio is attached

2024-11-11 Thread Chunhai Guo via Linux-erofs
Once a pcluster is fully decompressed and there are no attached cached folios, its corresponding `struct z_erofs_pcluster` will be freed. This will significantly reduce the frequency of calls to erofs_shrink_scan() and the memory allocated for `struct z_erofs_pcluster`. The tables below show appro

Re: [PATCH] erofs: clean up the cache if cached decompression is disabled

2024-11-11 Thread Gao Xiang
On 2024/11/12 11:15, Chunhai Guo wrote: Clean up the cache when cached decompression strategy is changed to EROFS_ZIP_CACHE_DISABLED by remount. Signed-off-by: Chunhai Guo --- fs/erofs/super.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fs/erofs/super.c b/fs/erofs/super.c ind

[PATCH] erofs: clean up the cache if cached decompression is disabled

2024-11-11 Thread Chunhai Guo via Linux-erofs
Clean up the cache when cached decompression strategy is changed to EROFS_ZIP_CACHE_DISABLED by remount. Signed-off-by: Chunhai Guo --- fs/erofs/super.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fs/erofs/super.c b/fs/erofs/super.c index 320d586c3896..de2af862e65b 100644 --- a/fs/e

Re: [PATCH v4] erofs: free pclusters if no cached folio attached

2024-11-11 Thread Gao Xiang
Just two extra minor nits... First, the subject line would be "erofs: free pclusters if no cached folio is attached" On 2024/11/11 19:38, Chunhai Guo wrote: Once a pcluster is fully decompressed and there are no attached cached folios, its corresponding `struct z_erofs_pcluster` will be freed.

[PATCH v2] erofs-utils: lib: capture errors from {mkfs,rebuild}_handle_inode()

2024-11-11 Thread Hongzhen Luo
Currently, the error code returned by erofs_{mkfs,rebuild}_handle_inode() in erofs_mkfs_dump_tree() may be ignored. This patch introduces `err2` to capture errors from {mkfs,rebuild}_handle_inode(). Signed-off-by: Hongzhen Luo --- v2: Clean up the patch and revise the commit message. v1: https:/

Re: [PATCH] erofs-utils: lib: capture errors from {mkfs,rebuild}_handle_inode()

2024-11-11 Thread Gao Xiang
On 2024/11/11 19:09, Hongzhen Luo wrote: Currently, the error code returned by erofs_{mkfs,rebuild}_handle_inode() in erofs_mkfs_dump_tree() may be ignored. This patch introduces `err1` and `err2` to capture errors from the {mkfs,rebuild}_handle_inode() functions. Signed-off-by: Hongzhen Luo

Re: [PATCH] erofs: add sysfs node to control cached decompression strategy

2024-11-11 Thread Gao Xiang
On 2024/11/11 19:10, Chunhai Guo wrote: 在 2024/11/11 10:28, Gao Xiang 写道: Hi Chunhai, On 2024/11/1 20:42, Chunhai Guo wrote: Add sysfs node to control cached decompression strategy, and all the cache will be cleaned up when the strategy is set to EROFS_ZIP_CACHE_DISABLED. Signed-off-by: Ch

Re: [PATCH v2] mkfs: Fix input offset counting in headerball mode

2024-11-11 Thread Gao Xiang
Hi Mike, On 2024/11/12 00:48, Mike Baynton wrote: When using --tar=headerball, most files included in the headerball are not included in the EROFS image. mkfs.erofs typically exits prematurely, having processed non-USTAR blocks as USTAR and believing they are end-of-archive markers. (Other failu

[PATCH v2] mkfs: Fix input offset counting in headerball mode

2024-11-11 Thread Mike Baynton
When using --tar=headerball, most files included in the headerball are not included in the EROFS image. mkfs.erofs typically exits prematurely, having processed non-USTAR blocks as USTAR and believing they are end-of-archive markers. (Other failure modes are probably also possible if the input stre

Re: [PATCH v2 0/5] fscache/cachefiles: Some bugfixes

2024-11-11 Thread Christian Brauner via Linux-erofs
On Thu, 07 Nov 2024 19:06:44 +0800, Zizhi Wo wrote: > Changes since V1[1]: > - Removed some incorrect patches. > - Modified the description of the first patch. > - Modified the fourth patch to move fput out of lock execution. > > Recently, I sent the first version of the patch series. After som

[PATCH v4] erofs: free pclusters if no cached folio attached

2024-11-11 Thread Chunhai Guo via Linux-erofs
Once a pcluster is fully decompressed and there are no attached cached folios, its corresponding `struct z_erofs_pcluster` will be freed. This will significantly reduce the frequency of calls to erofs_shrink_scan() and the memory allocated for `struct z_erofs_pcluster`. The tables below show appro

Re: [PATCH] erofs: add sysfs node to control cached decompression strategy

2024-11-11 Thread Chunhai Guo via Linux-erofs
在 2024/11/11 10:28, Gao Xiang 写道: > Hi Chunhai, > > On 2024/11/1 20:42, Chunhai Guo wrote: >> Add sysfs node to control cached decompression strategy, and all the >> cache will be cleaned up when the strategy is set to >> EROFS_ZIP_CACHE_DISABLED. >> >> Signed-off-by: Chunhai Guo > I guess remount

[PATCH] erofs-utils: lib: capture errors from {mkfs,rebuild}_handle_inode()

2024-11-11 Thread Hongzhen Luo
Currently, the error code returned by erofs_{mkfs,rebuild}_handle_inode() in erofs_mkfs_dump_tree() may be ignored. This patch introduces `err1` and `err2` to capture errors from the {mkfs,rebuild}_handle_inode() functions. Signed-off-by: Hongzhen Luo --- lib/inode.c | 14 +++--- 1 file

Re: [PATCH v3] erofs: free pclusters if no cached folio attached

2024-11-11 Thread Gao Xiang
Hi Chunhai, On 2024/11/11 16:25, Chunhai Guo wrote: Once a pcluster is fully decompressed and there are no attached cached folios, its corresponding `struct z_erofs_pcluster` will be freed. This will significantly reduce the frequency of calls to erofs_shrink_scan() and the memory allocated for

[PATCH v2] erofs-utils: lib: rearrange struct erofs_configure

2024-11-11 Thread Hongzhen Luo
Move the fields controlled by the NDEBUG macro to the end to maintain a consistent layout for preceding variables. It addresses cases where a third-party application does not define NDEBUG while erofs-utils does. Ideally, third-party applications should use the same macros as erofs-utils to get a

Re: [PATCH] erofs-utils: lib: rearrange struct erofs_configure

2024-11-11 Thread Gao Xiang
On 2024/11/11 17:35, Hongzhen Luo wrote: Move the content defined by the NDEBUG macro to the end. Move the fields controlled by the NDEBUG macro to the end to maintain a consistent layout for preceding variables. It addresses cases where a third-party application defines NDEBUG while erofs-

[PATCH] erofs-utils: lib: rearrange struct erofs_configure

2024-11-11 Thread Hongzhen Luo
Move the content defined by the NDEBUG macro to the end. The reason for doing this is to maintain a consistent layout for all preceding variables when a third-party application defines NDEBUG while erofs-utils does not (by default). Fixes: ad6c80dc168d ("erofs-utils: lib: add erofs_get_configure()

Re: [PATCH v4 00/33] netfs: Read performance improvements and "single-blob" support

2024-11-11 Thread Christian Brauner via Linux-erofs
On Fri, 08 Nov 2024 17:32:01 +, David Howells wrote: > This set of patches is primarily about two things: improving read > performance and supporting monolithic single-blob objects that have to be > read/written as such (e.g. AFS directory contents). The implementation of > the two parts is in

[PATCH v3] erofs: free pclusters if no cached folio attached

2024-11-11 Thread Chunhai Guo via Linux-erofs
Once a pcluster is fully decompressed and there are no attached cached folios, its corresponding `struct z_erofs_pcluster` will be freed. This will significantly reduce the frequency of calls to erofs_shrink_scan() and the memory allocated for `struct z_erofs_pcluster`. The tables below show appro