Re: [PATCH v2] staging: erofs: use explicit unsigned int type

2018-09-07 Thread Gao Xiang
t; + const unsigned int advise = le16_to_cpu(v1->i_advise); > > vi->data_mapping_mode = __inode_data_mapping(advise); > > @@ -112,7 +112,7 @@ static int read_inode(struct inode *inode, void *data) > * try_lock since it takes no much overhead and > * will succ

Re: [PATCH] MAINTAINERS: add tree location for staging/erofs

2018-09-09 Thread Gao Xiang
On 2018/9/10 2:34, Thomas Weißschuh wrote: > Hi Chao, hi Gao, > > On Sun, 2018-09-09T23:16+0800, Chao Yu wrote: >> Hi Thomas, >> >> On 2018/9/8 11:28, Gao Xiang wrote: >>> Hi Thomas, >>> >>> Thanks for your new patch. >>> >>&g

Re: [PATCH 1/2 dhowells/mount-api] staging: erofs: rename superblock flags (MS_xyz -> SB_xyz)

2018-09-10 Thread Gao Xiang
Hi Greg, On 2018/9/10 16:13, Greg Kroah-Hartman wrote: > On Thu, Sep 06, 2018 at 06:37:37PM +0800, Gao Xiang wrote: >> >> >> On 2018/9/6 18:08, David Howells wrote: >>> Gao Xiang wrote: >>> >>>> This patch follows commit 1751e8a6cb93 ("Ren

Re: [PATCH] erofs: surround fault_injection ralted option parsing using CONFIG_EROFS_FAULT_INJECTION

2018-09-10 Thread Gao Xiang
)) 1558 return -ENOMEM; 1559 return 0; 1560 } 1561 ALLOW_ERROR_INJECTION(should_failslab, ERRNO); mm/failslab.c 17 bool __should_failslab(struct kmem_cache *s, gfp_t gfpflags) 18 { 19 /* No fault-injection for bootstrap cache */ 20 if (unlikely(s == kmem_cache))

Re: [PATCH] MAINTAINERS: add tree location for staging/erofs

2018-09-10 Thread Gao Xiang
Hi Thomas, On 2018/9/10 23:59, Chao Yu wrote: > On 2018/9/10 11:56, Gao Xiang wrote: >> >> >> On 2018/9/10 2:34, Thomas Weißschuh wrote: >>> Hi Chao, hi Gao, >>> >>> On Sun, 2018-09-09T23:16+0800, Chao Yu wrote: >>>> Hi Thomas, &

Re: [PATCH] erofs: option validation in remount

2018-09-11 Thread Gao Xiang
urn 0; > + > +out: > + if (ffi->inject_rate != orig_inject_rate) > + erofs_build_fault_attr(sbi, orig_inject_rate); Currently should be with "#ifdef CONFIG_EROFS_FAULT_INJECTION"? and have you tried to compile without EROFS_

Re: [staging:staging-next 118/220] drivers/staging/erofs/unzip_vle.c:1003:1-7: preceding lock on line 839 (fwd)

2018-09-11 Thread Gao Xiang
Hi Julia, There were lkp logs reporting that before, but I have no idea why it is reported. z_pagemap_global_lock is taken iff (pages = z_pagemap_global), and it is unlocked at > 3883a79a Gao Xiang 2018-07-26 987 if (pages == z_pagemap_global) > 3883a79a Gao Xiang 2018-07-26

Re: [PATCH] erofs: option validation in remount

2018-09-11 Thread Gao Xiang
Hi Chengguang, On 2018/9/11 23:37, cgxu519 wrote: > On 09/11/2018 07:08 PM, Gao Xiang wrote: >> Hi Chengguang, >> >> Thanks for your patch. >> >> The patch title should be "staging: erofs: " since erofs is still in staging. > Hi Xiang, > >

Re: [PATCH v4] staging: erofs: use explicit unsigned int type

2018-09-11 Thread Gao Xiang
er patchsets > > Note: This patchset should be applied with the "git am --scissors", to > remove the historic information and this note. > > -- >8 -- I personally think that is not the correct kernel patch style. Just as Greg's said, > These changes belong bel

Re: [PATCH 3/7] staging: erofs: introduce a new helper __erofs_build_fault_attr()

2018-09-12 Thread Gao Xiang
used variable ‘ffi’ [-Wunused-variable] struct erofs_fault_info *ffi = &sbi->fault_info; p.s. could you please rebase your patch on Thomas's [PATCH v4] staging: erofs: use explicit unsigned int type ? since I'm rebasing the rest PREVIEW patches on this commit now. p.p.s. I'

Re: [PATCH 3/7] staging: erofs: introduce a new helper __erofs_build_fault_attr()

2018-09-12 Thread Gao Xiang
On 2018/9/12 22:23, cgxu519 wrote: > On 09/12/2018 07:22 PM, Gao Xiang wrote: >> Hi Chengguang, >> >> On 2018/9/12 13:10, Chengguang Xu wrote: >>> Introduce a new helper __erofs_build_fault_attr() to handle set/clear >>> erofs_fault_info, we need this

Re: [PATCH v4] staging: erofs: use explicit unsigned int type

2018-09-13 Thread Gao Xiang
Hi Thomas, ping... On 2018/9/12 14:21, Gao Xiang wrote: > Hi Thomas, > > On 2018/9/11 3:41, Thomas Weißschuh wrote: >> Hi Chao, >> >> On Mon, 2018-09-10T23:59+0800, Chao Yu wrote: >>> [...] >>>>> I was not aware of this tree and worked off o

[PATCH 0/8] staging: erofs: error handing and more tracepoints

2018-09-14 Thread Gao Xiang
for decompression. Note that in this patchset, bare use of 'unsigned' and NULL comparison are also fixed compared with the preview patches according to the previous discussion in the staging mailing list. Thanks, Gao Xiang Chen Gong (2): staging: erofs: add trace points for reading zipped

[PATCH 1/8] staging: erofs: fix a missing endian conversion

2018-09-14 Thread Gao Xiang
This patch fixes a missing endian conversion in vle_get_logical_extent_head. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging

[PATCH 2/8] staging: erofs: clean up z_erofs_map_blocks_iter

2018-09-14 Thread Gao Xiang
nly `pblk' exists in erofs compression ondisk format. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 139 +- 1 file changed, 77 insertions(+), 62 deletions(-) diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/

[PATCH 3/8] staging: erofs: complete error handing of z_erofs_map_blocks_iter

2018-09-14 Thread Gao Xiang
This patch completes error handing of z_erofs_map_blocks_iter and vle_get_logical_extent_head, including no memory and io error cases. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 35 ++- 1 file changed, 26 insertions

[PATCH 4/8] staging: erofs: fix a bug when appling cache strategy

2018-09-14 Thread Gao Xiang
ng before it decides to cache the last compressed pack. caching strategy should work properly after appling this patch. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/erofs/un

[PATCH 5/8] staging: erofs: complete error handing of z_erofs_do_read_page

2018-09-14 Thread Gao Xiang
This patch completes error handing code of z_erofs_do_read_page. PG_error will be set when some read error happens, therefore z_erofs_onlinepage_endio will unlock this page without setting PG_uptodate. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 20

[PATCH 6/8] staging: erofs: avoid magic constants when initializing clusterbits

2018-09-14 Thread Gao Xiang
Currently erofs only supports clustersize == blocksize. and clustersize == 2^n * blocksize will be supported in the future. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/super.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging

[PATCH 7/8] staging: erofs: add trace points for reading zipped data

2018-09-14 Thread Gao Xiang
From: Chen Gong This patch adds trace points for reading zipped data. Signed-off-by: Chen Gong Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Gao Xiang --- drivers/staging/erofs/include/trace/events/erofs.h | 20 ++-- drivers/staging/erofs/unzip_vle.c

[PATCH 8/8] staging: erofs: replace BUG_ON with DBG_BUGON in data.c

2018-09-14 Thread Gao Xiang
From: Chen Gong This patch replace BUG_ON with DBG_BUGON in data.c, and add necessary error handler. Signed-off-by: Chen Gong Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/data.c | 31 --- 1 file changed, 20

Re: [PATCH v2 2/6] staging: erofs: code cleanup for option parsing of fault_injection

2018-09-18 Thread Gao Xiang
CTION); ^ drivers/staging/erofs/internal.h:176:51: note: each undeclared identifier is reported only once for each function it appears in #define set_opt(sbi, option) ((sbi)->mount_opt |= EROFS_MOUNT_##option) ^ drivers/staging/erofs/supe

Re: [PATCH 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Gao Xiang
Hi Greg, On 2018/9/18 19:19, Greg Kroah-Hartman wrote: > On Fri, Sep 14, 2018 at 10:40:22PM +0800, Gao Xiang wrote: >> In order to avoid conflicts with cleanup patches, Chao and I think >> it is better to send reviewed preview patches in the erofs mailing list >> to

Re: [PATCH 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Gao Xiang
Hi Greg, On 2018/9/18 20:14, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 08:02:30PM +0800, Gao Xiang wrote: >> Hi Greg, >> >> On 2018/9/18 19:19, Greg Kroah-Hartman wrote: >>> On Fri, Sep 14, 2018 at 10:40:22PM +0800, Gao Xiang wrote: >>>> In ord

Re: [PATCH 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Gao Xiang
On 2018/9/18 21:09, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 04:03:37PM +0300, Dan Carpenter wrote: >> On Tue, Sep 18, 2018 at 08:31:22PM +0800, Gao Xiang wrote: >>> (I have no clang environment to build kernel yet... :( I will try later, >>> but I

[PATCH] staging: erofs: initialize `pblk' with 0 first in `z_erofs_map_blocks_iter'

2018-09-18 Thread Gao Xiang
.html Reported-by: Greg Kroah-Hartman Thanks-to: Dan Carpenter Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c index ad3b7bb..3ff8adf 100644

Re: [PATCH v2 1/6] staging: erofs: code cleanup for erofs_kmalloc()

2018-09-18 Thread Gao Xiang
d-off-by: Chengguang Xu > > Reviewed-by: Chao Yu > Reviewed-by: Gao Xiang Thanks, Gao Xiang > Thanks, > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2 2/6] staging: erofs: code cleanup for option parsing of fault_injection

