Re: [PATCH] erofs: update documentation

2022-12-06 Thread Chao Yu
On 2022/11/30 17:56, Gao Xiang wrote: - Refine highlights for main features; - Add multi-reference pclusters and fragment description. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v2] erofs: check the uniqueness of fsid in shared domain in advance

2022-12-06 Thread Chao Yu
: ...: erofs_domain_register_cookie: XX already exists in domain YY Reviewed-by: Jia Zhu Signed-off-by: Hou Tao Reviewed-by: Chao Yu Thanks,

Re: [PATCH v2] erofs: enable large folios for iomap mode

2022-12-06 Thread Chao Yu
, the iomap routine will allocate iomap_page for each large folio and thus we need iomap_release_folio() and iomap_invalidate_folio() to free iomap_page when these folios get recalimed or invalidated. Signed-off-by: Jingbo Xu Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: fix use-after-free of fsid and domain_id string

2022-11-09 Thread Chao Yu
cache-based domain") Signed-off-by: Jingbo Xu Reviewed-by: Chao Yu Thanks,

Re: [PATCH 2/2] erofs: get correct count for unmapped range in fscache mode

2022-11-07 Thread Chao Yu
adahead") Fixes: 1ae9470c3e14 ("erofs: clean up .read_folio() and .readahead() in fscache mode") Signed-off-by: Jingbo Xu Reviewed-by: Chao Yu Thanks,

Re: [PATCH 1/2] erofs: put metabuf in error path in fscache mode

2022-11-07 Thread Chao Yu
On 2022/11/4 13:40, Jingbo Xu wrote: For tail packing layout, put metabuf when error is encountered. Fixes: 1ae9470c3e14 ("erofs: clean up .read_folio() and .readahead() in fscache mode") Signed-off-by: Jingbo Xu Reviewed-by: Chao Yu Thanks,

Re: [PATCH v2] erofs: fix general protection fault when reading fragment

2022-11-07 Thread Chao Yu
+3faecbfd845a895c0...@syzkaller.appspotmail.com Fixes: 08a0c9ef3e7e ("erofs: support on-disk compressed fragments data") Signed-off-by: Yue Hu Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: fix possible memory leak in erofs_init_sysfs()

2022-10-25 Thread Chao Yu
On 2022/10/20 17:14, Gao Xiang wrote: Hi Chao, On Thu, Oct 20, 2022 at 04:49:34PM +0800, Chao Yu wrote: On 2022/10/19 10:21, Gao Xiang wrote: Hi Yingliang, On Tue, Oct 18, 2022 at 03:39:47PM +0800, Yang Yingliang wrote: Inject fault while probing module, kset_register() may fail

Re: [PATCH] erofs: fix possible memory leak in erofs_init_sysfs()

2022-10-20 Thread Chao Yu
On 2022/10/19 10:21, Gao Xiang wrote: Hi Yingliang, On Tue, Oct 18, 2022 at 03:39:47PM +0800, Yang Yingliang wrote: Inject fault while probing module, kset_register() may fail, if it fails, but the refcount of kobject is not decreased to 0, the name allocated in kobject_set_name() is leaked.

Re: [PATCH v2] erofs: protect s_inodes with s_inode_list_lock

2022-10-20 Thread Chao Yu
wing comments from Jia Zhu. v1: https://lore.kernel.org/all/tycp286mb23237a9993e0ffcfe5c2bdbeca...@tycp286mb2323.jpnp286.prod.outlook.com/ base-commit: 8436c4a57bd147b0bd2943ab499bb8368981b9e1 Signed-off-by: Dawei Li Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: fix up inplace decompression success rate

2022-10-14 Thread Chao Yu
On 2022/10/14 14:49, Gao Xiang wrote: Partial decompression should be checked after updating length. It's a new regression when introducing multi-reference pclusters. Fixes: 2bfab9c0edac ("erofs: record the longest decompressed size in this round") Signed-off-by: Gao Xiang Reviewe

