Re: [PATCH 4/5] drivers: staging: erofs: Fix parentheses error in macro

2018-12-11 Thread Gao Xiang via Linux-erofs
Hi Joe, On 2018/12/11 23:48, Joe Perches wrote: > This macro is used only once and is merely obfuscation > for that one use. Please remove the macro and expand > it in the one place it is used. I am also considering to replace it in a plain way, it will be more straight-forward to describe its o

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

2018-11-22 Thread Gao Xiang via Linux-erofs
From: 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 --- drivers/staging

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

2018-11-22 Thread Gao Xiang via Linux-erofs
From: 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 delet

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

2018-11-22 Thread Gao Xiang via Linux-erofs
From: Gao Xiang `z_erofs_vle_workgroup' is heavily generated in the decompression, for example, it resets 32 bytes redundantly for 64-bit platforms even through Z_EROFS_VLE_INLINE_PAGEVECS + Z_EROFS_CLUSTER_MAX_PAGES, default 4, pages are stored in `z_erofs_vle_workgroup'. As an another example,

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

2018-11-22 Thread Gao Xiang via Linux-erofs
From: Gao Xiang Let's make sure that the one registering a workgroup will also take the primary work lock at first for two reasons: 1) There's no need to introduce such a race window (and consequently overhead) between registering and locking, other tasks could break in by chance, and

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

2018-11-22 Thread Gao Xiang via Linux-erofs
From: 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 | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/

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

2018-11-22 Thread Gao Xiang via Linux-erofs
From: Gao Xiang There are two minor issues in the current freeze interface: 1) Freeze interfaces have not related with CONFIG_DEBUG_SPINLOCK, therefore fix the incorrect conditions; 2) For SMP platforms, it should also disable preemption before doing atomic_cmpxchg in case tha

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

2018-11-22 Thread Gao Xiang via Linux-erofs
From: Gao Xiang When the managed cache is enabled, the last reference count of a workgroup must be used for its workstation. Otherwise, it could lead to incorrect (un)freezes in the reclaim path, and it would be harmful. A typical race as follows: Thread 1 (In the reclaim path) Thread 2 workg

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

2018-11-22 Thread Gao Xiang via Linux-erofs
From: 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 | 30 +++

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

2018-11-22 Thread Gao Xiang via Linux-erofs
From: Gao Xiang It's better not to positively BUG_ON the kernel, however developers need a way to locate issues as soon as possible. DBG_BUGON is introduced and it could only crash when EROFS_FS_DEBUG (EROFS developping feature) is on. It is helpful for developers to find and solve bugs quickly

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

2018-11-22 Thread Gao Xiang via Linux-erofs
From: Gao Xiang `trace_erofs_readpage' was designed for .readpage() interface hook in order to trace the detailed synchronized read rather than the internal implementation `z_erofs_do_read_page' which both .readpage() and .readpages() use. It seems the tracepoint was placed to a wrong place by m

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

2018-11-22 Thread Gao Xiang via Linux-erofs
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 Changelog from v1 === o fix a r

Re: [PREVIEW] [RFC PATCH 2/5] erofs-mkfs: introduce mkfs basic framework

2018-11-17 Thread Gao Xiang via Linux-erofs
Hi Guifu, On 2018/11/16 11:30, bluce.ligu...@huawei.com wrote: > From: Li Guifu > > This patch adds basic code to generate erofs file systems and > empty images can be created properly. > > Some parameters are also introduced in this patch, used for > setting the debugging level, whether to com

Re: [PREVIEW] [RFC PATCH 1/5] erofs-mkfs: add erofs on-disk layout

2018-11-17 Thread Gao Xiang via Linux-erofs
On 2018/11/16 11:30, bluce.ligu...@huawei.com wrote: > From: Li Guifu > > This patch adds a header file describing the erofs on-disk layout, which > should be kept in line with the kernel implementation all the time. > > Signed-off-by: Li Guifu > Signed-off-by: Miao Xie > Signed-off-by: Fan

Re: [PATCH] staging: erofs: select LZ4_DECOMPRESS to fix build error

