Re: [PATCH] erofs: get rid of unneeded GFP_NOFS

2024-01-23 Thread Gao Xiang
On 2024/1/24 11:19, Jingbo Xu wrote: Clean up some leftovers since there is no way for EROFS to be called again from a reclaim context. Signed-off-by: Jingbo Xu Looks good to me, will test this later: Reviewed-by: Gao Xiang Thanks, Gao Xiang

Re: [PATCH 06/10] cachefiles, erofs: Fix NULL deref in when cachefiles is not doing ondemand-mode

2024-01-22 Thread Gao Xiang
rted-by: Marc Dionne Signed-off-by: David Howells cc: Gao Xiang cc: Chao Yu cc: Yue Hu cc: Jeffle Xu cc: linux-erofs@lists.ozlabs.org cc: ne...@lists.linux.dev cc: linux-fsde...@vger.kernel.org Looks good to me, thanks for fixing this: Reviewed-by: Gao Xiang Thanks, Gao Xiang

Re: [PATCH] erofs: make iov_iter describe target buffer when read from fscache

2024-01-21 Thread Gao Xiang
o = kzalloc(sizeof(*io), GFP_KERNEL); if (!io) return NULL; io->end_io = erofs_fscache_req_end_io; io->private = req; refcount_inc(>ref); refcount_set(>ref, 1); return io; Thanks, Gao Xiang

Re: [PATCH v2] erofs: add a global page pool for lz4 decompression