Re: [PATCH] erofs: shouldn't churn the mapping page for duplicated copies

2022-10-14 Thread Chao Yu
compressed data deduplication. Also, shift the onlinepage EIO bit to avoid touching the signed bit. Fixes: 267f2492c8f7 ("erofs: introduce multi-reference pclusters (fully-referenced)") Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v2] erofs: fix invalid unmapped accesses in z_erofs_fill_inode_lazy()

2022-10-14 Thread Chao Yu
3a ("erofs: support on-disk compressed fragments data") Signed-off-by: Yue Hu Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: fix pcluster use-after-free on UP platforms

2022-09-05 Thread Chao Yu
("staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'") Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: avoid the potentially wrong m_plen for big pcluster

2022-09-05 Thread Chao Yu
' will be wrong once we enable the non 4K-sized lcluster. Signed-off-by: Yue Hu Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: fix error return code in erofs_fscache_meta_read_folio and erofs_fscache_read_folio

2022-09-05 Thread Chao Yu
On 2022/8/15 11:48, Sun Ke wrote: If erofs_fscache_alloc_request fail and then goto out, it will return 0. it should return a negative error code instead of 0. Fixes: d435d53228dd ("erofs: change to use asynchronous io for fscache readpage/readahead") Signed-off-by: Sun Ke Reviewe

Re: [PATCH v2] erofs-utils: fuse: set d_type for readdir

2022-08-07 Thread Chao Yu
On 2022/8/7 16:08, Sheng Yong wrote: From: Sheng Yong Set inode mode for libfuse readdir filler so that readdir count get correct d_type. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Thanks,

Re: [PATCH v4] erofs: update ctx->pos for every emitted dirent

2022-07-31 Thread Chao Yu
_dentries to fix it. Also fix the update of ctx->pos when the initial file position has exceeded nameoff. Fixes: 3e917cc305c6 ("erofs: make filesystem exportable") Signed-off-by: Hongnan Li Signed-off-by: Jeffle Xu Reviewed-by: Chao Yu Thanks,

Re: [PATCH v2] erofs: update ctx->pos for every emitted dirent

2022-06-18 Thread Chao Yu
On 2022/6/9 11:40, Hongnan Li wrote: erofs_readdir update ctx->pos after filling a batch of dentries and it may cause dir/files duplication for NFS readdirplus which depends on ctx->pos to fill dir correctly. So update ctx->pos for every emitted dirent in erofs_fill_dentries to fix it. Fixes:

Re: [PATCH] MAINTAINERS: erofs: add myself as reviewer

2022-06-06 Thread Chao Yu
this. Acked-by: Gao Xiang Acked-by: Chao Yu Thanks, Thanks, Gao Xiang --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1309e1496c23..6cd8b3631cc0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7388,6 +7388,7 @@ EROFS FILE SYSTEM M:Gao

Re: [PATCH] MAINTAINERS: erofs: add myself as reviewer

2022-06-06 Thread Chao Yu
a healthier development then... Acked-by: Gao Xiang Acked-by: Chao Yu Thanks, + Jeffle Xu (BTW, I'd like to request Jeffle as a EROFS reviewer too due to the fscache feature. Not sure if he's interested in it...) Thanks, Gao Xiang --- MAINTAINERS | 1 + 1 file changed, 1 insertion

Re: [PATCH 0/3] erofs: random decompression cleanups

2022-05-31 Thread Chao Yu
Acked-by: Chao Yu Thanks, On 2022/5/29 13:54, Gao Xiang wrote: From: Gao Xiang Hi folks, Now I'm working on cleanuping decompression code and doing some folio adaption for the next 5.20 cycle, see: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/linux.git/log/?h=erofs/folios

Re: [PATCH] erofs: fix 'backmost' member of z_erofs_decompress_frontend