2018-11-09 Thread Gao Xiang via Linux-erofs
Hi Randy, Thanks for taking time, I have sent a patch to Greg fixing this issue. :) https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?h=staging-testing&id=7962e63a2f4140631ad10d475d96193a3bc8ec2f Thanks, Gao Xiang On 2018/11/10 1:58, Randy Dunlap wrote: > From: Randy Dun

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

2018-11-09 Thread Gao Xiang via Linux-erofs
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 ++- 1 file cha

Re: [Outreachy kernel] Re: [PATCH v3 2/2] staging: erofs: Modify conditional checks

2018-11-05 Thread Gao Xiang via Linux-erofs
Hi Bhagyashri, On 2018/11/6 2:07, Bhagyashri Dighole wrote: > Hi Gao, > > In PATCH version v1 which is first stage of contribution, I modified data.c > for all alignment changes and all conditional checks. As per discussion on > email for this patch, It was concluded that I need to re-submit pa

Re: [PATCH chao/erofs-dev 1/2] staging: erofs: separate into init_once / always

2018-11-04 Thread Gao Xiang via Linux-erofs
Hi Chao, On 2018/11/4 23:35, Chao Yu wrote: > Yes, it needs rebase below two patches to last erofs-dev branch. > > staging: erofs: separate into init_once / always > staging: erofs: locked before registering for all new workgroups > > Thanks, I think the erofs-dev branch is missing a upstreamed

Re: [PATCH chao/erofs-dev 1/2] staging: erofs: separate into init_once / always

2018-11-04 Thread Gao Xiang via Linux-erofs
Hi Chao, On 2018/11/4 23:27, Chao Yu wrote: > Hi Xiang, > > On 2018-11-4 18:04, Gao Xiang via Linux-erofs wrote: >> Hi Chao, >> >> On 2018/11/2 18:26, Chao Yu wrote: >>> Hi Xiang, >>> >>> On 2018/10/31 10:39, Gao Xiang wrote: >>>>

Re: [PATCH chao/erofs-dev 1/2] staging: erofs: separate into init_once / always