2018-09-18 Thread Gao Xiang
Hi Chengguang, On 2018/9/18 18:47, cgxu519 wrote: > On 09/18/2018 03:07 PM, Gao Xiang wrote: >> Hi Chengguang, >> >> On 2018/9/17 23:34, Chengguang Xu wrote: >>> Define a dummpy function of erofs_build_fault_attr() when macro >>> CONFIG_EROFS_FAULT_INJECTIO

Re: [PATCH] staging: erofs: initialize `pblk' with 0 first in `z_erofs_map_blocks_iter'

2018-09-18 Thread Gao Xiang
Hi Greg, On 2018/9/18 21:57, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 09:44:36PM +0800, Gao Xiang wrote: >> This commit message helps to understand why `pblk' is assigned with 0 here. >> >> [ Greg reported a warning raised by gcc. ] >> In file inc

[PATCH v2 1/8] staging: erofs: fix a missing endian conversion

2018-09-18 Thread Gao Xiang
This patch fixes a missing endian conversion in vle_get_logical_extent_head. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging

[PATCH v2 2/8] staging: erofs: clean up z_erofs_map_blocks_iter

2018-09-18 Thread Gao Xiang
nly `pblk' exists in erofs compression ondisk format. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 140 +- 1 file changed, 78 insertions(+), 62 deletions(-) diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/