2022-05-30 Thread Chao Yu
On 2022/5/30 15:51, Weizhao Ouyang wrote: Initialize 'backmost' to true in DECOMPRESS_FRONTEND_INIT. Fixes: 5c6dcc57e2e5 ("erofs: get rid of `struct z_erofs_collector'") Signed-off-by: Weizhao Ouyang Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: update documentation

2022-05-29 Thread Chao Yu
On 2022/5/27 15:01, Gao Xiang wrote: - refine the filesystem overview for better description of recent new features like FSDAX or Fscache; - add the new `fsid' mount option; - fix some typos. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v2] erofs: leave compressed inodes unsupported in fscache mode for now

2022-05-29 Thread Chao Yu
based data read for non-inline layout") Signed-off-by: Jeffle Xu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: update ctx->pos for every emitted dirent

2022-05-29 Thread Chao Yu
On 2022/5/27 15:25, Hongnan Li wrote: erofs_readdir update ctx->pos after filling a batch of dentries and it may cause dir/files duplication for NFS readdirplus which depends on ctx->pos to fill dir correctly. So update ctx->pos for every emitted dirent in erofs_fill_dentries to fix it. Fixes:

Re: [PATCH] erofs: fix crash when enable tracepoint cachefiles_prep_read

2022-05-29 Thread Chao Yu
onous io for fscache readpage/readahead") Should not wrap long 'fixes' line. Signed-off-by: Xin Yin Reviewed-by: Chao Yu Thanks,

Re: [PATCH v2 resend] erofs: make filesystem exportable

2022-05-17 Thread Chao Yu
tested with unionmount-testsuite and the testcase below passes now: ./run --ov --erofs --verify hard-link For more details about the testcase, see: https://github.com/amir73il/unionmount-testsuite/pull/6 Signed-off-by: Hongnan Li Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: fix buffer copy overflow of ztailpacking feature

2022-05-17 Thread Chao Yu
if ztailpacking is used, the second part of an uncompresed tail pcluster may not be ``rq->pageofs_out``. uncompressed Fixes: ab749badf9f4 ("erofs: support unaligned data decompression") Fixes: cecf864d3d76 ("erofs: support inline data decompression") Signed-off-by: Gao Xiang Review

Re: [PATCH] erofs: do not prompt for risk any more when using big pcluster

2022-05-17 Thread Chao Yu
On 2022/4/7 13:18, Gao Xiang wrote: On Thu, Apr 07, 2022 at 01:01:23PM +0800, Yue Hu wrote: The big pluster feature has been merged for a year, it has been mostly stable now. Signed-off-by: Yue Hu Reviewed-by: Chao Yu Thanks,

Re: [PATCH 3/3] erofs: refine on-disk definition comments

2022-05-17 Thread Chao Yu
On 2022/5/7 3:46, Gao Xiang wrote: Fix some outdated comments and typos, hopefully helpful. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH 2/3] erofs: remove obsoluted comments

2022-05-17 Thread Chao Yu
On 2022/5/7 3:46, Gao Xiang wrote: Some comments haven't been useful anymore since the code updated. Let's drop them instead. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

[PATCH v2] erofs: support idmapped mounts

2022-05-17 Thread Chao Yu
Reviewed-by: Christian Brauner (Microsoft) Reviewed-by: Gao Xiang Signed-off-by: Chao Yu --- v2: - fix testcase pointed out by Christian Brauner. fs/erofs/inode.c | 2 +- fs/erofs/super.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c

[PATCH] erofs: support idmapped mounts

2022-05-17 Thread Chao Yu
Signed-off-by: Chao Yu --- fs/erofs/inode.c | 2 +- fs/erofs/super.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c index e8b37ba5e9ad..5320bf52c1ce 100644 --- a/fs/erofs/inode.c +++ b/fs/erofs/inode.c @@ -370,7 +370,7 @@ int erofs_getattr

Re: [PATCH v11 00/22] fscache,erofs: fscache-based on-demand read semantics

2022-05-10 Thread Chao Yu
ofs: implement fscache-based data readahead erofs: add 'fsid' mount option For erofs parts: Acked-by: Chao Yu Thanks, Xin Yin (1): erofs: change to use asynchronous io for fscache readpage/readahead .../filesystems/caching/cachefiles.rst| 178 ++ fs/cach

Re: [PATCH v2] erofs: fix use-after-free of on-stack io[]

2022-04-15 Thread Chao Yu
381] [] (__handle_domain_irq) from [] (gic_handle_irq+0x50/0xd4) [ 11.659641] [] (gic_handle_irq) from [] (__irq_svc+0x70/0xb0) Signed-off-by: Hongyu Jin Reviewed-by: Chao Yu Thanks,

Re: [PATCH v2] erofs: rename ctime to mtime

2022-03-17 Thread Chao Yu
and i_mtime_nsec. Signed-off-by: David Anderson [ Gao Xiang: update document as well. ] Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH 2/2] erofs: support inode lookup with metabuf

2022-03-15 Thread Chao Yu
instead of page structure. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH 1/2] erofs: support read directory inodes with metabuf

2022-03-15 Thread Chao Yu
-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH] fs: erofs: add sanity check for kobject in erofs_unregister_sysfs

2022-03-15 Thread Chao Yu
that I've tested the patch and the crash does not occur any more. Signed-off-by: Dongliang Mu Reviewed-by: Chao Yu Thanks,

Re: [PATCH 2/2] erofs: refine managed inode stuffs

2022-03-15 Thread Chao Yu
On 2022/3/11 2:27, Gao Xiang wrote: Set up the correct gfp mask and use it instead of hard coding. Also add comments about .invalidatepage() to show more details. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH 1/2] erofs: clean up z_erofs_extent_lookback

2022-03-15 Thread Chao Yu
On 2022/3/11 2:27, Gao Xiang wrote: Avoid the unnecessary tail recursion since it can be converted into a loop directly in order to prevent potential stack overflow. It's a pretty straightforward conversion. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: silence warnings related to impossible m_plen

2022-03-11 Thread Chao Yu
ompression mode, so we're always safe here. In order to make static analyzers happy and don't report again, let's silence them instead. [1] https://lore.kernel.org/r/202203091002.ljvzsx6e-...@intel.com Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Gao Xiang Revie

Re: [PATCH] Documentation/filesystem/dax: update DAX description on erofs

2022-03-11 Thread Chao Yu
On 2022/3/8 11:41, Hongnan Li wrote: From: lihongnan Add missing erofs fsdax description since fsdax has been supported on erofs from Linux 5.15. Signed-off-by: lihongnan Acked-by: Chao Yu Thanks,

Re: [PATCH 2/2] erofs: clean up preload_compressed_pages()

2022-03-11 Thread Chao Yu
On 2022/3/2 3:49, Gao Xiang wrote: Rename preload_compressed_pages() as z_erofs_bind_cache() since we're try to prepare for adapting folios. Also, add a comment for the gfp setting. No logic changes. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH 1/2] erofs: get rid of `struct z_erofs_collector'