2018-11-04 Thread Gao Xiang via Linux-erofs
Hi Chao, On 2018/11/2 18:26, Chao Yu wrote: > Hi Xiang, > > On 2018/10/31 10:39, Gao Xiang wrote: >> Hi Chao, >> >> Could you please update chao/erofs-dev branch based on the linus tree and >> add the following patch? >> >> =patchset== >> staging: erofs: fix `trace_erofs_readpage' positi

[PREVIEW] [RFC PATCH chao/erofs-dev v2 RESEND] staging: erofs: decompress asynchronously if PG_readahead page at first

2018-10-28 Thread Gao Xiang via Linux-erofs
From: 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. Signed-off-by: Gao Xiang --- change log v2: - fix the condition that it could missing flags if some pages fail to add_to_page_cache_lru

[PREVIEW] [RFC PATCH chao/erofs-dev v2] staging: erofs: decompress asynchronously if PG_readahead page at first

2018-10-28 Thread Gao Xiang via Linux-erofs
From: 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. Signed-off-by: Gao Xiang --- change log v2: - fix the condition that it could missing flags if some pages fail to add_to_page_cache_lru

[PREVIEW] [RFC PATCH chao/erofs-dev] staging: erofs: decompress asynchronously if PG_readahead page at first

2018-10-28 Thread Gao Xiang via Linux-erofs
From: 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. Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a

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

2018-10-13 Thread Gao Xiang via Linux-erofs
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 RESEND] staging: erofs: clean erofs_lookup()

2018-10-12 Thread Gao Xiang via Linux-erofs
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] clean erofs_lookup()

2018-10-10 Thread Gao Xiang via Linux-erofs
Hi Alexander, On 2018/10/11 3:01, Al Viro wrote: > d_splice_alias() does the right thing when given > ERR_PTR(-E...) for inode. No need for gotos, multiple > returns, etc. in there. That is correct :) Thanks for your patch and attention. Once in the first version we used "d_add" rather th

Re: [PREVIEW] [PATCH chao/erofs-dev 2/3] staging: erofs: fix race when the managed cache is enabled

2018-10-01 Thread Gao Xiang via Linux-erofs
Hi Chao, On 2018/10/1 17:49, Chao Yu wrote: > On 2018-9-21 11:43, Gao Xiang wrote: >> When the managed cache is enabled, the last reference count >> of a workgroup must be used for its workstation. >> >> Otherwise, it could lead to incorrect (un)freezes in >> the reclaim path, and it would be harm

Re: [PREVIEW] [PATCH chao/erofs-dev 1/3] staging: erofs: harden inode lookup for 32-bit platforms

2018-10-01 Thread Gao Xiang via Linux-erofs
Hi Chao, On 2018/10/1 18:25, Chao Yu wrote: > Hi Xiang, > > On 2018-10-1 10:08, Gao Xiang wrote: >> Hi Chao, >> >> On 2018/10/1 8:37, Chao Yu wrote: >>> Hi Xiang, >>> >>> Sorry for late response to those patches. >> That doesn't matter I know you are now busy with f2fs stuffs. ;) > Yeah, still st

[PREVIEW][PATCH v2 chao/erofs-dev] staging: erofs: harden inode lookup for 32-bit platforms

2018-09-30 Thread Gao Xiang via Linux-erofs
From: Gao Xiang This patch introduces inode hash function, test and set callbacks, and iget5_locked to find the right inode for 32-bit platforms. Signed-off-by: Gao Xiang --- drivers/staging/erofs/inode.c| 37 - drivers/staging/erofs/internal.h | 9

Re: [PREVIEW] [PATCH chao/erofs-dev 1/3] staging: erofs: harden inode lookup for 32-bit platforms

2018-09-30 Thread Gao Xiang via Linux-erofs
Hi Chao On 2018/10/1 11:04, Chao Yu wrote: >> /* inode.c */ >> +static inline unsigned long erofs_inode_hash(erofs_nid_t nid) >> +{ >> +u64 h = nid; > unsigned long h; > >> + >> +#if BITS_PER_LONG == 32 >> +h = (h >> 32) ^ (h & 0x); > h = (nid >> 32) ^ (nid & 0x); > >> +

Re: [PREVIEW] [PATCH chao/erofs-dev 1/3] staging: erofs: harden inode lookup for 32-bit platforms

2018-09-30 Thread Gao Xiang via Linux-erofs
Hi Chao, On 2018/10/1 9:57, Chao Yu wrote: > On 2018-9-21 11:43, 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. >> >> Signed-off-by: Gao Xiang >> --- >> drivers/staging/erofs/inode.c| 37

Re: [PREVIEW] [PATCH chao/erofs-dev 1/3] staging: erofs: harden inode lookup for 32-bit platforms

2018-09-30 Thread Gao Xiang via Linux-erofs
Hi Chao, On 2018/10/1 8:37, Chao Yu wrote: > Hi Xiang, > > Sorry for late response to those patches. That doesn't matter I know you are now busy with f2fs stuffs. ;) I have to deal with internal reported issues which could impact our products and do more cleanup apart from stability fixes. It

Re: [PREVIEW] [PATCH chao/erofs-dev 1/3] staging: erofs: harden inode lookup for 32-bit platforms

2018-09-30 Thread Gao Xiang via Linux-erofs
Hi Chao, Could you help merge these patches into erofs-dev (rebased on the latest erofs-master)? I need to fix several issues reported these days formally. If you have time, could you also take some time review these patches? Thanks, Gao Xiang On 2018/9/21 11:43, Gao Xiang wrote: > This patch

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

2018-09-20 Thread Gao Xiang via Linux-erofs
Hi Thomas, On 2018/9/21 2:58, Thomas Weißschuh wrote: > Move all internal symbols to the internal header file and add a missing > "static" declaration. > This fixes the sparse warnings like the following: > > drivers/staging/erofs/unzip_lz4.c:230:5: warning: symbol 'z_erofs_unzip_lz4' > was not

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

2018-09-19 Thread Gao Xiang via Linux-erofs
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 work. drivers/staging/ero

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

2018-09-19 Thread Gao Xiang via Linux-erofs
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 patch introduces `__should_decompress_synchronously' to cleanup `z_erofs_

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