[PATCH v2 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Gao Xiang
cussion in the staging mailing list. Thanks, Gao Xiang Chen Gong (2): staging: erofs: add trace points for reading zipped data staging: erofs: replace BUG_ON with DBG_BUGON in data.c Gao Xiang (6): staging: erofs: fix a missing endian conversion staging: erofs: clean up z_erofs_map_blocks_

[PATCH v2 3/8] staging: erofs: complete error handing of z_erofs_map_blocks_iter

2018-09-18 Thread Gao Xiang
This patch completes error handing of z_erofs_map_blocks_iter and vle_get_logical_extent_head, including no memory and io error cases. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 35 ++- 1 file changed, 26 insertions

[PATCH v2 4/8] staging: erofs: fix a bug when appling cache strategy

2018-09-18 Thread Gao Xiang
ng before it decides to cache the last compressed pack. caching strategy should work properly after appling this patch. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/erofs/un

[PATCH v2 6/8] staging: erofs: avoid magic constants when initializing clusterbits

2018-09-18 Thread Gao Xiang
Currently erofs only supports clustersize == blocksize. and clustersize == 2^n * blocksize will be supported in the future. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/super.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging

[PATCH v2 5/8] staging: erofs: complete error handing of z_erofs_do_read_page

2018-09-18 Thread Gao Xiang
This patch completes error handing code of z_erofs_do_read_page. PG_error will be set when some read error happens, therefore z_erofs_onlinepage_endio will unlock this page without setting PG_uptodate. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 20

[PATCH v2 7/8] staging: erofs: add trace points for reading zipped data

2018-09-18 Thread Gao Xiang
From: Chen Gong This patch adds trace points for reading zipped data. Signed-off-by: Chen Gong Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Gao Xiang --- drivers/staging/erofs/include/trace/events/erofs.h | 20 ++-- drivers/staging/erofs/unzip_vle.c

[PATCH v2 8/8] staging: erofs: replace BUG_ON with DBG_BUGON in data.c

2018-09-18 Thread Gao Xiang
From: Chen Gong This patch replace BUG_ON with DBG_BUGON in data.c, and add necessary error handler. Signed-off-by: Chen Gong Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/data.c | 31 --- 1 file changed, 20

Re: [PATCH v2 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Gao Xiang
Hi Greg, On 2018/9/18 22:36, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 10:25:32PM +0800, Gao Xiang wrote: >> change log v2: >> - fix a gcc warning reported by Greg for the patch >> staging: erofs: clean up z_erofs_map_blocks_iter >> >> &g

Re: [PATCH v3 2/4] staging: erofs: code cleanup for option parsing of fault_injection

2018-09-18 Thread Gao Xiang
ld match open parenthesis #163: FILE: drivers/staging/erofs/super.c:170: +static int erofs_build_fault_attr(struct erofs_sb_info *sbi, + substring_t *args) and you could add Reviewed-by: Gao Xiang Thanks, Gao Xiang > { > struct erofs_fault_info *

Re: [PATCH v3 3/4] staging: erofs: code cleanup for erofs_show_options()

2018-09-18 Thread Gao Xiang
On 2018/9/18 23:10, Chengguang Xu wrote: > Add new helper erofs_get_fault_rate() to get fault rate instead of > directly getting it from sbi, so we can remove the macro check > surrounding it. > > Signed-off-by: Chengguang Xu > Reviewed-by: Chao Yu Reviewed-by: Gao Xiang

Re: [PATCH v3 4/4] staging: erofs: option validation in remount

2018-09-18 Thread Gao Xiang
unsigned int rate) CHECK: Alignment should match open parenthesis #175: FILE: drivers/staging/erofs/super.c:181: +static void __erofs_build_fault_attr(struct erofs_sb_info *sbi, + unsigned int rate) And I think I need to test the basic e

[PATCH 2/6] staging: erofs: fold in `__update_workgrp_llen'

2018-09-18 Thread Gao Xiang
There is the only one user to use `__update_workgrp_llen'. Fold it in `z_erofs_vle_work_iter_begin' and cleanup related code. Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drive

[PATCH 1/6] staging: erofs: remove redundant CONFIG_EROFS_FS_XATTRs

2018-09-18 Thread Gao Xiang
some CONFIG_EROFS_FS_XATTR conditions were added because of the historial Linux kernel compatibility, which are unneeded now. Signed-off-by: Gao Xiang --- Hi all, These are cleanup patches in Chao's erofs-dev test tree for a while. Many of them are trivial. In order for all pr

[PATCH 3/6] staging: erofs: drop multiref support temporarily

2018-09-18 Thread Gao Xiang
ted in the future, it can be reverted later. Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 36 +--- drivers/staging/erofs/unzip_vle.h | 12 +--- 2 files changed, 6 insertions(+), 42 deletions(-) diff --git a/drivers/staging/erofs/unzi

[PATCH 4/6] staging: erofs: cleanup `z_erofs_vle_normalaccess_readpages'

2018-09-18 Thread Gao Xiang
This patch introduces `__should_decompress_synchronously' to cleanup `z_erofs_vle_normalaccess_readpages'. Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 11 +++ drivers/staging/erofs/super.c | 5 + drivers/staging/erofs/unzip_

[PATCH 5/6] staging: erofs: add some comments for xattr subsystem

2018-09-18 Thread Gao Xiang
As Dan Carpenter pointed out, it is better to document what return values of these callbacks in `struct xattr_iter_handlers' mean and why it->ofs is increased regardless of success or failure in `xattr_foreach'. Suggested-by: Dan Carpenter Signed-off-by: Gao Xiang --- drivers/

[PATCH 6/6] staging: erofs: simplify return value of `xattr_foreach'

2018-09-18 Thread Gao Xiang
As Dan Carpenter pointed out, there is no need to propagate positive return values back to its callers. Suggested-by: Dan Carpenter Signed-off-by: Gao Xiang --- drivers/staging/erofs/xattr.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/drivers

Re: [PATCH v3 4/4] staging: erofs: option validation in remount

2018-09-18 Thread Gao Xiang
Hi Chengguang, On 2018/9/19 0:58, Gao Xiang wrote: > Hi Chengguang, > > On 2018/9/18 23:10, Chengguang Xu wrote: >> Add option validation in remount. After this patch, remount >> can change recognized options, and for unknown options remount >> will fail and report

Re: [PATCH v4 0/3] staging: erofs: option validation for remount and some code cleanups

2018-09-19 Thread Gao Xiang
be avoided as much as possible because community guys could find something important like the yesterday patches). Once again, the detail information of branches is described in https://lists.ozlabs.org/listinfo/linux-erofs/ I have nothing more to say, good luck :) Thanks, Gao Xiang > >

Re: [PATCH 4/6] staging: erofs: cleanup `z_erofs_vle_normalaccess_readpages'

2018-09-19 Thread Gao Xiang
Hi Chao, On 2018/9/19 23:26, Chao Yu wrote: > Hi Xiang, > > On 2018/9/19 13:49, Gao Xiang wrote: >> This patch introduces `__should_decompress_synchronously' to >> cleanup `z_erofs_vle_normalaccess_readpages'. >> >> Signed-off-by: Gao Xiang >&g

Re: [PATCH 4/6] staging: erofs: cleanup `z_erofs_vle_normalaccess_readpages'

2018-09-19 Thread Gao Xiang
Hi Chao, On 2018/9/19 23:32, Gao Xiang via Linux-erofs wrote: > Hi Chao, > > On 2018/9/19 23:26, Chao Yu wrote: >> Hi Xiang, >> >> On 2018/9/19 13:49, Gao Xiang wrote: >>> This patch introduces `__should_decompress_synchronously' to >&g

Re: [PATCH 4/6] staging: erofs: cleanup `z_erofs_vle_normalaccess_readpages'

2018-09-19 Thread Gao Xiang
Hi Chao, On 2018/9/19 23:45, Chao Yu wrote: > Hi Xiang, > > On 2018/9/19 23:32, Gao Xiang wrote: >> Hi Chao, >> >> On 2018/9/19 23:26, Chao Yu wrote: >>> Hi Xiang, >>> >>> On 2018/9/19 13:49, Gao Xiang wrote: >>>> This pa

[PATCH v2 4/6] staging: erofs: cleanup `z_erofs_vle_normalaccess_readpages'

2018-09-19 Thread Gao Xiang
From: Gao Xiang This patch introduces `__should_decompress_synchronously' to cleanup `z_erofs_vle_normalaccess_readpages'. Signed-off-by: Gao Xiang --- change log v2: - Leave the original threshold "3" for DEFAULT_MAX_SYNC_DECOMPRESS_PAGES and just do the cleanup wor

Re: [PATCH] staging: erofs: fix undeclared symbols

2018-09-20 Thread Gao Xiang
struct z_erofs_vle_work *work) > { > struct z_erofs_vle_workgroup *grp = > z_erofs_vle_work_workgroup(work, true); How about making a separate patch to fix all the missing `static's? Or How about changing your patch title "staging: erofs: fix un

Re: [PATCH] staging: erofs: change inode related info in erofs_statfs()

2018-09-24 Thread Gao Xiang
al number of free file serial numbers. I'm afraid if f_files == sbi->inos, the actual inode number (nid) could be larger than f_files. I have no idea whether it could give undefined behavior to user program... Thanks, Gao Xiang > + buf->f_ffree = 0; > >

Re: [PATCH] staging: erofs: fix indenting to conform to kernel coding style

2018-10-05 Thread Gao Xiang
*__erofs_get_meta_page(struct super_block *sb, > > repeat: > page = find_or_create_page(mapping, blkaddr, gfp); > - if (unlikely(page == NULL)) { > + if (unlikely(!page)) { Here should be fixed too, but it is another case. Could you make another patch to fix the NULL poi

Re: [PATCH] staging: erofs: add SPDX identifer

2018-10-08 Thread Gao Xiang
H__ > > +// SPDX-License-Identifier: BSD-2-Clause For *.h files, it seems SPDX Identifier should be /* SPDX-License-Identifier: */ rather than // SPDX-License-Identifier: And I think it should be placed at the first line of the line, but I am not sure of that. Thanks, Gao Xiang > /*

Re: [PATCH v2] staging: erofs: add SPDX identifer

2018-10-08 Thread Gao Xiang
emove all the customized LZ4 decompression code), but lib/ code lz4def.h isn't export to include/. Thanks, Gao Xiang > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2] staging: erofs: add SPDX identifer

2018-10-08 Thread Gao Xiang
On 2018/10/8 22:36, Gao Xiang wrote: > Hi Greg, > > On 2018/10/8 22:22, Greg Kroah-Hartman wrote: >> Why delete that line? >> >> But wait, why do we even have this file at all? What's wrong with the >> lib/lz4/ code that we have in the kernel today? Shou

Re: [PATCH v2] staging: erofs: add SPDX identifer

2018-10-08 Thread Gao Xiang
Hi Greg, On 2018/10/8 22:43, Greg Kroah-Hartman wrote: > On Mon, Oct 08, 2018 at 10:36:39PM +0800, Gao Xiang wrote: >> Hi Greg, >> >> On 2018/10/8 22:22, Greg Kroah-Hartman wrote: >>> Why delete that line? >>> >>> But wait, why do we even have this

Re: [PATCH v2] staging: erofs: add SPDX identifer

2018-10-08 Thread Gao Xiang
Hi Loic, On 2018/10/8 23:00, loïc tourlonias wrote: > Hi Gao, > On Mon, Oct 8, 2018 at 4:48 PM Gao Xiang wrote: >> >> Hi Greg, >> >> On 2018/10/8 22:43, Greg Kroah-Hartman wrote: >>> On Mon, Oct 08, 2018 at 10:36:39PM +0800, Gao Xiang wrote: >>>>

[PATCH] staging: erofs: add the missing __init tags

2018-10-09 Thread Gao Xiang
Append __init to `erofs_init_inode_cache', `z_erofs_init_zip_subsystem' and move these declarations to internal.h. Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 6 ++ drivers/staging/erofs/super.c | 13 + drivers/staging/erofs/unzip_vle.c | 2 +

[PATCH] staging: erofs: harden inode lookup for 32-bit platforms

2018-10-09 Thread Gao Xiang
This patch introduces inode hash function, test and set callbacks, and iget5_locked to find the right inode for 32-bit platforms. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- The patch has been previewed in the linux-erofs mailing list, submit to the staging mailing list for linux-4.20

Re: [PATCH] staging: erofs: harden inode lookup for 32-bit platforms

2018-10-11 Thread Gao Xiang
On 2018/10/11 16:44, Dan Carpenter wrote: > On Tue, Oct 09, 2018 at 10:07:13PM +0800, Gao Xiang wrote: >> This patch introduces inode hash function, test and set callbacks, >> and iget5_locked to find the right inode for 32-bit platforms. >> > > The way I read this

Re: [PATCH] staging: erofs: harden inode lookup for 32-bit platforms

2018-10-11 Thread Gao Xiang
Hi Dan, On 2018/10/11 18:18, Dan Carpenter wrote: > On Thu, Oct 11, 2018 at 05:46:26PM +0800, Gao Xiang wrote: >> >> >> On 2018/10/11 16:44, Dan Carpenter wrote: >>> On Tue, Oct 09, 2018 at 10:07:13PM +0800, Gao Xiang wrote: >>>> This patch introduces i

Re: [PATCH] staging: erofs: harden inode lookup for 32-bit platforms

2018-10-11 Thread Gao Xiang
Hi Dan, On 2018/10/11 19:12, Dan Carpenter wrote: > On Thu, Oct 11, 2018 at 06:49:57PM +0800, Gao Xiang wrote: >> Hi Dan, >> >> On 2018/10/11 18:18, Dan Carpenter wrote: >>> On Thu, Oct 11, 2018 at 05:46:26PM +0800, Gao Xiang wrote: >>>> >>

[PATCH RESEND] staging: erofs: clean erofs_lookup()

2018-10-12 Thread Gao Xiang
From: Al Viro d_splice_alias() does the right thing when given ERR_PTR(-E...) for inode. No need for gotos, multiple returns, etc. in there. Signed-off-by: Al Viro Reviewed-by: Gao Xiang Signed-off-by: Gao Xiang --- Hi, Frankly, I think it is a straight-forward cleanup by Al enough

Re: [PATCH RESEND] staging: erofs: clean erofs_lookup()

2018-10-13 Thread Gao Xiang
Hi, Please ignore this patch, it has been queued by Al for 4.20 in https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git/commit/?h=for-next&id=8300807f9e2dffb6552514763ad60e005c12eb94 Sorry for bothering... Thanks, Gao Xiang On 2018/10/13 1:59, Gao Xiang via Linux-erofs wrote: &g

[PATCH] staging: erofs: remove the redundant d_rehash() for the root dentry

2018-11-03 Thread Gao Xiang
There is actually no need at all to d_rehash() for the root dentry as Al pointed out, fix it. Reported-by: Al Viro Cc: Al Viro Signed-off-by: Gao Xiang --- drivers/staging/erofs/super.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/erofs/super.c b/drivers/staging

[PATCH] staging: erofs: use the new LZ4_decompress_safe_partial()

2018-11-07 Thread Gao Xiang
patches in order to prepare for supporting multiple compression algorithms. Signed-off-by: Gao Xiang --- Hi Chao, Could you please kindly confirm (review) this before merging into the staging tree? Thanks, Gao Xiang drivers/staging/erofs/Makefile| 2 +- drivers/staging/erofs

Re: [PATCH] staging: erofs: use the new LZ4_decompress_safe_partial()

2018-11-07 Thread Gao Xiang
Hi Chao, On 2018/11/8 14:11, Chao Yu wrote: > On 2018/11/8 12:00, Gao Xiang wrote: >> LZ4_decompress_safe_partial() can now decode exactly the nb of bytes >> requested after the upstreamed commit 2209fda323e2 ("lib/lz4: update LZ4 >> decompressor module"

Re: How can I get user space tools of erofs?

2018-11-09 Thread Gao Xiang
4.html) in order to gain the competitive user experience comparing to uncompressed filesystem solutions. I will update a document to describe our core design and linux-erofs future roadmap in this linux-4.21 round. Thanks, Gao Xiang On 2018/11/9 16:37, cgxu519 wrote: > Hi Xiang, > >

[PATCH] staging: erofs: fix undefined LZ4_decompress_safe_partial()

2018-11-09 Thread Gao Xiang
It needs an explicit LZ4 library dependency if lz4 compression is enabled, found by kbuild randconfig. Reported-by: kbuild test robot Fixes: 05f9d4a0c8c4 ("staging: erofs: use the new LZ4_decompress_safe_partial()") Signed-off-by: Gao Xiang --- drivers/staging/erofs/Kconfig | 3 +

Re: [PATCH 3/3] staging: erofs: unzip_vle.c: Align parameter to the parentesis

2018-11-12 Thread Gao Xiang
On 2018/11/13 4:43, Cristian Sicilia wrote: > Align parameters to the opened parentesis. > > Signed-off-by: Cristian Sicilia Reviewed-by: Gao Xiang Thanks, Gao Xiang > --- > drivers/staging/erofs/unzip_vle.c | 11 ++- > 1 file changed, 6 insertions(+), 5 dele

Re: [PATCH 2/3] staging: erofs: unzip_vle.c: Constant in comparison on right side

2018-11-12 Thread Gao Xiang
On 2018/11/13 4:43, Cristian Sicilia wrote: > Comparisons should place the constant > on the right side of the test. > > Signed-off-by: Cristian Sicilia Reviewed-by: Gao Xiang Thanks, Gao Xiang > --- > drivers/staging/erofs/unzip_vle.c | 8 > 1 file change

Re: [PATCH 1/3] staging: erofs: unzip_vle.c: Replace comparison to NULL.

2018-11-12 Thread Gao Xiang
ood to me. I will rebase them on your work... Reviewed-by: Gao Xiang Thanks, Gao Xiang ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/3] staging: erofs: unzip_vle.c: Replace comparison to NULL.

