Re: [PATCH v5 2/2] staging: erofs: Modify conditional checks

2018-11-05 Thread Gao Xiang
On 2018/11/6 3:49, Bhagyashri P. Dighole wrote: > Fix coding style alignment issues detected by checkpatch.pl > Use ! for NULL test rather than explicitly comparing to NULL. > > Signed-off-by: Bhagyashri P. Dighole Looks good and good luck... Reviewed-by: Gao Xiang Thanks, Gao Xiang

Re: [Outreachy kernel] [PATCH v5 1/2] staging: erofs: Modify coding style alignments

2018-11-05 Thread Julia Lawall
On Mon, 5 Nov 2018, Bhagyashri P. Dighole wrote: > Fix coding style alignment issues detected by checkpatch.pl > Matched alignments with parenthesis. > > Signed-off-by: Bhagyashri P. Dighole > Reviewed-by: Gao Xiang Good job on adding the reviewer. However, did Gao give a Reviewed-by for

[PATCH v5 1/2] staging: erofs: Modify coding style alignments

2018-11-05 Thread Bhagyashri P. Dighole
Fix coding style alignment issues detected by checkpatch.pl Matched alignments with parenthesis. Signed-off-by: Bhagyashri P. Dighole Reviewed-by: Gao Xiang --- Changes in v5: - Add reviewer. Changes in v4: - Add changelog messages for patch versions. Changes in v3: - Split patch in two

[PATCH v5 2/2] staging: erofs: Modify conditional checks

2018-11-05 Thread Bhagyashri P. Dighole
Fix coding style alignment issues detected by checkpatch.pl Use ! for NULL test rather than explicitly comparing to NULL. Signed-off-by: Bhagyashri P. Dighole Reviewed-by: Gao Xiang --- Changes in v5: - Add reviewer. Changes in v4: - Add changelog messages for patch versions. Changes in v3: -

Re: [Outreachy kernel] [PATCH v4 1/2] staging: erofs: Modify coding style alignments

2018-11-05 Thread Himanshu Jha
On Mon, Nov 05, 2018 at 07:02:51PM +, Bhagyashri P. Dighole wrote: > Fix coding style alignment issues detected by checkpatch.pl > Matched alignments with parenthesis. > > Signed-off-by: Bhagyashri P. Dighole > --- Did you notice identical patches this time ? 1 Nov 05 Bhagyashri P.

[PATCH v4 2/2] staging: erofs: Modify conditional checks

2018-11-05 Thread Bhagyashri P. Dighole
Fix coding style alignment issues detected by checkpatch.pl Use ! for NULL test rather than explicitly comparing to NULL. Signed-off-by: Bhagyashri P. Dighole --- Changes in v4: - Add changelog messages for patch versions. Changes in v3: - Split patch in two patches. Each patch have similar

[PATCH v4 1/2] staging: erofs: Modify coding style alignments

2018-11-05 Thread Bhagyashri P. Dighole
Fix coding style alignment issues detected by checkpatch.pl Matched alignments with parenthesis. Signed-off-by: Bhagyashri P. Dighole --- Changes in v4: - Add changelog messages for patch versions. Changes in v3: - Split patch in two patches. Each patch have similar kind of changes. One patch

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

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

2018-11-05 Thread Bhagyashri Dighole
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 patch for single change at a time. So, I created PATCH v2. In this patch,

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

2018-11-05 Thread Julia Lawall
On Mon, 5 Nov 2018, Gao Xiang wrote: > Hi Bhagyashri, > > On 2018/11/5 22:50, Bhagyashri P. Dighole wrote: > > Fix coding style alignment issues detected by checkpatch.pl > > Use ! for NULL test rather than explicitly comparing to NULL. > > > > Signed-off-by: Bhagyashri P. Dighole > > --- > >

Re: [PATCH v3 1/2] staging: erofs: Modify coding style alignments

2018-11-05 Thread Gao Xiang
Hi Bhagyashri, On 2018/11/5 22:49, Bhagyashri P. Dighole wrote: > Fix coding style alignment issues detected by checkpatch.pl > Matched alignments with parenthesis. > > Signed-off-by: Bhagyashri P. Dighole This patch looks good to me. I think you could add, could be better to hear others

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