2018-09-19 Thread Gao Xiang via Linux-erofs
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 via Linux-erofs
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 >> --- >> drivers/staging/erofs/internal.h | 11 +

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

2018-09-19 Thread Gao Xiang via Linux-erofs
Hi Chengguang, On 2018/9/19 22:53, Chengguang Xu wrote: > Hi Greg, Xiang > > I rebased code on latest erofs-master branch and that branch > has already merged the first patch in my previous patchset, > so this time I only post rest 3 patches. Great, at the most time Chao's erofs-master is the sa

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

2018-09-18 Thread Gao Xiang via Linux-erofs
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 error. > > Signed-off-by: Chengguang Xu > Reviewed-by: Chao Yu > --- > drivers/staging/e

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

2018-09-18 Thread Gao Xiang via Linux-erofs
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 Thanks, Gao Xiang

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

2018-09-18 Thread Gao Xiang via Linux-erofs
Hi Chengguang, On 2018/9/18 23:10, Chengguang Xu wrote: > Define a dummpy function of erofs_build_fault_attr() when macro > CONFIG_EROFS_FAULT_INJECTION is disabled, so that we don't have to > check the macro in calling place. Based on above adjustment, > do proper code cleanup for option parsing

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

2018-09-13 Thread Gao Xiang via Linux-erofs
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 of staging / next. > A patch is attached to this mes

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

2018-09-12 Thread Gao Xiang via Linux-erofs
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 funciton for internal use case. >>> for exam

Re: [PATCH 6/6] staging: erofs: fix 1 warning and 9 checks

2018-09-02 Thread Gao Xiang via Linux-erofs
On 2018/9/3 9:49, Chao Yu wrote: > On 2018/8/30 23:14, Pavel Zemlyanoy wrote: >> This patch does not change the logic, it only >> corrects the formatting and checkpatch checks by >> braces {} should be used on all arms of this statement, >> unbalanced braces around else statement and warning by

Re: [PATCH 5/6] staging: erofs: formatting alignment parenthesis

2018-09-02 Thread Gao Xiang via Linux-erofs
On 2018/9/3 9:49, Chao Yu wrote: > On 2018/8/30 23:14, Pavel Zemlyanoy wrote: >> This patch does not change the logic, it only >> corrects the formatting and checkpatch check by >> alignment should match open parenthesis. >> >> The patch fixes 2 check of type: >> "Check: Alignment should match o

Re: [PATCH 4/6] staging: erofs: formatting add spaces arround '*'

2018-09-02 Thread Gao Xiang via Linux-erofs
On 2018/9/3 9:48, Chao Yu wrote: > On 2018/8/30 23:14, Pavel Zemlyanoy wrote: >> This patch does not change the logic, it only >> corrects the formatting and checkpatch check by >> adding spaces around '*'. >> >> The patch fixes 1 check of type: >> "Check: spaces preferred around that '*'". >> >

Re: [PATCH 3/6] staging: erofs: formatting spaces around '-'

2018-09-02 Thread Gao Xiang via Linux-erofs
On 2018/9/3 9:48, Chao Yu wrote: > On 2018/8/30 23:13, Pavel Zemlyanoy wrote: >> This patch does not change the logic, it only >> corrects the formatting and checkpatch checks by >> adding spaces around '-'. >> >> The patch fixes 4 checks of type: >> "Check: spaces preferred around that '-'". >>

Re: [PATCH 1/6] staging: erofs: formatting fix in unzip_vle_lz4.c

2018-09-02 Thread Gao Xiang via Linux-erofs
On 2018/9/3 9:47, Chao Yu wrote: > On 2018/8/30 23:13, Pavel Zemlyanoy wrote: >> >> This patch does not change the logic, it only >> corrects the formatting and checkpatch warnings by >> adding "int" to the unsigned type. >> >> The patch fixes 11 warnings of the type: >> "WARNING: Prefer 'unsign