2018-11-12 Thread Gao Xiang
if (z_erofs_workqueue) >>> return 0; >>> return -ENOMEM; OK, I will avoid these unnecessary ?: notations. >>> >>> >> I will replace the ?: too >> >> >>> Christian, this isn't your fault at all, I'm not rejecting this patch, >>> just providing hints on what else you can do here :) >>> >> >> >> but (if I well understand) I will send a different patch for both fix, >> right? > > Yes, nothing wrong with this one that I could see. I'll let the erofs > maintainers review it first before applying it in a few days to my tree These patches look good to me, and I will avoid this BUG_ON case by case as I promised to Al before moving out the staging tree. Thanks, Gao Xiang > > thanks, > > greg k-h > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH 02/10] staging: erofs: fix race when the managed cache is enabled

2018-11-20 Thread Gao Xiang
) ...unexpected behaviors * grp is detached but still used, which violates cache-managed freeze constraint. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 1 + drivers/staging/erofs/utils.c| 131 +++ 2 files changed, 93

[PATCH 00/10] staging: erofs: decompression stability enhancement

2018-11-20 Thread Gao Xiang
Hi, This patchset mainly focuses on erofs decompression stability, most of them are found in the internal beta test. Some patches which are still in testing or reviewing aren't included in this patchset and will be sent after carefully testing. Thanks, Gao Xiang Gao Xiang (10): staging:

[PATCH 01/10] staging: erofs: fix `trace_erofs_readpage' position

2018-11-20 Thread Gao Xiang
`trace_erofs_readpage' should be placed in .readpage() rather than in the internal `z_erofs_do_read_page'. Fixes: 284db12cfda3 ("staging: erofs: add trace points for reading zipped data") Reviewed-by: Chen Gong Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- d

[PATCH 03/10] staging: erofs: atomic_cond_read_relaxed on ref-locked workgroup

2018-11-20 Thread Gao Xiang
It's better to use atomic_cond_read_relaxed, which is implemented in hardware instructions to monitor a variable changes currently for ARM64, instead of open-coded busy waiting. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h

[PATCH 05/10] staging: erofs: add a full barrier in erofs_workgroup_unfreeze

2018-11-20 Thread Gao Xiang
Just like other generic locks, insert a full barrier in case of memory reorder. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h index

[PATCH 04/10] staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'

2018-11-20 Thread Gao Xiang
priority tasks preempt between atomic_cmpxchg and disable_preempt, then spin on the locked refcount later. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 41 1 file changed, 25 insertions(+), 16 deletions

[PATCH 06/10] staging: erofs: fix the definition of DBG_BUGON

2018-11-20 Thread Gao Xiang
_work *const work = ^~~~ Fix it to #define DBG_BUGON(x) ((void)(x)). Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/erofs/internal.h b/drivers/st