2024-01-21 Thread Gao Xiang
Hi Chunhai, On 2024/1/12 09:58, Chunhai Guo wrote: On 2024/1/10 14:45, Chunhai Guo wrote: On 2024/1/9 21:08, Gao Xiang wrote: [你通常不会收到来自 hsiang...@linux.alibaba.com 的电子邮件。请访问 https://aka.ms/LearnAboutSenderIdentification,以了解这一点为什么很重要] Hi Chunhai, On 2024/1/9 15:41, Chunhai Guo wrote: Using

Re: [PATCH v2] erofs: relaxed temporary buffers allocation on readahead

2024-01-21 Thread Gao Xiang
On 2024/1/22 11:49, Chunhai Guo wrote: On 2024/1/22 10:07, Gao Xiang wrote: [你通常不会收到来自 hsiang...@linux.alibaba.com 的电子邮件。请访问 https://aka.ms/LearnAboutSenderIdentification,以了解这一点为什么很重要] On 2024/1/20 22:55, Chunhai Guo wrote: Even with inplace decompression, sometimes extra temporary

Re: [PATCH v2] erofs: relaxed temporary buffers allocation on readahead

2024-01-21 Thread Gao Xiang
the updated commit message and I will update the commit manually. Otherwise it looks good to me, Thanks, Gao Xiang multi-app launch benchmark workload [1] on ARM64 Android devices running the 5.15 kernel with an 8-core CPU and 8GB of memory. [1] https://lore.kernel.org/r/20240109074143.4138783-1

Re: [PATCH] erofs-utils: introduce GitHub Actions CI

2024-01-20 Thread Gao Xiang
viously it already checked enwik8 correctness in the Github CI, see: https://github.com/erofs/erofsnightly/blob/main/.github/workflows/smoking.yml#L185 If you would like to add a Github CI for Linux codebase, please update https://github.com/erofs/erofsnightly/actions nightly CI instead. Thanks, Gao

Re: [PATCH v3 2/3] erofs-utils: mkfs: allow to specify dictionary size for compression algorithms

2024-01-20 Thread Gao Xiang
ion levels. Now, the > compression level is specified with -zX,level= options and could > be specified together with dictsize. The old -zX, form is still > supported for compatibility. > > Suggested-by: Gao Xiang > Signed-off-by: Yifan Zhao I cannot apply this patch. The error

[GIT PULL] erofs fixes for 6.8-rc1

2024-01-18 Thread Gao Xiang
@debian Thanks, Gao Xiang The following changes since commit 0dd3ee31125508cd67f7e7172247f05b7fd1753a: Linux 6.7 (2024-01-07 12:18:38 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git tags/erofs-for-6.8-rc1-fixes for you to fetch

Re: [PATCH 3/3] erofs-utils: mkfs: reorganize logic in erofs_compressor_init()

2024-01-17 Thread Gao Xiang
Hi Yifan, Note that I don't have more useful comments of this one. Let's see how PATCHSET v2 works first. Thanks, Gao Xiang On 2024/1/7 02:11, Yifan Zhao wrote: Currently, the initialization of compressors is weird: init() is called first, followed by setlevel(), then setdictsize

Re: [PATCH 2/3] erofs-utils: mkfs: allow to specify dictionary size for compression algorithms

2024-01-17 Thread Gao Xiang
the way to specify compression levels. Now, the compression level is specified with -zX,level= options and could be specified together with dictsize. The old -zX, way is still The old -zX, form is still... supported for compatibility. Suggested-by: Gao Xiang Signed-off-by: Yifan Zhao --- include

[PATCH] erofs-utils: avoid noisy prints if stdout is not a tty

2024-01-15 Thread Gao Xiang
Signed-off-by: Gao Xiang --- lib/config.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/lib/config.c b/lib/config.c index 0cddc95..aa3dd1f 100644 --- a/lib/config.c +++ b/lib/config.c @@ -7,6 +7,7 @@ #include #include #include +#include

[PATCH] erofs-utils: lib: use dummy_pivot to dedupe the beginnings of files

2024-01-15 Thread Gao Xiang
The beginnings of files are incorrectly skipped for deduplication, which causes unexpected image size regression. Fix it. Reported-by: Yifan Zhao Fixes: 8ead5f8bd38c ("erofs-utils: lib: generate compression indexes in memory first") Signed-off-by: Gao Xiang --- lib/compress.c | 9 ++

[PATCH v3 3/4] erofs: Don't use certain unnecessary folio_*() functions

2024-01-15 Thread Gao Xiang
Cc: linux-erofs@lists.ozlabs.org Cc: linux-fsde...@vger.kernel.org Signed-off-by: Gao Xiang --- change since v2: - update the words s/internal/unnecessary/ in the subject line pointed out by Matthew. fs/erofs/fscache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/erofs

Re: [PATCH v2 3/4] erofs: Don't use certain internal folio_*() functions

2024-01-15 Thread Gao Xiang
Hi Matthew, On 2024/1/15 22:06, Matthew Wilcox wrote: On Mon, Jan 15, 2024 at 04:33:37PM +0800, Gao Xiang wrote: From: David Howells Filesystems should use folio->index and folio->mapping, instead of folio_index(folio), folio_mapping() and folio_file_mapping() since they know tha

[PATCH v2 3/4] erofs: Don't use certain internal folio_*() functions

2024-01-15 Thread Gao Xiang
Cc: linux-erofs@lists.ozlabs.org Cc: linux-fsde...@vger.kernel.org Signed-off-by: Gao Xiang --- Hi folks, I tend to apply this patch upstream since compressed data fscache adaption touches this part too. If there is no objection, I'm going to take this patch separately for -next shortly.. Thanks, Gao Xian

[PATCH v2 3/4] erofs: Don't use certain internal folio_*() functions

2024-01-15 Thread Gao Xiang
Cc: linux-erofs@lists.ozlabs.org Cc: linux-fsde...@vger.kernel.org Signed-off-by: Gao Xiang --- Hi folks, I tend to apply this patch upstream since compressed data fscache adaption touches this part too. If there is no objection, I'm going to take this patch separately for -next shortly.. Thanks, Gao Xian

Re: [PATCH 1/3] erofs-utils: mkfs: merge erofs_compressor_setlevel() into erofs_compressor_init()

2024-01-13 Thread Gao Xiang
ssor_init(). > > BTW, if the user gives a compression level to an algorithm which doesn't > support it, let's report a warning rather than early aborting. Besides, Really, we should error out invalid standard compression levels instead of just ignoring. Thanks, Gao Xiang > we do not need to ass

[PATCH v3] erofs: fix inconsistent per-file compression format

2024-01-13 Thread Gao Xiang
uest. Incorrect !erofs_sb_has_compr_cfgs preset bitmap is now fixed together since it was harmless previously. Reported-by: Fixes: 8f89926290c4 ("erofs: get compression algorithms directly on mapping") Fixes: 622ceaddb764 ("erofs: lzma compression support") Reviewed-by: Yue Hu S

some update // Re: [GIT PULL] erofs updates for 6.8-rc1

2024-01-10 Thread Gao Xiang
ntial merge conflict is observed. Sorry again, Gao Xiang The following changes since commit 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab: Linux 6.7-rc3 (2023-11-26 19:59:33 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git tags

Re: [PATCH 3/4] erofs: Don't use certain internal folio_*() functions

2024-01-09 Thread Gao Xiang
ing/g' fs/erofs/*.c perl -p -i -e 's/folio_file_mapping[(]([^)]*)[)]/\1->mapping/g' fs/erofs/*.c perl -p -i -e 's/folio_index[(]([^)]*)[)]/\1->index/g' fs/erofs/*.c Reported-by: Matthew Wilcox Signed-off-by: David Howells cc: Gao Xiang cc: Chao Yu cc: Yue Hu cc: Jeffle Xu cc: linux-erofs@l

Re: mkfs.erofs is noisy when run with a pipe attached to stdout/stderr

2024-01-09 Thread Gao Xiang
to mkfs.erofs. Could mkfs.erofs be updated to not print a separate line for each file when stdout/stderr are not ttys? Thanks for the report. It's helpful and let me investigate and fix the non-tty cases. Thanks, Gao Xiang Cheers, Daan De Meyer

Re: [PATCH v2] erofs: add a global page pool for lz4 decompression

2024-01-09 Thread Gao Xiang
these days. Also it would be better to add some results of changing max_distance if you have more time to test. Thanks, Gao Xiang

Re: [PATCH 5/6] cachefiles: Fix signed/unsigned mixup

2024-01-09 Thread Gao Xiang
files: Fix __cachefiles_prepare_write()") Reported-by: Simon Horman Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401071152.dbkqmqmu-...@intel.com/ Signed-off-by: David Howells Reviewed-by: Simon Horman cc: Gao Xiang cc: Yiqun Leng cc: Jia Zhu cc: Jeff

[GIT PULL] erofs updates for 6.8-rc1

2024-01-07 Thread Gao Xiang
can be parsed on arm64 cloud servers using 64k page size.) In addition, there are several bugfixes and cleanups as usual. All commits have been in -next for a while and no potential merge conflict is observed. Thanks, Gao Xiang The following changes since commit

Re: [PATCH RFC v3 for-6.8/block 11/17] erofs: use bdev api

2024-01-04 Thread Gao Xiang
uch more straightforward. Thanks for your suggestion, I'll follow this unless Gao Xiang has other suggestions. Yes, that would be better, I'm fine with that. Yet in the future we may support a seperate large dirblocksize more than block size, but we could revisit later. Thanks, Gao Xiang K

Re: [PATCH v3] erofs: make erofs_err() and erofs_info() support NULL sb parameter

2024-01-03 Thread Gao Xiang
On 2024/1/3 20:11, Chunhai Guo wrote: Make erofs_err() and erofs_info() support NULL sb parameter for more general usage. Suggested-by: Gao Xiang Signed-off-by: Chunhai Guo --- V2 -> V3: convert pr_err() to erofs_err() in erofs codebase V1 -> V2: add erofs_info() --- fs

Re: 答复: [External Mail]Re: Request for Assistance: Decompressing EROFS Image without Mounting

2024-01-03 Thread Gao Xiang
s --extract=mi_ext mi_ext.img" - As for Xiaomi Corp, is there some other colleague which can help you resolve this? Thanks, Gao Xiang

Re: Request for Assistance: Decompressing EROFS Image without Mounting

2024-01-03 Thread Gao Xiang
requirement? Thanks, Gao Xiang I am grateful for your time and consideration in this matter. Thank you for your dedication to the developer community, and I look forward to hearing from you soon.> Best regards, wang shuo wangshu...@xiaomi.com #/**本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。

Re: [PATCH v2] erofs: make erofs_err() and erofs_info() support NULL sb parameter

2024-01-02 Thread Gao Xiang
Hi Jingbo, On 2024/1/2 23:10, Jingbo Xu wrote: Hi Chunhai, Thanks for the commit. On 1/2/24 11:01 PM, Chunhai Guo wrote: Make erofs_err() and erofs_info() support NULL sb parameter for more general usage. Suggested-by: Gao Xiang Signed-off-by: Chunhai Guo --- fs/erofs/super.c | 10

Re: [PATCH] erofs: make erofs_err() and erofs_info() support NULL sb parameter

2024-01-02 Thread Gao Xiang
On 2024/1/2 22:37, Chunhai Guo wrote: Make erofs_err() and erofs_info() support NULL sb parameter for more general usage. Suggested-by: Gao Xiang Signed-off-by: Chunhai Guo --- fs/erofs/super.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fs/erofs

Re: [PATCH] erofs: fix uninit-value in z_erofs_lz4_decompress

2023-12-30 Thread Gao Xiang
hip with `rq->inputsize` and `ret + rq->inputsize` is meaningless too. Also, the issue was already fixed by avoiding debugging messages as https://lore.kernel.org/r/20231227151903.2900413-1-hsiang...@linux.alibaba.com Thanks, Gao Xiang

Re: [PATCH] erofs: add a global page pool for lz4 decompression

2023-12-30 Thread Gao Xiang
unify the pcpubuf and mempool in the next step. Anyway, if a global mempool is really needed. I'd like to add some new sysfs interface to change this value (by default, 0). Also you could reuse some of shortlived interfaces for global pool rather than introduce another type of pages. Thanks, Gao Xiang

Re: [PATCH] erofs: add a global page pool for lz4 decompression

2023-12-28 Thread Gao Xiang
IMHO, maybe we could do some analysis on your workload first and think how to do this next. Thanks, Gao Xiang

Re: [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (2)

2023-12-27 Thread Gao Xiang
#syz test git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git dev-test

[PATCH] erofs: avoid debugging output for (de)compressed data

2023-12-27 Thread Gao Xiang
...@syzkaller.appspotmail.com Closes: https://lore.kernel.org/r/321c24060d7cf...@google.com Signed-off-by: Gao Xiang --- fs/erofs/decompressor.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/fs/erofs/decompressor.c b/fs/erofs/decompressor.c index af98e88908ee..923afef7997a

[PATCH v2] erofs: fix inconsistent per-file compression format

2023-12-26 Thread Gao Xiang
("erofs: add on-disk compression configurations") Signed-off-by: Gao Xiang --- change since v1: - fix left-shift overflow (undefined behavior). fs/erofs/decompressor.c | 2 +- fs/erofs/zmap.c | 9 ++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fs/erofs/de

[PATCH] erofs: fix inconsistent per-file compression format

2023-12-26 Thread Gao Xiang
("erofs: add on-disk compression configurations") Signed-off-by: Gao Xiang --- fs/erofs/decompressor.c | 2 +- fs/erofs/zmap.c | 15 --- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/fs/erofs/decompressor.c b/fs/erofs/decompressor.c index 021be5feb1

Re: [PATCH] Fix EROFS Kconfig

2023-12-23 Thread Gao Xiang
depends on EROFS_FS + select NETFS_SUPPORT + select FSCACHE + select CACHEFILES + select CACHEFILES_ONDEMAND help This permits EROFS to use fscache-backed data blobs with on-demand read support. -- 2.39.3 But cachefiles won't be complied as modules anymore. Does it sounds good? Thanks, Gao Xiang

Re: [PATCH] erofs: allow partially filled compressed bvecs

2023-12-20 Thread Gao Xiang
On 2023/12/21 14:23, Yue Hu wrote: From: Yue Hu In order to reduce memory footprints even further, let's allow partially filled compressed bvecs for readahead to bail out later. Signed-off-by: Yue Hu Reviewed-by: Gao Xiang Thanks, Gao Xiang

[PATCH v3 1/3] erofs-utils: lib: add z_erofs_need_refill()

2023-12-18 Thread Gao Xiang
Let's remove redundant logic. Signed-off-by: Gao Xiang --- lib/compress.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/lib/compress.c b/lib/compress.c index 61328ed..a5ef6e4 100644 --- a/lib/compress.c +++ b/lib/compress.c

[PATCH v3 2/3] erofs-utils: lib: split vle_compress_one()

2023-12-18 Thread Gao Xiang
Split compression for each extent into a new helper for later reworking. Signed-off-by: Gao Xiang --- lib/compress.c | 297 - 1 file changed, 147 insertions(+), 150 deletions(-) diff --git a/lib/compress.c b/lib/compress.c index a5ef6e4..eafbad1

[PATCH v3 3/3] erofs-utils: lib: generate compression indexes in memory first

2023-12-18 Thread Gao Xiang
. Signed-off-by: Yifan Zhao Signed-off-by: Gao Xiang --- lib/compress.c | 185 - 1 file changed, 121 insertions(+), 64 deletions(-) diff --git a/lib/compress.c b/lib/compress.c index eafbad1..8f61f92 100644 --- a/lib/compress.c +++ b/lib/compress.c

[PATCH] erofs: fix ztailpacking for subpage compressed blocks

2023-12-14 Thread Gao Xiang
`pageofs_in` should be the compressed data offset of the page rather than of the block. Signed-off-by: Gao Xiang --- fs/erofs/zdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index a2c3e87d2f81..8264936b8612 100644 --- a/fs/erofs

Re: [PATCH v1] erofs-utils: fuse: support FUSE 2/3 multi-threading

2023-12-12 Thread Gao Xiang
} else { +#if FUSE_MINOR_VERSION < 2 Can we check FUSE_USE_VERSION directly? if FUSE_USE_VERSION is neither 30 or 32, let's raise a build error with #error unsupported FUSE_USE_VERSION instead. Thanks, Gao Xiang +

Re: [RFC KERNEL] initoverlayfs - a scalable initial filesystem

2023-12-11 Thread Gao Xiang
On 2023/12/12 15:35, Christoph Hellwig wrote: On Tue, Dec 12, 2023 at 08:50:56AM +0800, Gao Xiang wrote: For non-virtualization cases, I guess you could try to use `memmap` kernel option [2] to specify a memory region by bootloaders which contains an EROFS rootfs and a customized init

Re: [PATCH RFC v2 for-6.8/block 11/18] erofs: use bdev api

2023-12-11 Thread Gao Xiang
_metabuf() is not always called before erofs_bread() is used. For example, buf->inode can be one of directory inodes other than initialized by erofs_init_metabuf(). Thanks, Gao Xiang pgoff_t index = offset >> PAGE_SHIFT; struct page *page = buf->page; struct

Re: [RFC KERNEL] initoverlayfs - a scalable initial filesystem

2023-12-11 Thread Gao Xiang
ndividual filesystem anyway. [1] https://www.qemu.org/docs/master/system/devices/virtio-pmem.html [2] https://docs.pmem.io/persistent-memory/getting-started-guide/creating-development-environments/linux-environments/linux-memmap Thanks, Gao Xiang Echo'ing Lennart we must also "keep in mi

Re: [PATCH 1/5] erofs: support I/O submission for sub-page compressed blocks

2023-12-11 Thread Gao Xiang
On 2023/12/6 17:10, Gao Xiang wrote: Add a basic I/O submission path first to support sub-page blocks: - Temporary short-lived pages will be used entirely; - In-place I/O pages can be used partially, but compressed pages need to be able to be mapped in contiguous virtual memory

Re: [PATCH 4/5] erofs: refine z_erofs_transform_plain() for sub-page block support

2023-12-07 Thread Gao Xiang
On 2023/12/8 15:34, Gao Xiang wrote: ... min_t(unsigned int, ,)? ../include/linux/minmax.h:21:28: error: comparison of distinct pointer types lacks a cast [-Werror]    (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) What compiler version are you using? I didn't find any error

Re: [PATCH 4/5] erofs: refine z_erofs_transform_plain() for sub-page block support

2023-12-07 Thread Gao Xiang
On 2023/12/8 13:20, Yue Hu wrote: On Wed, 6 Dec 2023 17:10:56 +0800 Gao Xiang wrote: Sub-page block support is still unusable even with previous commits if interlaced PLAIN pclusters exist. Such pclusters can be found if the fragment feature is enabled. This commit tries to handle

[PATCH 5/5] erofs: enable sub-page compressed block support

2023-12-06 Thread Gao Xiang
Let's just disable cached decompression and inplace I/Os for partial pages as a first step in order to enable sub-page block initial support. In other words, currently it works primarily based on temporary short-lived pages. Don't expect too much in terms of performance. Signed-off-by: Gao

[PATCH 4/5] erofs: refine z_erofs_transform_plain() for sub-page block support

2023-12-06 Thread Gao Xiang
ffc091e6f9 ("erofs: support interlaced uncompressed data for compressed files"). It uses a unique way for both shifted and interlaced PLAIN pclusters. As an added bonus, PLAIN pclusters larger than the block size is also supported now for the upcoming large lclusters. Signed-off-by: Gao

[PATCH 1/5] erofs: support I/O submission for sub-page compressed blocks

2023-12-06 Thread Gao Xiang
is explicitly disabled for sub-page blocks, which will be supported in the future. Signed-off-by: Gao Xiang --- fs/erofs/zdata.c | 156 ++- 1 file changed, 74 insertions(+), 82 deletions(-) diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index a33cd6757f98

[PATCH 3/5] erofs: fix up compacted indexes for block size < 4096

2023-12-06 Thread Gao Xiang
`Z_EROFS_LI_D0_CBLKCNT`. To support smaller block sizes, `lobits` for each compacted lcluster is now calculated as: lobits = max(lclusterbits, ilog2(Z_EROFS_LI_D0_CBLKCNT) + 1) Signed-off-by: Gao Xiang --- fs/erofs/zmap.c | 32 ++-- 1 file changed, 14 insertions

[PATCH 0/5] erofs: basic sub-page compressed data support

2023-12-06 Thread Gao Xiang
temporary buffers all the time to keep compressed data if sub-page blocks are identified. In other words, no inplace/cache decompression for the preliminary support. This patchset survives EROFS stress test on my own testfarms. Thanks, Gao Xiang Gao Xiang (5): erofs: support I/O submission

[PATCH 2/5] erofs: record `pclustersize` in bytes instead of pages

2023-12-06 Thread Gao Xiang
-by: Gao Xiang --- fs/erofs/zdata.c | 64 1 file changed, 26 insertions(+), 38 deletions(-) diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 421c0a88a0ca..d02989466711 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -56,6 +56,9 @@ struct

[PATCH v2] erofs: fix lz4 inplace decompression

2023-12-05 Thread Gao Xiang
ompress big pcluster for lz4 backend") Cc: stable # 5.4+ Signed-off-by: Gao Xiang --- changes since v1: - address some nits pointed out by Juhyung. fs/erofs/decompressor.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/fs/erofs/decompr

Re: [PATCH] erofs: fix lz4 inplace decompression

2023-12-05 Thread Gao Xiang
On 2023/12/6 12:39, Gao Xiang wrote: On 2023/12/6 12:28, Juhyung Park wrote: Hi Gao, Thanks for the timely fix. This also fixes the issue. Reported-and-tested-by: Juhyung Park Might wanna add Cc: sta...@vger.kernel.org # 5.4+ but it seems like this doesn't apply cleanly for 5.4, 5.10

Re: [PATCH] erofs: fix lz4 inplace decompression

2023-12-05 Thread Gao Xiang
conflict resolution. :)) I will handle these LTSes manually, so don't worry about that :) Wrote some nits below: On Wed, Dec 6, 2023 at 12:08 PM Gao Xiang wrote: Currently EROFS can map another compressed buffer for inplace decompression, which was used to handle the cases that some pages