Re: [PATCH 2/6] staging: erofs: formatting fix to NULL comparison

2018-09-02 Thread Gao Xiang via Linux-erofs
Hi, On 2018/9/3 9:59, Chao Yu wrote: > On 2018/8/31 17:41, Dan Carpenter wrote: >> On Fri, Aug 31, 2018 at 11:29:03AM +0800, Chao Yu wrote: >>> >>> Hi Xiang, >>> >>> I'm not against this change which follows checkpatch's rule, since I think >>> this >>> can help to unify coding style in different

Re: [PATCH 2/6] staging: erofs: formatting fix to NULL comparison

2018-08-30 Thread Gao Xiang via Linux-erofs
On 2018/8/31 0:09, Gao Xiang via Linux-erofs wrote: > Hi Pavel, > > On 2018/8/30 23:13, Pavel Zemlyanoy wrote: >> This patch does not change the logic, it only >> corrects the formatting and checkpatch checks by >> to NULL comparison. >> >> The patch fi

Re: [PATCH 2/6] staging: erofs: formatting fix to NULL comparison

2018-08-30 Thread Gao Xiang via Linux-erofs
Hi Pavel, On 2018/8/30 23:13, Pavel Zemlyanoy wrote: > This patch does not change the logic, it only > corrects the formatting and checkpatch checks by > to NULL comparison. > > The patch fixes 5 checks of type: > "Comparison to NULL could be written". > > Signed-off-by: Pavel Zemlyanoy Sorry

Re: [PATCH] Revert "staging: erofs: disable compiling temporarile"

2018-08-28 Thread Gao Xiang via Linux-erofs
On 2018/8/29 7:44, Stephen Rothwell wrote: > Unfortunately, those vfs changes are still in the vfs tree in > linux-next and cause a build failure in the erofs code. I have > disabled the build of erofs again for today. feel a bit loss after hear that... :'( > > Dave, Al, it would be good if y

Re: [PATCH] Revert "staging: erofs: disable compiling temporarile"

2018-08-28 Thread Gao Xiang via Linux-erofs
Hi Greg, On 2018/8/28 21:05, Greg Kroah-Hartman wrote: > On Tue, Aug 28, 2018 at 04:56:43PM +0800, Chao Yu wrote: >> Hi Greg, >> >> On 2018/8/28 14:28, Gao Xiang wrote: >>> Hi Greg, >>> >>> On 2018/8/28 13:44, Greg Kroah-Hartman wrote: On Tue, Aug 28, 2018 at 11:39:48AM +0800, Gao Xiang wrote

[PREVIEW] [PATCH v2] Revert "staging: erofs: disable compiling temporarile"

2018-08-27 Thread Gao Xiang via Linux-erofs
This reverts commit 156c3df8d4db4e693c062978186f44079413d74d Because of XArray and the new mount apis aren't merged in 4.19 merge window, the BROKEN mark can be reverted directly without any problems. Fixes: 156c3df8d4db ("staging: erofs: disable compiling temporarile") Signed-off-by: Gao Xiang

[PREVIEW] [PATCH] Revert "staging: erofs: disable compiling temporarile"

2018-08-27 Thread Gao Xiang via Linux-erofs
This reverts commit 156c3df8d4db4e693c062978186f44079413d74d Because of XArray and the new mount api isn't merged in 4.19 merge window, the BROKEN mark can be reverted directly without any problems. Fixes: 156c3df8d4db ("staging: erofs: disable compiling temporarile") Signed-off-by: Gao Xiang --

Re: [PATCH] staging: erofs: fix error handling in __erofs_get_meta_page

2018-08-20 Thread Gao Xiang via Linux-erofs
Hi Chao, On 2018/8/20 22:59, Chao Yu wrote: > On 2018/8/20 21:29, Gao Xiang wrote: >> As Dan reported in LKP's mailing list: >> >> https://lists.01.org/pipermail/kbuild-all/2018-August/051419.html >> >> New smatch warnings: >> drivers/staging/erofs/internal.h:446 erofs_grab_bio() warn: should 'blk