2022-03-11 Thread Chao Yu
On 2022/3/2 3:49, Gao Xiang wrote: Avoid `struct z_erofs_collector' since there is another context structure called "struct z_erofs_decompress_frontend". No logic changes. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v4 07/21] erofs: use meta buffers for erofs_read_superblock()

2022-03-10 Thread Chao Yu
On 2022/3/7 20:32, Jeffle Xu wrote: The only change is that, meta buffers read cache page without __GFP_FS flag, which shall not matter. Signed-off-by: Jeffle Xu Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: fix ztailpacking on > 4GiB filesystems

2022-03-01 Thread Chao Yu
Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: fix small compressed files inlining

2022-02-03 Thread Chao Yu
, I've changed my mind. [1] https://lore.kernel.org/r/20211215094449.15162-1-huy...@yulong.com Fixes: ab92184ff8f1 ("erofs: add on-disk compressed tail-packing inline support") Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: avoid unnecessary z_erofs_decompressqueue_work() declaration

2022-01-24 Thread Chao Yu
On 2022/1/21 17:14, Gao Xiang wrote: Just code rearrange. No logic changes. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: fix fsdax partition offset handling

2022-01-23 Thread Chao Yu
dling into the file systems") Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v2 5/5] erofs: use meta buffers for zmap operations

2022-01-04 Thread Chao Yu
unt is needed since zmap metabuf will be released at the end of readpage or readahead... Thanks for the explanation. Reviewed-by: Chao Yu Thanks,

Re: [PATCH v2 5/5] erofs: use meta buffers for zmap operations

2022-01-04 Thread Chao Yu
On 2022/1/2 12:00, Gao Xiang wrote: Get rid of old erofs_get_meta_page() within zmap operations by using on-stack meta buffers in order to prepare subpage and folio features. Finally, erofs_get_meta_page() is useless. Get rid of it! Reviewed-by: Yue Hu Signed-off-by: Gao Xiang ---

Re: [PATCH v2 4/5] erofs: use meta buffers for xattr operations

2022-01-04 Thread Chao Yu
On 2022/1/2 12:00, Gao Xiang wrote: Get rid of old erofs_get_meta_page() within xattr operations by using on-stack meta buffers in order to prepare subpage and folio features. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v3 3/5] erofs: use meta buffers for super operations

2022-01-04 Thread Chao Yu
On 2022/1/2 16:13, Gao Xiang wrote: Get rid of old erofs_get_meta_page() within super operations by using on-stack meta buffers in order to prepare subpage and folio features. Reviewed-by: Yue Hu Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v2 2/5] erofs: use meta buffers for inode operations

2022-01-03 Thread Chao Yu
On 2022/1/2 12:00, Gao Xiang wrote: Get rid of old erofs_get_meta_page() within inode operations by using on-stack meta buffers in order to prepare subpage and folio features. Reviewed-by: Yue Hu Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v2 1/5] erofs: introduce meta buffer operations

2022-01-03 Thread Chao Yu
kmap_type == EROFS_KMAP_ATOMIC) + kunmap_atomic(buf->base); Once user calls this function, .base should be invalidated. buf->base = NULL; Otherwise, it looks good to me. Reviewed-by: Chao Yu Thanks, + buf->kmap_type = EROFS_NO_KMAP; +} + +void erofs_put_metabuf(str

Re: [PATCH v4 5/5] erofs: add on-disk compressed tail-packing inline support

2021-12-29 Thread Chao Yu
Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v5 4/5] erofs: support inline data decompression

2021-12-29 Thread Chao Yu
of other metadata I/Os. Therefore, they directly move into the bypass queue without extra I/O submission. It's the last compression feature before folio/subpage support. Signed-off-by: Yue Hu Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v4 3/5] erofs: support unaligned data decompression

2021-12-29 Thread Chao Yu
On 2021/12/28 13:46, Gao Xiang wrote: Previously, compressed data was assumed as block-aligned. This should be changed due to in-block tail-packing inline data. Signed-off-by: Yue Hu Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v3 2/5] erofs: introduce z_erofs_fixup_insize

2021-12-26 Thread Chao Yu
On 2021/12/25 15:06, Gao Xiang wrote: To prepare for the upcoming ztailpacking feature, introduce z_erofs_fixup_insize() and pageofs_in to wrap up the process to get the exact compressed size via zero padding. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v3 1/5] erofs: tidy up z_erofs_lz4_decompress

2021-12-26 Thread Chao Yu
fields of structure z_erofs_lz4_decompress_ctx? Otherwise, the patch looks good to me. Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs-utils: update AUTHORS

2021-12-01 Thread Chao Yu
On 2021/12/1 16:27, Huang Jianan wrote: Add myself to the AUTHORS file. Signed-off-by: Huang Jianan Acked-by: Chao Yu Thanks,

Re: [PATCH] erofs: fix deadlock when shrink erofs slab

2021-11-18 Thread Chao Yu
freeze the workgroup beacuse we will operate xarry. So let's hold the lock before access each workgroup, just like when we using the radix tree before. Fixes: 64094a04414f ("erofs: convert workstn to XArray") Signed-off-by: Huang Jianan Reviewed-by: Chao Yu Thanks,

Re: [PATCH v6 1/3] erofs: rename lz4_0pading to zero_padding

2021-11-15 Thread Chao Yu
On 2021/11/13 0:09, Huang Jianan wrote: From: Huang Jianan Renaming lz4_0padding to zero_padding globally since LZMA and later algorithms also need that. Signed-off-by: Huang Jianan Reviewed-by: Chao Yu Thanks,

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

2021-11-10 Thread Chao Yu
On 2021/11/10 21:48, Huang Jianan wrote: From: Huang Jianan 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

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

2021-11-09 Thread Chao Yu
On 2021/11/9 23:38, Huang Jianan wrote: Add sysfs interface to configure erofs related parameters later. Signed-off-by: Huang Jianan Reviewed-by: Chao Yu Thanks,

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

2021-11-09 Thread Chao Yu
On 2021/11/9 15:45, 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 add a sysfs node to allow disable sync decompression. Signed-off-by: Huang Jianan --- changes since v1: - leave

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

2021-11-09 Thread Chao Yu
On 2021/11/9 15:45, Huang Jianan via Linux-erofs wrote: 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 +

Re: [PATCH v2] erofs: fix unsafe pagevec reuse of hooked pclusters

2021-11-04 Thread Chao Yu
erofs: introduce VLE decompression support") Cc: # 4.19+ Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: don't trigger WARN() when decompression fails

2021-10-29 Thread Chao Yu
[1] https://lore.kernel.org/r/b3586105cf0ff...@google.com Reported-by: syzbot+d8aaffc3719597e8c...@syzkaller.appspotmail.com Cc: Dmitry Vyukov Cc: Chao Yu Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: get rid of ->lru usage

2021-10-22 Thread Chao Yu
during the request. However, it seems that ->lru could be removed when folio is landing. Let's use page->private to chain temporary pages for now instead and transform EROFS formally after the topic of the folio / file page design is finalized. Cc: Matthew Wilcox Cc: Kent Overstreet

Re: [PATCH 7/7] erofs: lzma compression support

2021-10-19 Thread Chao Yu
memory footprint when dealing with I/O. Overlapped decompression is handled with 1) bounced buffer for data under processing or 2) extra short-lived pages from the on-stack pagepool which will be shared in the same read request (128KiB for example). Signed-off-by: Gao Xiang Acked-by: Chao Yu Thanks,

Re: [PATCH 6/7] erofs: rename some generic methods in decompressor

2021-10-19 Thread Chao Yu
. Signed-off-by: Gao Xiang Acked-by: Chao Yu Thanks,

Re: [PATCH v2 3/3] erofs: introduce readmore decompression strategy

2021-10-19 Thread Chao Yu
On 2021/10/17 23:42, Gao Xiang wrote: On Sun, Oct 17, 2021 at 11:34:22PM +0800, Chao Yu wrote: On 2021/10/9 4:08, Gao Xiang wrote: From: Gao Xiang Previously, the readahead window was strictly followed by EROFS decompression strategy in order to minimize extra memory footprint. However

Re: [PATCH v4 2/3] erofs: introduce the secondary compression head

2021-10-19 Thread Chao Yu
the primary algorithm for each compressed file, which can be used for upcoming LZMA compression and LZ4 range dictionary compression for various data patterns. It has been stayed in the EROFS roadmap for years. Complete it now! Reviewed-by: Yue Hu Signed-off-by: Gao Xiang Reviewed-by: Chao Yu

Re: [PATCH v2 3/3] erofs: introduce readmore decompression strategy

2021-10-17 Thread Chao Yu
On 2021/10/9 4:08, Gao Xiang wrote: From: Gao Xiang Previously, the readahead window was strictly followed by EROFS decompression strategy in order to minimize extra memory footprint. However, it could become inefficient if just reading the partial requested data for much big LZ4 pclusters and

Re: [PATCH v3 2/3] erofs: introduce the secondary compression head

2021-10-17 Thread Chao Yu
On 2021/10/10 2:12, Gao Xiang wrote: From: Gao Xiang Previously, for each HEAD lcluster, it can be either HEAD or PLAIN lcluster to indicate whether the whole pcluster is compressed or not. In this patch, a new HEAD2 head type is introduced to specify another compression algorithm other than

Re: [PATCH v2 1/3] erofs: get compression algorithms directly on mapping

2021-10-17 Thread Chao Yu
as well. Let's look up compression algorithms in z_erofs_map_blocks_iter() directly instead. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v6 2/2] erofs: add multiple device support

2021-10-17 Thread Chao Yu
On 2021/10/17 12:15, Gao Xiang wrote: Hi Chao, On Sun, Oct 17, 2021 at 10:10:15AM +0800, Chao Yu wrote: File won't locate in multidevices, right? otherwise it needs to shrink mapped length as well. Thanks for your review. File can be located in multi-devices. But it's intended as I

Re: [PATCH v6 2/2] erofs: add multiple device support

2021-10-16 Thread Chao Yu
. Note that it assumes no extent would cross device boundary and mkfs should take care of it seriously. In the future, a dedicated device manager could be introduced then thus extra devices can be automatically scanned by UUID as well. Cc: Chao Yu Reviewed-by: Liu Bo Signed-off-by: Gao Xiang

Re: [PATCH v4 1/2] erofs: decouple basic mount options from fs_context

2021-10-16 Thread Chao Yu
. Let's separate basic mount option usage from fs_context, thus multiple device information can be handled gracefully then. No logic changes. Cc: Liu Bo Cc: Chao Yu Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: fix compacted_2b if compacted_4b_initial > totalidx

2021-09-23 Thread Chao Yu
if (vi->z_advise & Z_EROFS_ADVISE_COMPACTED_2B) + if ((vi->z_advise & Z_EROFS_ADVISE_COMPACTED_2B) && + compacted_4b_initial <= totalidx) { btw, I've fixed up the build error due to redundant brace '{' when applying... It looks good to me after above fix. Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: fix misbehavior of unsupported chunk format check

2021-09-23 Thread Chao Yu
uses inode chunk indexes format by default.) Fixes: c5aa903a59db ("erofs: support reading chunk-based uncompressed files") Cc: Liu Bo Cc: Chao Yu Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH 2/2] erofs: clean up erofs_map_blocks tracepoints

2021-09-23 Thread Chao Yu
On 2021/9/21 22:35, Gao Xiang wrote: Since the new type of chunk-based files is introduced, there is no need to leave flatmode tracepoints. Rename to erofs_map_blocks. Add the missing FIEMAP tracepoint map flag as well. Signed-off-by: Gao Xiang --- fs/erofs/data.c | 31

Re: [PATCH 1/2] erofs: fix up erofs_lookup tracepoint

2021-09-23 Thread Chao Yu
Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: fix double free of 'copied'

2021-08-25 Thread Chao Yu
kfree(copied) to fix this. [1] https://lore.kernel.org/r/202108251030.belqozr7-...@intel.com Fixes: c5aa903a59db ("erofs: support reading chunk-based uncompressed files") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v2 2/2] erofs: support reading chunk-based uncompressed files

2021-08-20 Thread Chao Yu
On 2021/8/20 17:12, Gao Xiang wrote: Hi Chao, On Fri, Aug 20, 2021 at 05:04:13PM +0800, Chao Yu wrote: On 2021/8/19 14:33, Gao Xiang wrote: ... } +static int erofs_map_blocks(struct inode *inode, + struct erofs_map_blocks *map, int flags) +{ + struct

Re: [PATCH v2 2/2] erofs: support reading chunk-based uncompressed files

2021-08-20 Thread Chao Yu
x);/* chunk index */ + else + unit = 4; /* block map */ You mean sizeof(__le32)? Otherwise it looks good to me. Reviewed-by: Chao Yu Thanks, + + chunknr = map->m_la >> vi->chunkbits; + pos = ALIGN(iloc(EROFS_SB(sb), vi->nid) + vi->inode_isi

Re: [PATCH 2/2] erofs: support reading chunk-based uncompressed files

2021-08-18 Thread Chao Yu
On 2021/8/18 15:07, Gao Xiang wrote: + else if (vi->datalayout == EROFS_INODE_CHUNK_BASED) + /* fill chunked inode summary info */ + vi->chunkformat = __le16_to_cpu(die->i_u.c.format); le16_to_cpu(), kfree(copied);

Re: [PATCH 1/2] erofs: introduce chunk-based file on-disk format

2021-08-18 Thread Chao Yu
-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH 2/2] erofs: add fiemap support with iomap

2021-08-18 Thread Chao Yu
On 2021/8/13 13:29, Gao Xiang wrote: This adds fiemap support for both uncompressed files and compressed files by using iomap infrastructure. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v1.1 1/2] erofs: add support for the full decompressed length

2021-08-18 Thread Chao Yu
to get the full decompressed length. Note that it takes more metadata overhead and it'd be avoided if possible in the performance sensitive scenario. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH 1/2] erofs: add support for the full decompressed length

2021-08-16 Thread Chao Yu
On 2021/8/13 13:29, Gao Xiang wrote: 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

Re: [PATCH] erofs: remove the mapping parameter from erofs_try_to_free_cached_page()

2021-08-10 Thread Chao Yu
On 2021/8/10 15:24, Yue Hu wrote: From: Yue Hu The mapping is not used at all, remove it and update related code. Signed-off-by: Yue Hu Reviewed-by: Chao Yu Thanks,

Re: [PATCH] erofs: directly use wrapper erofs_page_is_managed() when shrinking

2021-08-10 Thread Chao Yu
On 2021/8/10 14:54, Yue Hu wrote: From: Yue Hu We already have the wrapper function to identify managed page. Signed-off-by: Yue Hu Reviewed-by: Chao Yu Thanks,

Re: [PATCH -next] erofs: make symbol 'erofs_iomap_ops' static

2021-08-08 Thread Chao Yu
On 2021/8/8 21:19, Gao Xiang wrote: On Sun, Aug 08, 2021 at 06:33:43AM +, Wei Yongjun wrote: The sparse tool complains as follows: fs/erofs/data.c:150:24: warning: symbol 'erofs_iomap_ops' was not declared. Should it be static? This symbol is not used outside of data.c, so marks it

Re: [PATCH v3 2/3] erofs: dax support for non-tailpacking regular file

2021-08-06 Thread Chao Yu
Xiang, On 2021/8/5 11:24, Gao Xiang wrote: Thanks, it originally inherited from filesystems/ext2.rst, I will update this into dax, dax={always,never} . Above change looks fine to me, thanks. Since for such image vm-shared memory scenario, no need to add per-file DAX (at least for

Re: [PATCH v3 3/3] erofs: convert all uncompressed cases to iomap

2021-08-04 Thread Chao Yu
On 2021/8/5 8:36, Gao Xiang wrote: Since tail-packing inline has been supported by iomap now, let's convert all EROFS uncompressed data I/O to iomap, which is pretty straight-forward. Cc: linux-fsde...@vger.kernel.org Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v3 2/3] erofs: dax support for non-tailpacking regular file

2021-08-04 Thread Chao Yu
ompression for the rest compressed physical clusters. == = +daxUse direct access (no page cache). See dax or dax=%s Otherwise, it looks good to me. Reviewed-by: Chao Yu Thanks,

<    1   2   3   4   5   6   7   >