Re: Weird EROFS data corruption

2023-12-05 Thread Gao Xiang
Hi Juhyung, On 2023/12/5 22:43, Juhyung Park wrote: On Tue, Dec 5, 2023 at 11:34 PM Gao Xiang wrote: ... I'm still analyzing this behavior as well as the root cause and I will also try to get a recent cloud server with FSRM myself to find more clues. Down the rabbit hole we go... Let

Re: Weird EROFS data corruption

2023-12-05 Thread Gao Xiang
On 2023/12/5 22:23, Juhyung Park wrote: Hi Gao, On Tue, Dec 5, 2023 at 4:32 PM Gao Xiang wrote: Hi Juhyung, On 2023/12/4 11:41, Juhyung Park wrote: ... - Could you share the full message about the output of `lscpu`? Sure: Architecture:x86_64 CPU op-mode(s

Re: Weird EROFS data corruption

2023-12-04 Thread Gao Xiang
startup latency Thanks, Gao Xiang

Re: Weird EROFS data corruption

2023-12-03 Thread Gao Xiang
t of `lscpu`? Thanks, Gao Xiang

Re: Weird EROFS data corruption

2023-12-03 Thread Gao Xiang
On 2023/12/4 01:01, Juhyung Park wrote: Hi Gao, On Mon, Dec 4, 2023 at 1:52 AM Gao Xiang wrote: Hi Juhyung, On 2023/12/4 00:22, Juhyung Park wrote: (Cc'ing f2fs and crypto as I've noticed something similar with f2fs a while ago, which may mean that this is not specific to EROFS: https

Re: Weird EROFS data corruption

2023-12-03 Thread Gao Xiang
nce like different compliers? Thanks, Gao Xiang

[PATCH v2] erofs: fix memory leak on short-lived bounced pages

2023-11-28 Thread Gao Xiang
k like this, so it won't be impacted. Fixes: 67139e36d970 ("erofs: introduce `z_erofs_parse_in_bvecs'") Signed-off-by: Gao Xiang --- v2: - should be `be->compressed_pages`. fs/erofs/zdata.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/erofs/zdata.c b/fs/

[PATCH] erofs: fix memory leak on short-lived bounced pages

2023-11-28 Thread Gao Xiang
k like this, so it won't be impacted. Fixes: 67139e36d970 ("erofs: introduce `z_erofs_parse_in_bvecs'") Signed-off-by: Gao Xiang --- fs/erofs/zdata.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index a7e6847f6f8f..e5e

Re: [PATCH] erofs-utils: update .gitignore for test results and tools

2023-11-23 Thread Gao Xiang
On 2023/11/24 13:30, Yue Hu wrote: From: Yue Hu No need to track these generated test files. Signed-off-by: Yue Hu --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 33e5d30..5b9ecd0 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3

Re: [PATCH v2 2/2] erofs-utils: tests: fix build warning in test_LZ4_compress_HC_destSize

2023-11-23 Thread Gao Xiang
t; %d)\n", ~^ %ld Signed-off-by: Yue Hu Thanks, folded this with your SoB. Thanks, Gao Xiang

Re: [PATCH 2/2] erofs-utils: tests: fix build warning in test_LZ4_compress_HC_destSize

2023-11-23 Thread Gao Xiang
On 2023/11/24 11:50, Yue Hu wrote: On Fri, 24 Nov 2023 11:46:53 +0800 Gao Xiang wrote: Hi Yue, On 2023/11/24 11:36, Yue Hu wrote: From: Yue Hu badlz4.c:72:58: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=] printf("

Re: [PATCH 2/2] erofs-utils: tests: fix build warning in test_LZ4_compress_HC_destSize

2023-11-23 Thread Gao Xiang
cSize <= DstSize) { printf("test LZ4_compress_HC_destSize(%d) error (%d < %d)\n", - inlen, SrcSize, sizeof(dst)); Could we just use printf(, (int)sizeof(dst)); instead? Thanks, Gao Xiang + inlen, SrcSize, DstSize); re