[PREVIEW] [PATCH 1/2] staging: erofs: add some comments for xattr subsystem

2018-08-13 Thread Gao Xiang via Linux-erofs
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/staging/erofs/xatt

[PREVIEW] [RFC PATCH 2/2] staging: erofs: simplify return value of xattr_foreach

2018-08-13 Thread Gao Xiang via Linux-erofs
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 --- If some error, please help point out. And any comments are welcomed. :) Thanks, Gao Xiang drivers/staging/erofs/xattr.c | 24 ++

[PREVIEW] [PATCH v3 staging-next 3/8] staging: erofs: add error handling for xattr submodule

2018-08-13 Thread Gao Xiang via Linux-erofs
From: Gao Xiang This patch enhances the missing error handling code for xattr submodule, which improves the stability for the rare cases. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- change log v3: - fix bare use of 'unsigned *' at drivers/staging/erofs/xattr.c:16

[PREVIEW] [PATCH v2 staging-next 6/8] staging: erofs: fix vle_decompressed_index_clusterofs

2018-08-13 Thread Gao Xiang via Linux-erofs
From: Gao Xiang This patch adds error handing code, and fixes a missing endian conversion in vle_decompressed_index_clusterofs. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- change log v2: - fix as pointed out by Dan Carpenter : don't make functions inline d

[PREVIEW] [PATCH RESEND staging-next 5/8] staging: erofs: rearrange vle clustertype definitions

2018-08-13 Thread Gao Xiang via Linux-erofs
From: Gao Xiang This patch moves vle clustertype definitions to erofs_fs.h since they are part of on-disk format. It also adds compile time check for Z_EROFS_VLE_DI_CLUSTER_TYPE_BITS Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- drivers/staging/erofs/erofs_fs.h |

[PREVIEW] [PATCH RESEND staging-next 8/8] staging: erofs: fix compression mapping beyond EOF

2018-08-13 Thread Gao Xiang via Linux-erofs
From: Gao Xiang Logical address of EOF LTP mapping should start at `inode->i_size' rather than `inode->i_size - 1' to `m_la(in)', fix it. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- drivers/staging/erofs/unzip_vle.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PREVIEW] [PATCH RESEND staging-next 7/8] staging: erofs: fix integer overflow on 32-bit platform

2018-08-13 Thread Gao Xiang via Linux-erofs
From: Gao Xiang This patch fixes integer overflow on multiplication of 32-bit `lcn' in z_erofs_map_blocks_iter. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- drivers/staging/erofs/unzip_vle.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PREVIEW] [PATCH RESEND staging-next 4/8] staging: erofs: cleanup z_erofs_vle_work_{lookup, register}

2018-08-13 Thread Gao Xiang via Linux-erofs
From: Gao Xiang This patch introduces 'struct z_erofs_vle_work_finder' to clean up arguments of z_erofs_vle_work_lookup and z_erofs_vle_work_register. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- drivers/staging/erofs/unzip_vle.c | 89 +

[PREVIEW] [PATCH v2 staging-next 3/8] staging: erofs: add error handling for xattr submodule

2018-08-13 Thread Gao Xiang via Linux-erofs
From: Gao Xiang This patch enhances the missing error handling code for xattr submodule, which improves the stability for the rare cases. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- change log v2: - fix as pointed out by Dan Carpenter : 1) drop all likely/unl

[PREVIEW] [PATCH v3 staging-next 2/8] staging: erofs: separate erofs_get_meta_page

2018-08-13 Thread Gao Xiang via Linux-erofs
From: Gao Xiang This patch separates 'erofs_get_meta_page' into 'erofs_get_meta_page' and 'erofs_get_meta_page_nofail'. The second one ensures that it should not fail under memory pressure and should make best efforts if IO errors occur. It also adds auxiliary variables in order to fulfill 80 ch

[PREVIEW] [PATCH RESEND staging-next 1/8] staging: erofs: introduce erofs_grab_bio

2018-08-13 Thread Gao Xiang via Linux-erofs
From: Gao Xiang this patch renames prepare_bio to erofs_grab_bio, and adds a nofail option in order to retry in the bio allocator under memory pressure. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- drivers/staging/erofs/data.c | 12 ++-- drivers/stagi

Re: [PATCH] staging: erofs: change 'unsigned' to 'unsigned int'

2018-08-13 Thread Gao Xiang via Linux-erofs
Hi Leon, On 2018/8/13 23:20, Leon Imhof wrote: > Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'" > detected by checkpatch.pl > > Signed-off-by: Leon Imhof > --- Thanks for the patch, could be better if use `[PATCH v2]' to indicate that you send a new version of `[PATCH]