2018-11-05 Thread Gao Xiang
Hi Bhagyashri, On 2018/11/5 22:50, Bhagyashri P. Dighole wrote: > Fix coding style alignment issues detected by checkpatch.pl > Use ! for NULL test rather than explicitly comparing to NULL. > > Signed-off-by: Bhagyashri P. Dighole > --- > Changes in v3: > - Split patch in two patches. Each

[PATCH v3 1/2] staging: erofs: Modify coding style alignments

2018-11-05 Thread Bhagyashri P. Dighole
Fix coding style alignment issues detected by checkpatch.pl Matched alignments with parenthesis. Signed-off-by: Bhagyashri P. Dighole --- Changes in v3: - Split patch in two patches. Each patch have similar kind of changes. One patch for all alignment fixes and second patch for all

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

2018-11-05 Thread Greg Kroah-Hartman
On Mon, Nov 05, 2018 at 12:35:03PM +, Bhagyashri P. Dighole wrote: > Fix coding style alignment issues detected by checkpatch.pl > Use ! for NULL test rather than explicitly comparing to NULL. > > Signed-off-by: Bhagyashri P. Dighole > --- > drivers/staging/erofs/data.c | 14 +++---

[PATCH v3 2/2] staging: erofs: Modify conditional check

2018-11-05 Thread Bhagyashri P. Dighole
Fix coding style alignment issues detected by checkpatch.pl Use ! for NULL test rather than explicitly comparing to NULL. Signed-off-by: Bhagyashri P. Dighole --- drivers/staging/erofs/data.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH v3 1/2] staging: erofs: Modify coding style alignments

2018-11-05 Thread Bhagyashri P. Dighole
Fix coding style alignment issues detected by checkpatch.pl Matched alignments with parenthesis. Signed-off-by: Bhagyashri P. Dighole --- drivers/staging/erofs/data.c | 51 ++-- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git

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

2018-11-05 Thread Gao Xiang
Hi Chao, On 2018/11/5 9:46, Chao Yu wrote: > Agreed, let me update erofs* branch this tonight. > > Thanks, I have rebased all the patches and send all out as the patchset of "[PATCH 4.20-rc1 rebased xx/10]"... It begins at https://lists.ozlabs.org/pipermail/linux-erofs/2018-November/000785.html

[PATCH 4.20-rc1 rebased 10/10] staging: erofs: decompress asynchronously if PG_readahead page at first

2018-11-05 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. Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

[PATCH 4.20-rc1 rebased 09/10] staging: erofs: locked before registering for all new workgroups

2018-11-05 Thread 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 the race seems

[PATCH 4.20-rc1 rebased 08/10] staging: erofs: separate into init_once / always

2018-11-05 Thread 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, `struct mutex'

[PATCH 4.20-rc1 rebased 05/10] staging: erofs: atomic_cond_read_relaxed on ref-locked workgroup

2018-11-05 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. Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 12 1 file changed, 4 insertions(+), 8

[PATCH 4.20-rc1 rebased 07/10] staging: erofs: add a full barrier in erofs_workgroup_unfreeze

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

[PATCH 4.20-rc1 rebased 06/10] staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'

2018-11-05 Thread 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 that some high

[PATCH 4.20-rc1 rebased 03/10] staging: erofs: fix race when the managed cache is enabled

2018-11-05 Thread 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 workgroup_freeze(grp,

[PATCH 4.20-rc1 rebased 04/10] staging: erofs: fix refcount assertion in erofs_register_workgroup

2018-11-05 Thread Gao Xiang
Since the reference count of an erofs_workgroup is a signed atomic integer, fix a refcount assertion in erofs_register_workgroup. Signed-off-by: Gao Xiang --- drivers/staging/erofs/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/erofs/utils.c

[PATCH 4.20-rc1 rebased 02/10] staging: erofs: remove the redundant d_rehash() for the root dentry

2018-11-05 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

[PATCH 4.20-rc1 rebased 01/10] staging: erofs: fix `trace_erofs_readpage' position

2018-11-05 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") Cc: Chen Gong Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 4 ++-- 1 file changed, 2

[PATCH 4.20-rc1 rebased 02/10] staging: erofs: remove the redundant d_rehash() for the root dentry

2018-11-05 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