Re: [PATCH 1/2] erofs-utils: tests: double-quote entries assignment in _check_xattrs

2023-11-23 Thread Gao Xiang
Hu Thanks, folded this with your SoB. Thanks, Gao Xiang

Re: [PATCH v2] erofs-utils: mkfs: generate on-disk indexes after compression

2023-11-23 Thread Gao Xiang
indexes after the compression for the file is completed. Signed-off-by: Yifan Zhao --- Sorry for the late reply. There are some issues on my side. In order to make this work efficient. Let me to refine this commit as well. Thanks, Gao Xiang

[PATCH 1/2] erofs-utils: lib: fix up compact indexes for block size < 4096

2023-11-22 Thread Gao Xiang
, there is no enough room for the special value `Z_EROFS_LI_D0_CBLKCNT`. To support smaller block sizes, `lobits` for each compacted lcluster is now calculated as: lobits = max(lclusterbits, ilog2(Z_EROFS_LI_D0_CBLKCNT) + 1) Signed-off-by: Gao Xiang --- lib/zmap.c | 32 ++-- 1 file

[PATCH 2/2] erofs-utils: mkfs: support compact indexes for smaller block sizes

2023-11-22 Thread Gao Xiang
This commit also adds mkfs support of compact indexes for smaller block sizes (less than 4096). Signed-off-by: Gao Xiang --- lib/compress.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/compress.c b/lib/compress.c index 47f1c1d..61328ed 100644 --- a/lib

