[PATCH 2/2] erofs-utils: add per-sbi buffer support

2024-07-10 Thread Hongzhen Luo
This updates all relevant function definitions and callers to get rid of the global g_sbi, making it suitable for external use in liberofs. Signed-off-by: Hongzhen Luo --- include/erofs/cache.h| 42 ++ include/erofs/internal.h | 5 +- lib/blobchunk.c | 20 ++--- lib/cach

Re: [PATCH 2/2] erofs-utils: add per-sbi buffer support

2024-07-10 Thread Gao Xiang
On 2024/7/10 14:59, Hongzhen Luo wrote: This updates all relevant function definitions and callers to get rid of the global g_sbi, making it suitable for external use in liberofs. Signed-off-by: Hongzhen Luo --- include/erofs/cache.h| 42 ++ include/erofs/internal.h | 5 +-

[PATCH v2 1/2] erofs-utils: lib/cache.c: replace &g_sbi with sbi

2024-07-10 Thread Hongzhen Luo
Prepare for the upcoming per-sbi buffer. Signed-off-by: Hongzhen Luo --- v2: Changes since v1: remain unchanged v1: https://lore.kernel.org/all/20240710065929.114911-1-hongz...@linux.alibaba.com/ --- include/erofs/cache.h | 9 ++--- lib/cache.c | 28 +---

[PATCH v2 2/2] erofs-utils: add per-sbi buffer support

2024-07-10 Thread Hongzhen Luo
This updates all relevant function definitions and callers to get rid of the global g_sbi, making it suitable for external use in liberofs. Signed-off-by: Hongzhen Luo --- v2: Changes since v1: utilize `bb->buffers.fsprivate` to store `sbi` to minimize code changes. v1: https://lore.kernel.org

[PATCH] erofs: get rid of z_erofs_map_blocks_iter_* tracepoints

2024-07-10 Thread Hongzhen Luo
Consolidate them under erofs_map_blocks_* for simplicity since we have many other ways to know if a given inode is compressed or not. Signed-off-by: Hongzhen Luo --- fs/erofs/zmap.c | 4 ++-- include/trace/events/erofs.h | 32 +++- 2 files changed, 5 in

Re: [PATCH] erofs: get rid of z_erofs_map_blocks_iter_* tracepoints

2024-07-10 Thread Gao Xiang
On 2024/7/10 16:34, Hongzhen Luo wrote: Consolidate them under erofs_map_blocks_* for simplicity since we have many other ways to know if a given inode is compressed or not. Redundant blank line. I will remove it manually. Signed-off-by: Hongzhen Luo Otherwise it looks good to me, R

[PATCH] erofs: avoid refcounting short-lived pages

2024-07-10 Thread Gao Xiang
LZ4 always reuses the decompressed buffer as its LZ77 sliding window (dynamic dictionary) for optimal performance. However, in specific cases, the output buffer may not fully contain valid page cache pages, resulting in the use of short-lived pages for temporary purposes. Due to the limited slidi