Re: [PREVIEW] [PATCH v3 2/3] staging: erofs: separate erofs_get_meta_page

2018-08-12 Thread Gao Xiang via Linux-erofs
Hi Chao, On 2018/8/12 18:54, Chao Yu wrote: > On 2018/8/11 0:48, Gao Xiang wrote: >> This patch separates 'erofs_get_meta_page' into 'erofs_get_meta_page' >> and 'erofs_get_meta_page_nofail'. The second one ensures that it >> should not fail under memory pressure and should make best efforts >> if

[PREVIEW] [PATCH v4 2/3] staging: erofs: separate erofs_get_meta_page

2018-08-12 Thread Gao Xiang via Linux-erofs
From: Gao Xiang This patch separates 'erofs_get_meta_page' into 'erofs_get_meta_page' and 'erofs_get_meta_page_nofail'. The second one ensures that it should not fail under memory pressure and should make best efforts if IO errors occur. It also adds auxiliary variables in order to fulfill 80 ch

[PREVIEW] [PATCH v4 05/10] staging: erofs: fix integer overflow on 32-bit platform

2018-08-12 Thread Gao Xiang via Linux-erofs
From: Gao Xiang This patch fixes integer overflow on multiplication of 32-bit `lcn' in z_erofs_map_blocks_iter. Reviewed-by: Chao Yu Signed-off-by: Chao Yu Signed-off-by: Gao Xiang --- change log v4: - fix commit message a bit. change log v3: - spilt into small patches at Chao's suggestion.

[PREVIEW] [PATCH v4 06/10] staging: erofs: fix compression mapping beyond EOF

2018-08-12 Thread Gao Xiang via Linux-erofs
From: Gao Xiang Logical address of EOF LTP mapping should start at `inode->i_size' rather than `inode->i_size - 1' to `m_la(in)', fix it. Reviewed-by: Chao Yu Signed-off-by: Chao Yu Signed-off-by: Gao Xiang --- change log v4: - fix the description `m_la(in) + 1 - inode->i_size' to `m_la(i

Re: [WIP] [PATCH] staging: erofs: cleanup z_erofs_do_read_page

2018-08-10 Thread Gao Xiang via Linux-erofs
Hi Chao, On 2018/8/10 16:59, Chao Yu wrote: > Hi Xiang, > > On 2018/8/10 14:59, Gao Xiang wrote: >> Hi Chao, >> >> On 2018/8/10 14:53, Chao Yu wrote: >>> On 2018/8/9 18:09, Gao Xiang wrote: This patch adds error handing code, and fixes a bug when appling caching policy, which can cause

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

2018-08-10 Thread Gao Xiang via Linux-erofs
ping... On 2018/7/30 3:26, 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. > > Signed-off-by: Gao Xiang > --- > > fix the commit message > > drivers/staging/erofs/inode.c| 37 +++

Re: [PATCH] staging: erofs: fix if assignment style issue

2018-08-05 Thread Gao Xiang via Linux-erofs
Hi Kristaps, On 2018/8/5 23:21, Kristaps Čivkulis wrote: > Fix coding style issue "do not use assignment in if condition" > detected by checkpatch.pl. > > Signed-off-by: Kristaps Čivkulis I don't know whether this rule is mandatory or not for the current linux kernel when I checked the original

Re: [PATCH v2] staging: erofs: disable compiling temporarile