[PATCH 07/10] staging: erofs: separate into init_once / always

2018-11-20 Thread Gao Xiang
initialized at all. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 34 +- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c index ede3383ac

[PATCH 10/10] staging: erofs: rename strange variable names in z_erofs_vle_frontend

2018-11-20 Thread Gao Xiang
Previously, 2 members called `initial' and `cachedzone_la' are used for applying caching policy (whether the workgroup is at either end), which are hard to understand, rename them to `backmost' and `headoffset'. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- d

[PATCH 08/10] staging: erofs: locked before registering for all new workgroups

2018-11-20 Thread Gao Xiang
sion. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c index 4e5843e8ee35..a1376f3c6065 100644 --- a/driver

[PATCH 09/10] staging: erofs: decompress asynchronously if PG_readahead page at first

2018-11-20 Thread Gao Xiang
For the case of nr_to_read == lookahead_size, it is better to decompress asynchronously as well since no page will be needed immediately. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff

Re: [PATCH 04/10] staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 18:21, Greg Kroah-Hartman wrote: > On Tue, Nov 20, 2018 at 10:34:19PM +0800, Gao Xiang wrote: >> There are two minor issues in the current freeze interface: >> >>1) Freeze interfaces have not related with CONFIG_DEBUG_SPINLOCK, >>

Re: [PATCH 07/10] staging: erofs: separate into init_once / always

2018-11-22 Thread Gao Xiang
uch a issue in the future, or there are some potential race (work->nr_pages and work->vcnt != 0 when the previous workgroup == 0), it need to be noticed to developpers as early as possible. Thanks, Gao Xiang > > thanks, > > greg k-h __

Re: [PATCH 08/10] staging: erofs: locked before registering for all new workgroups

2018-11-22 Thread Gao Xiang
UGON(1); > Again, drop this, if it never fails, then there's no need for this. If > it can fail, then properly handle it. > > And trylock can fail, so this needs to be fixed. OK, I will drop this. Thanks, Gao Xiang > > thanks, _

Re: [PATCH 02/10] staging: erofs: fix race when the managed cache is enabled

2018-11-22 Thread Gao Xiang
cause we don't actually care about its performance (rarely locked). and the corresponding struct is too large for now, we need to decrease its size. Thanks, Gao Xiang > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproj

Re: [PATCH 01/10] staging: erofs: fix `trace_erofs_readpage' position

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 18:19, Greg Kroah-Hartman wrote: > On Tue, Nov 20, 2018 at 10:34:16PM +0800, Gao Xiang wrote: >> `trace_erofs_readpage' should be placed in .readpage() >> rather than in the internal `z_erofs_do_read_page'. > Why? What happens with the code to