[GIT PULL] erofs fixes for 6.7-rc3

2023-11-19 Thread Gao Xiang
s have been in -next and no potential merge conflict is observed. Thanks, Gao Xiang The following changes since commit b85ea95d086471afb4ad062012a4d73cd328fa86: Linux 6.7-rc1 (2023-11-12 16:19:07 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git

Re: [PATCH] MAINTAINERS: erofs: add EROFS webpage

2023-11-19 Thread Gao Xiang
On 2023/11/20 11:31, Chao Yu wrote: On 2023/11/20 11:23, Gao Xiang wrote: On 2023/11/20 11:18, Chao Yu wrote: On 2023/11/17 16:53, Gao Xiang wrote: Add a new `W:` field of the EROFS entry points to the documentation site at <https://erofs.docs.kernel.org>. In addition,

Re: [PATCH] MAINTAINERS: erofs: add EROFS webpage

2023-11-19 Thread Gao Xiang
On 2023/11/20 11:18, Chao Yu wrote: On 2023/11/17 16:53, Gao Xiang wrote: Add a new `W:` field of the EROFS entry points to the documentation site at <https://erofs.docs.kernel.org>. In addition, update the in-tree documentation and Kconfig too. Signed-off-by: Gao Xiang Nic

[PATCH] MAINTAINERS: erofs: add EROFS webpage

2023-11-17 Thread Gao Xiang
Add a new `W:` field of the EROFS entry points to the documentation site at <https://erofs.docs.kernel.org>. In addition, update the in-tree documentation and Kconfig too. Signed-off-by: Gao Xiang --- Documentation/filesystems/erofs.rst | 4 MAINTAINERS | 1

[PATCH] erofs-utils: lib: `fragment_size` should be 64 bits

2023-11-14 Thread Gao Xiang
`-Eall-fragments` is broken if i_size is more than 32 bits. Fixes: fcaa988a6ef6 ("erofs-utils: add `-Eall-fragments` option") Signed-off-by: Gao Xiang --- include/erofs/internal.h | 12 lib/compress.c | 9 + 2 files changed, 13 insertions(+), 8 deletion

Re: [PATCH] erofs: fix NULL dereference of dif->bdev_handle in fscache mode

2023-11-13 Thread Gao Xiang
2/0xf0 entry_SYSCALL_64_after_hwframe+0x6e/0x76 Reported-by: Yiqun Leng Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7245 Fixes: 49845720080d ("erofs: Convert to use bdev_open_by_path()") Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang Thanks, Gao Xiang

Re: [PATCH 2/3] mm: Add folio_fill_tail() and use it in iomap

2023-11-10 Thread Gao Xiang
his up. Assuming that is for the next cycle (no rush), I will also test this patch and feedback later since I'm now working on other stuffs. Thanks, Gao Xiang

Re: [PATCH v2] erofs: simplify erofs_read_inode()

2023-11-09 Thread Gao Xiang
y: Ferry Meng Reviewed-by: Gao Xiang Thanks, Gao Xiang

Re: [PATCH -next V2] erofs: code clean up for function erofs_read_inode()

2023-11-09 Thread Gao Xiang
On 2023/11/9 21:45, Zizhi Wo wrote: 在 2023/11/9 21:14, Gao Xiang 写道: Hi, On 2023/11/10 03:48, WoZ1zh1 wrote: Because variables "die" and "copied" only appear in case EROFS_INODE_LAYOUT_EXTENDED, move them from the outer space into this case. Also, call "kfree(

Re: [PATCH -next V2] erofs: code clean up for function erofs_read_inode()

2023-11-09 Thread Gao Xiang
the code 2) We'd like to avoid defining variables like this (in the switch block), and I even don't think this patch can compile. 3) The logic itself is also broken... Thanks, Gao Xiang + vi->inode_isize = sizeof(struct erofs_inode_extended); /* check if

Re: [PATCH] erofs: simplify erofs_read_inode()

2023-11-08 Thread Gao Xiang
UPP; goto err_out; } - if (vi->datalayout == EROFS_INODE_CHUNK_BASED) { + switch (inode->i_mode & S_IFMT) { + case S_IFREG: + case S_IFDIR: + case S_IFLNK: + vi->raw_blkaddr = le32_to_cpu(iu->raw_blkaddr); may cause use-after-free for acrossing block boundary case due to kfree(copied) before? Yeah, good catch, I think we could just make a copy instead. Thanks, Gao Xiang

[PATCH v2] erofs-utils: mkfs,fsck,dump: support `--offset` option

2023-11-06 Thread Gao Xiang
Add `--offset` option to allows users to specify an offset in the file where the filesystem will begin. Suggested-by: Pavel Otchertsov Closes: https://lore.kernel.org/r/caaxntogtd2nkknbphz+ver7nvnwvt0u02e+c8pn8zvfcxp5...@mail.gmail.com Signed-off-by: Gao Xiang --- I plan to apply this version

[PATCH] erofs-utils: mkfs,fsck,dump: support `--offset` option

2023-11-06 Thread Gao Xiang
Add `--offset` option to allows users to specify an offset in the file where the filesystem will begin. Suggested-by: Pavel Otchertsov Closes: https://lore.kernel.org/r/caaxntogtd2nkknbphz+ver7nvnwvt0u02e+c8pn8zvfcxp5...@mail.gmail.com Signed-off-by: Gao Xiang --- Hi Pavel, Could you check

Re: Feature Request: Add --offset option to mkfs.erofs

2023-11-06 Thread Gao Xiang
mation or assist in any way. Thanks for the reference! Let's implement this feature. Thanks, Gao Xiang Best regards, Pavel Otchertsov mailto:pavel.otchert...@gmail.com>>

Re: [PATCH 0/3] erofs-utils: Address doc and flag-parsing snags

2023-11-05 Thread Gao Xiang
. Thanks, applied for testing. Thanks, Gao Xiang Luke T. Shumaker (3): erofs-utils: have each non-fuse command take -h, --help, -V, and --version erofs-utils: improve the usage and version text of non-fuse commands erofs-utils: fsck: Add -a, -A, and -y flags dump/main.c

Re: [PATCH] erofs-utils: mkfs: fix potential memory leak

2023-11-05 Thread Gao Xiang
() and realpath(). Signed-off-by: Yifan Zhao Reviewed-by: Gao Xiang BTW, would you mind adding a configuration to enable Valgrind? Thanks, Gao Xiang

[GIT PULL] erofs updates for 6.7-rc1

2023-10-31 Thread Gao Xiang
, and there are minor cleanups around documentation and codebase. In addition, it also fixes incorrect lockref usage in erofs_insert_workgroup(). All commits have been in -next and no potential merge conflict is observed. Thanks, Gao Xiang The following changes since commit

Re: [PATCH] erofs: fix erofs_insert_workgroup() lockref usage

2023-10-31 Thread Gao Xiang
On 2023/10/31 14:20, Linus Torvalds wrote: On Mon, 30 Oct 2023 at 20:08, Gao Xiang wrote: As Linus pointed out [1], lockref_put_return() is fundamentally designed to be something that can fail. It behaves as a fastpath-only thing, and the failure case needs to be handled anyway. Actually

[PATCH] erofs: fix erofs_insert_workgroup() lockref usage

2023-10-31 Thread Gao Xiang
place handcrafted approach") Signed-off-by: Gao Xiang --- fs/erofs/utils.c | 8 +--- fs/erofs/zdata.c | 1 + 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/erofs/utils.c b/fs/erofs/utils.c index cc6fb9e98899..4256a85719a1 100644 --- a/fs/erofs/utils.c +++ b/fs/ero

Re: [PATCH] erofs-utils: lib: tidy up erofs_compress_destsize()

2023-10-29 Thread Gao Xiang
On 2023/10/27 15:06, Gao Xiang wrote: Drop the old workaround logic to prepare for the following development. (I've checked the Linux 6.1.53 source code and an AOSP rootfs without any image size change and strange behavior.) Signed-off-by: Gao Xiang I found that It could cause

[PATCH] erofs-utils: lib: tidy up erofs_compress_destsize()

2023-10-27 Thread Gao Xiang
Drop the old workaround logic to prepare for the following development. (I've checked the Linux 6.1.53 source code and an AOSP rootfs without any image size change and strange behavior.) Signed-off-by: Gao Xiang --- lib/compress.c | 71 +++- lib

Re: [PATCH 2/2] erofs: tidy up redundant includes

2023-10-25 Thread Gao Xiang
On 2023/10/26 10:16, Ferry Meng wrote: - Remove unused includes like and ; - Move common includes into "internal.h". Signed-off-by: Ferry Meng Reviewed-by: Gao Xiang Thanks, Gao Xiang

Re: [PATCH 1/2] erofs: get rid of ROOT_NID()

2023-10-25 Thread Gao Xiang
On 2023/10/26 10:16, Ferry Meng wrote: Let's open code this helper for simplicity. Signed-off-by: Ferry Meng Reviewed-by: Gao Xiang Thanks, Gao Xiang

[PATCH v2 3/3] erofs-utils: lib: propagate return code for erofs_bflush()

2023-10-24 Thread Gao Xiang
Instead of just using a boolean. Signed-off-by: Gao Xiang --- include/erofs/cache.h | 8 lib/cache.c | 21 ++--- lib/compress.c| 1 + lib/inode.c | 18 +- mkfs/main.c | 14 +++--- 5 files changed, 35

<    1   2   3   4   5   6   7   8   9   10   >