2018-08-02 Thread Gao Xiang via Linux-erofs
Hi Chao, On 2018/8/2 17:39, Chao Yu wrote: > As Stephen Rothwell reported: > > "After merging the staging tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > drivers/staging/erofs/super.c: In function 'erofs_read_super': > drivers/staging/erofs/super.c:343:17: error: 'MS_R

Re: [PATCH] staging: erofs: disable compiling temporarile

2018-08-02 Thread Gao Xiang via Linux-erofs
On 2018/8/2 16:11, Chao Yu wrote: > As Stephen Rothwell reported: > > "After merging the staging tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > drivers/staging/erofs/super.c: In function 'erofs_read_super': > drivers/staging/erofs/super.c:343:17: error: 'MS_RDONLY'

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

2018-07-29 Thread Gao Xiang via Linux-erofs
This patch introduces inode hash function, test and set callbacks, and iget5_locked to find the right inode for 32-bit platforms. Signed-off-by: Gao Xiang --- fix the commit message drivers/staging/erofs/inode.c| 37 +++- drivers/staging/erofs/internal.h | 10 ++

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

2018-07-29 Thread Gao Xiang via Linux-erofs
This patch introduces inode hash function, test and set callbacks, and iget5_locked to find the right inode for 32-bit platform. Signed-off-by: Gao Xiang --- drivers/staging/erofs/inode.c| 37 +++- drivers/staging/erofs/internal.h | 10 + 2 files changed,

[PATCH 2/2] staging: erofs: fix conditional uninitialized `pcn' in z_erofs_map_blocks_iter

2018-07-28 Thread Gao Xiang via Linux-erofs
This patch adds error handling code for z_erofs_map_blocks_iter to fix the compiler blame. Signed-off-by: Gao Xiang --- let's solve the compiler warning first, more error handling code for other functions will be added in the future patch. drivers/staging/erofs/unzip_vle.c | 25 +++

[PATCH 1/2] staging: erofs: fix compile error without built-in decompression support

2018-07-28 Thread Gao Xiang via Linux-erofs
This patch fixes incorrect code snippets due to spilt code into small patches by mistake. Link: https://lists.01.org/pipermail/kbuild-all/2018-July/050747.html Link: https://lists.01.org/pipermail/kbuild-all/2018-July/050750.html Reported-by: kbuild test robot Signed-off-by: Gao Xiang --- I tes

Re: [WIP] [NOMERGE] [RFC PATCH v0.3 3/6] erofs: introduce erofs_map_blocks_iter

2018-06-30 Thread Gao Xiang via Linux-erofs
Hi Chao, On 2018/7/1 12:17, Gao Xiang wrote: , I permanently dropped the last patch of EROFS v1 locally  [RFC PATCH RESEND 12/12] erofs: introduce VLE decompression support (experimental) Sorry for the confusion :'( I left some words on the last patch of this patchset, [WIP] [NOMERGE] [R

Re: [WIP] [NOMERGE] [RFC PATCH v0.3 3/6] erofs: introduce erofs_map_blocks_iter

2018-06-30 Thread Gao Xiang via Linux-erofs
Hi Chao, On 2018/7/1 11:56, Chao Yu wrote: Hi Xiang, It fails 'git-am' or 'git apply --reject' when applying patches beginning from this one in the patch set to erofs branch, could you rebase the code? Thanks, this patchset is now based on [RFC PATCH RESEND 11/12] erofs: introduce a customi

Re: [PATCH v5] erofs: introduce error injection infrastructure

2018-06-30 Thread Gao Xiang via Linux-erofs
On 2018/7/1 11:56, Chao Yu wrote: Thanks for fixing these issues. Thanks, ;) Thanks, Gao Xiang

[PATCH v5] erofs: introduce error injection infrastructure

2018-06-30 Thread Gao Xiang via Linux-erofs
From: Chao Yu This patch introduces error injection infrastructure, with it, we can inject error in any kernel exported common functions which erofs used, so that it can force erofs running into error paths, it turns out that tests can cover real rare paths more easily to find bugs. Reviewed-by:

<    1   2   3   4   5