Re: [PATCH 05/10] staging: erofs: add a full barrier in erofs_workgroup_unfreeze

2018-11-22 Thread Gao Xiang
use a memory barrier and the other way is to use ACQUIRE and RELEASE. we selected the first one. Hmmm...ok, I will add a simple message to explain this, but I think that is plain enough for a lock... Thanks, Gao Xiang > > thanks, > > greg k-h ___

Re: [PATCH 07/10] staging: erofs: separate into init_once / always

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 19:05, Greg Kroah-Hartman wrote: > On Thu, Nov 22, 2018 at 06:34:10PM +0800, Gao Xiang wrote: >> Hi Greg, >> >> On 2018/11/22 18:23, Greg Kroah-Hartman wrote: >>>> + >>>> + DBG_BUGON(work->nr_pages); >>>> + DB

Re: [PATCH 04/10] staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'

2018-11-22 Thread Gao Xiang
e need lock it on a < 0 value rather than 0. 2) spinlock_t is too large for us because every compressed page will have the structure, but the locking rarely happens. Thanks, Gao Xiang > > greg k-h ___ devel mailing list de...@linuxdriverp

Re: [PATCH 07/10] staging: erofs: separate into init_once / always

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 19:26, Greg Kroah-Hartman wrote: > On Thu, Nov 22, 2018 at 07:11:08PM +0800, Gao Xiang wrote: >> Hi Greg, >> >> On 2018/11/22 19:05, Greg Kroah-Hartman wrote: >>> On Thu, Nov 22, 2018 at 06:34:10PM +0800, Gao Xiang wrote: >>>> Hi

Re: [PATCH 02/10] staging: erofs: fix race when the managed cache is enabled

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 19:06, Greg Kroah-Hartman wrote: > On Thu, Nov 22, 2018 at 06:42:52PM +0800, Gao Xiang wrote: >> Hi Greg, >> >> On 2018/11/22 18:17, Greg Kroah-Hartman wrote: >>> Any specific reason why you are not using the refcount.h api instead of >>&

Re: [PATCH 07/10] staging: erofs: separate into init_once / always

2018-11-22 Thread Gao Xiang
served expression is false, we could get the whole memorydump as early as possible. But for commercial users, there are no such observing points to promise the kernel stability and performance. It has helped us to find several bug, and I cannot find some alternative way to get the the first sce

  1   2   3   4   5   6   7   8   9   >