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

2018-09-09 Thread Chao Yu
Hi Thomas, On 2018/9/8 11:28, Gao Xiang wrote: > Hi Thomas, > > Thanks for your new patch. > > It seems that this patch also introduces 2 new 'WARNING: line over 80 > characters', > could you please fix it in the patch? It will be better to fix that. Some reviewed cleanup patches are merged b

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

2018-09-10 Thread Chao Yu
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, >>> >>> On 2018/9/8 11:28, Gao Xiang wrote: >>>> Hi Th

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

2018-09-11 Thread Chao Yu
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 message that adds the tree to t

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

2018-09-11 Thread Chao Yu
> slightly change warning message to keep consistency with > option POSIX_ACL and FS_XATTR. > > Signed-off-by: Chengguang Xu Prefix of patch title should be "staging: erofs: " as Xiang pointed out, otherwise it looks good to me, you

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

2018-09-12 Thread Chao Yu
unt and .remount_sb On 2018/9/6 7:25, Stephen Rothwell wrote: > Hi all, > > On Wed, 29 Aug 2018 09:44:03 +1000 Stephen Rothwell > wrote: >> >> On Tue, 28 Aug 2018 22:13:02 +0800 Chao Yu wrote: >>> >>> On 2018/8/28 21:05, Greg Kroah-Hartman wrote: >&g

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

2018-09-12 Thread Chao Yu
Hi Stephen, On 2018/9/12 15:34, Stephen Rothwell wrote: > Hi Chao, > > On Wed, 12 Sep 2018 15:19:16 +0800 Chao Yu wrote: >> >> To make sure, did -next tree enable erofs compiling now? > > Yes, from yesterday. Great, thanks for your help. :) > >> Xiang has

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

2018-09-12 Thread Chao Yu
On 2018/9/12 13:10, Chengguang Xu wrote: > Define a dummy function of time_to_inject(), so that we don't > have to check macro CONFIG_EROFS_FAULT_INJECTION in calling place. > Base on above adjustment, do proper code cleanup for erofs_kmalloc(). > > Signed-off-by: Chengguang Xu > --- > drivers/s

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

2018-09-12 Thread Chao Yu
On 2018/9/12 13: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 of fault_injecti

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

2018-09-14 Thread Chao Yu
On 2018/9/13 13:46, cgxu519 wrote: > On 09/13/2018 10:15 AM, Chao Yu wrote: >> On 2018/9/12 13: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 >

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

2018-09-17 Thread Chao Yu
On 2018/9/17 21:52, cgxu519 wrote: > On 09/14/2018 11:22 PM, Chao Yu wrote: >> On 2018/9/13 13:46, cgxu519 wrote: >>> On 09/13/2018 10:15 AM, Chao Yu wrote: >>>> On 2018/9/12 13:10, Chengguang Xu wrote: >>>>> Define a dummpy fu

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

2018-09-18 Thread Chao Yu
On 2018/9/17 23:34, Chengguang Xu wrote: > Define a dummy function of time_to_inject()/erofs_show_injection_info(), > so that we don't have to check macro CONFIG_EROFS_FAULT_INJECTION in > calling place. > > Signed-off-by: Chengguang Xu Reviewed-

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

2018-09-18 Thread Chao Yu
On 2018/9/17 23:34, 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 of fault_injecti

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

2018-09-18 Thread Chao Yu
atch is related to your [PATCH 6/6], so I think they can be merge to one, so the purpose of patch can be more clear. Anyway, it's not a big deal. you can add: Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdr

Re: [PATCH v2 4/6] staging: erofs: introduce a new helper erofs_get_fault_rate()

2018-09-18 Thread Chao Yu
On 2018/9/17 23:34, Chengguang Xu wrote: > Introduce a new helper for getting fault rate, so that we > don't have to check macro in calling place. > > Signed-off-by: Chengguang Xu Can you fold this patch into [5/6]? Thanks, ___ devel mailing list de.

Re: [PATCH v2 6/6] staging: erofs: option validation in remount

2018-09-18 Thread Chao Yu
On 2018/9/17 23:34, 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: C

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

2018-09-19 Thread Chao Yu
On 2018/9/19 13:49, Gao Xiang wrote: > some CONFIG_EROFS_FS_XATTR conditions were added because of > the historial Linux kernel compatibility, which are unneeded now. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel

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

2018-09-19 Thread Chao Yu
On 2018/9/19 13:49, Gao Xiang wrote: > 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 Reviewed-by: Chao Yu Thanks,

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

2018-09-19 Thread Chao Yu
. > > Let's drop multiref support. If it is fully implemented > in the future, it can be reverted later. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.li

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

2018-09-19 Thread Chao Yu
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 +++ > drivers/staging/erofs/super.c | 5 + >

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

2018-09-19 Thread Chao Yu
gt; Suggested-by: Dan Carpenter > Signed-off-by: Gao Xiang > --- Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

2018-09-19 Thread Chao Yu
On 2018/9/19 13:49, Gao Xiang wrote: > 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 Reviewed-by: Chao Yu Thanks, __

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

2018-09-19 Thread Chao Yu
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_vle_n

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

2018-09-19 Thread Chao Yu
On 2018/9/20 0:06, Gao Xiang wrote: > From: Gao Xiang > > This patch introduces `__should_decompress_synchronously' to > cleanup `z_erofs_vle_normalaccess_readpages'. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, _

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

2018-09-19 Thread Chao Yu
On 2018/9/20 7:34, cgxu519 wrote: > On 9/19/18 11:22 PM, Gao Xiang wrote: >> 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 t

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

2018-10-16 Thread Chao Yu
On 2018/10/9 21:43, Gao Xiang wrote: > Append __init to `erofs_init_inode_cache', > `z_erofs_init_zip_subsystem' and move these > declarations to internal.h. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

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

2018-11-07 Thread Chao Yu
leaned compressor wrapper will be introduced in the subsequent > 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 > stagi

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

2018-11-15 Thread Chao Yu
On 2018/11/13 4:43, Cristian Sicilia wrote: > Replace equal to NULL with logic unary operator, > and removing not equal to NULL comparison. > > Signed-off-by: Cristian Sicilia Reviewed-by: Chao Yu Thanks, ___ devel mai

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

2018-11-15 Thread Chao Yu
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: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproj

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

2018-11-15 Thread Chao Yu
On 2018/11/13 4:43, Cristian Sicilia wrote: > Align parameters to the opened parentesis. > > Signed-off-by: Cristian Sicilia Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverpr

Re: [PATCH 2/2] staging: erofs: unzip_vle_lz4.c,utils.c: rectify BUG_ONs

2018-12-10 Thread Chao Yu
On 2018/12/11 15:17, Gao Xiang wrote: > remove all redundant BUG_ONs, and turn the rest > useful usages to DBG_BUGONs. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproj

Re: [PATCH 1/2] staging: erofs: unzip_{pagevec.h,vle.c}: rectify BUG_ONs

2018-12-10 Thread Chao Yu
On 2018/12/11 15:17, Gao Xiang wrote: > remove all redundant BUG_ONs, and turn the rest > useful usages to DBG_BUGONs. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproj

Re: kernel BUG at fs/erofs/inode.c:LINE!

2020-09-28 Thread Chao Yu
Hi syzbot administrator, CONFIG_EROFS_DEBUG was introduced for debug purpose during development, this should not be enabled on release version. Can you please turn off this config, and retest with erofs module? Thanks, On 2020/9/29 4:36, Gao Xiang wrote: Hi, On Mon, Sep 28, 2020 at 12:27:24A

Re: [PATCH] staging: erofs: remove __EROFS_BIT

2018-12-12 Thread Chao Yu
igned-off-by: Gao Xiang It looks this patch has been merged, anyway Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: erofs: Add a blank line after declarations

2018-12-13 Thread Chao Yu
On 2018/12/13 9:51, Gao Xiang wrote: > Hi Sungkyung, > > On 2018/12/12 23:50, Sungkyung Kim wrote: >> Fix a warning from checkpathch.pl: 'Missing a blank line after >> declarations' >> >> Signed-off-by: Sungkyung Kim >> --- >> drivers/staging/erofs/inode.c | 1 + >> 1 file changed, 1 insertion(+

Re: [PATCH] staging: erofs: fix return type of erofs_workgroup_get

2018-12-25 Thread Chao Yu
On 2018/12/26 11:34, Gao Xiang wrote: > There exists a return type misuse (`int'->`bool') since all > users assume it fails if only return value != 0, let's fix > the return type to `int' instead of confusing `bool'. > > No logic changes. > >

Re: [PATCH v2] staging: erofs: Add identifier for function definition arguments

2019-01-08 Thread Chao Yu
On 2019/1/8 21:24, Sidong Yang wrote: > Add identifier for function definition arguments in xattr_iter_handlers, > this change clears the checkpatch.pl issue and make code more explicit. > > Signed-off-by: Sidong Yang Reviewed-by: Chao

[PATCH v2 5/5] staging: erofs: clean up erofs_map_blocks_iter

2019-01-14 Thread Chao Yu
This patch cleans up erofs_map_blocks* function and structure family, just simply the code, no logic change. Reviewed-by: Gao Xiang Signed-off-by: Chao Yu Signed-off-by: Gao Xiang --- v2: - remove unneed semicolon in definition of z_erofs_map_blocks_iter drivers/staging/erofs/data.c | 31

Re: [PATCH 1/5] staging: erofs: sunset erofs_workstation_cleanup_all

2019-01-16 Thread Chao Yu
On 2019/1/16 16:59, Gao Xiang wrote: > There is only one user calling erofs_workstation_cleanup_all, > and it is no likely that more users will use in that way > in the future. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, __

Re: [PATCH 2/5] staging: erofs: localize erofs_workgroup_get

2019-01-16 Thread Chao Yu
On 2019/1/16 16:59, Gao Xiang wrote: > Staticize erofs_workgroup_get since no external user > out of utils.c directly calls erofs_workgroup_get. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mai

Re: [PATCH 3/5] staging: erofs: decrease the shrink count in erofs_workgroup_get

2019-01-16 Thread Chao Yu
On 2019/1/16 16:59, Gao Xiang wrote: > It is more suitable to update in erofs_workgroup_get since > it's actually the one matched with erofs_workgroup_put. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ deve

Re: [PATCH 4/5] staging: erofs: staticize erofs_shrink_count, erofs_shrink_scan

2019-01-16 Thread Chao Yu
On 2019/1/16 16:59, Gao Xiang wrote: > Move erofs_shrinker_info to utils.c and therefore > no need to globalize erofs_shrink_count and erofs_shrink_scan. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mai

Re: [PATCH 5/5] staging: erofs: drop the extern prefix for function definitions

2019-01-16 Thread Chao Yu
On 2019/1/16 16:59, Gao Xiang wrote: > Fix all `CHECK: extern prototypes should be avoided in .h files' > reported by checkpatch.pl. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdrive

Re: [PATCH] staging: erofs: fix potential double iput in erofs_read_super()

2019-01-24 Thread Chao Yu
On 2019/1/23 14:12, Chengguang Xu wrote: > Some error cases like failing from d_make_root() will > cause double iput because d_make_root() also does iput > in its error path. > > Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Thanks, __

Re: [PATCH v2 1/2] staging: erofs: use xattr_prefix to wrap up

2019-01-25 Thread Chao Yu
On 2019/1/26 0:10, Gao Xiang wrote: > Let's use xattr_prefix instead of open code. > No logic changes. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdrive

Re: [PATCH v2 2/2] staging: erofs: complete POSIX ACL support

2019-01-25 Thread Chao Yu
On 2019/1/26 0:10, Gao Xiang wrote: > Let's add .get_acl() to read the file's acl from its xattrs > to make POSIX ACL usable. > > Here is the on-disk detail, > fullname: system.posix_acl_access > struct erofs_xattr_entry: > .e_name_len = 0 > .e_name_index = EROFS_XATTR_INDEX_POSIX_

Re: [PATCH v3 2/2] staging: erofs: complete POSIX ACL support

2019-01-25 Thread Chao Yu
gt; change log v3: > - kvmalloc -> erofs_kmalloc suggested by Chao; > - update SB_POSIXACL for the remount case as well; Oh, correct, remount case, I missed that one. It looks good to me now. :) Reviewed-by: Chao Yu Thanks, ___ devel maili

Re: [PATCH v2 2/2] staging: erofs: complete POSIX ACL support

2019-01-28 Thread Chao Yu
> > The fault injection subsystem was introduced in the initial upstreamed > EROFS version, which is taken from f2fs by Chao Yu. > > Fault injection is important to test fs.. However, I have no more idea > about the future plan of this feature...Follow f2fs or use the general > fau

Re: [PATCH v2 2/2] staging: erofs: complete POSIX ACL support

2019-02-02 Thread Chao Yu
Sorry for the delay due to business travel. On 2019/1/29 2:30, Dan Carpenter wrote: > On Tue, Jan 29, 2019 at 12:41:55AM +0800, Chao Yu wrote: >> Hi Dan and Xiang, >> >> On 2019-1-28 21:48, Gao Xiang wrote: >>> Hi Dan, >>> >>> On 2019/1/28 21:

Re: [PATCH 1/2] staging: erofs: remove redundant likely/unlikely annotation in namei.c

2019-02-12 Thread Chao Yu
On 2019/2/12 11:24, Chengguang Xu wrote: > unlikely has already included in IS_ERR(), > so just remove redundant likely/unlikely > annotation. > > Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Thanks, ___ devel

Re: [PATCH 2/2] staging: erofs: remove redundant unlikely annotation in unzip_vle.c

2019-02-12 Thread Chao Yu
On 2019/2/12 11:24, Chengguang Xu wrote: > unlikely has already included in IS_ERR(), > so just remove it. > > Signed-off-by: Chengguang Xu It looks like we don't need to send two patch to fix two similar issues, if you can merge them, it will be better. Reviewed-by:

Re: [PATCH v2 2/2] staging: erofs: complete POSIX ACL support

2019-02-14 Thread Chao Yu
Hi Dan, Any suggestion? On 2019/2/3 10:52, Chao Yu wrote: > Sorry for the delay due to business travel. > > On 2019/1/29 2:30, Dan Carpenter wrote: >> On Tue, Jan 29, 2019 at 12:41:55AM +0800, Chao Yu wrote: >>> Hi Dan and Xiang, >>> >>> On 201

Re: [PATCH v2] staging: erofs: fix memleak of inode's shared xattr array

2019-02-14 Thread Chao Yu
ed. Nice catch! >> >> Signed-off-by: Sheng Yong > > LGTM, > > Fixes: b17500a0fdba ("staging: erofs: introduce xattr & acl support") > Cc: # 4.19+ > Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Thanks, > > [and there is also anot

Re: [PATCH v2] staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()

2019-02-14 Thread Chao Yu
On 2019/2/1 20:16, Gao Xiang wrote: > As Al pointed out, " > ... and while we are at it, what happens to > unsigned int nameoff = le16_to_cpu(de[mid].nameoff); > unsigned int matched = min(startprfx, endprfx); > > struct qstr dname = QSTR_INIT(data + nameoff, > unli

Re: [PATCH v2 2/2] staging: erofs: complete POSIX ACL support

2019-02-15 Thread Chao Yu
On 2019/2/15 15:36, Dan Carpenter wrote: > On Fri, Feb 15, 2019 at 10:10:34AM +0800, Chao Yu wrote: >> Hi Dan, >> >> Any suggestion? >> > > I won't NAK whatever you decide. But my opinion is that you should > just use normal kernel memory allocators e

Re: [PATCH v2] staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()

2019-02-15 Thread Chao Yu
On 2019/2/15 15:57, Dan Carpenter wrote: > On Fri, Feb 15, 2019 at 03:02:25PM +0800, Chao Yu wrote: >> On 2019/2/1 20:16, Gao Xiang wrote: >>> + /* >>> +* on-disk error, let's only BUG_ON in the debugging mode. >>> +* otherwise, it wi

Re: [PATCH v2] staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()

2019-02-17 Thread Chao Yu
Hi xiang, On 2019/2/15 16:58, Gao Xiang wrote: > Hi Chao, > > On 2019/2/15 15:02, Chao Yu wrote: >> On 2019/2/1 20:16, Gao Xiang wrote: >>> As Al pointed out, " >>> ... and while we are at it, what happens to >>> unsigned int nameoff = le1

Re: [PATCH v2] staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()

2019-02-17 Thread Chao Yu
On 2019/2/15 17:35, Dan Carpenter wrote: > On Fri, Feb 15, 2019 at 05:32:33PM +0800, Chao Yu wrote: >> On 2019/2/15 15:57, Dan Carpenter wrote: >>> On Fri, Feb 15, 2019 at 03:02:25PM +0800, Chao Yu wrote: >>>> On 2019/2/1 20:16, Gao Xiang wrote: >>>>&

Re: [PATCH v2] staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()

2019-02-17 Thread Chao Yu
Hi Xiang, On 2019/2/18 10:17, Gao Xiang wrote: > Hi Chao, > > On 2019/2/18 9:39, Chao Yu wrote: >> If the image is corrupted, qn->name[i] may be anything, as you commented >> above DBG_BUGON(), we really don't need to go through any later codes, it >> can a

Re: [Outreachy Kernel][PATCH v2] staging: erofs: match alignment with open parentheses

2019-02-19 Thread Chao Yu
On 2019/2/19 18:24, Gao Xiang wrote: > [+cc linux-erofs and staging mailing list] > > On 2019/2/19 17:25, Bhanusree Pola wrote: >> Align code with open parantheses to improve the readability. >> Issue found using checkpatch.pl >> >> Signed-off-by: Bhanusree Pol

Re: [PATCH] staging: erofs: remove rcu_read_lock() in erofs_try_to_free_cached_page

2019-02-19 Thread Chao Yu
On 2019/2/16 16:46, Gao Xiang wrote: > page_private(page) cannot be changed if page lock is taken. > > Besides, the corresponding workgroup won't be freed > if the page is already protected by page lock, therefore > no need to take rcu read lock. > > Signed-off-by: Gao

Re: [PATCH 1/2] staging: erofs: no need to take page lock in readdir

2019-02-24 Thread Chao Yu
On 2019/2/21 10:34, Gao Xiang wrote: > VFS will take inode_lock for readdir, therefore no need to > take page lock in readdir at all just as the majority of > other generic filesystems. > > Signed-off-by: Gao Xiang Reviewed-by: C

Re: [PATCH 2/2] staging: erofs: switch to ->iterate_shared()

2019-02-24 Thread Chao Yu
On 2019/2/21 10:34, Gao Xiang wrote: > After commit 6192269444eb ("introduce a parallel variant of ->iterate()"), > readdir can be done without taking exclusive inode lock of course. > > Signed-off-by: Gao Xiang Revi

Re: [PATCH 3/3] staging: erofs: fix mis-acted TAIL merging behavior

2019-02-27 Thread Chao Yu
troduce VLE decompression support") > Cc: # 4.19+ > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 2/3] staging: erofs: fix illegal address access under memory pressure

2019-02-27 Thread Chao Yu
51408.018157s][] handle_mm_fault+0x7c/0x118 > <4>[1051408.018157s][] do_page_fault+0x354/0x474 > <4>[1051408.018157s][] do_translation_fault+0x40/0x48 > <4>[1051408.018157s][] do_mem_abort+0x80/0x100 > <4>[1051408.018310s]---[ end trace 9f4009a

Re: [PATCH 1/3] staging: erofs: compressed_pages should not be accessed again after freed

2019-02-27 Thread Chao Yu
ove issue only with little changes > as much as possible in order to make the fix backport easier. > > Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") > Cc: # 4.19+ > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Tha

[PATCH] staging: erofs: fix to handle error path of erofs_vmap()

2019-03-11 Thread Chao Yu
From: Chao Yu erofs_vmap() wrapped vmap() and vm_map_ram() to return virtual continuous memory, but both of them can failed due to a lot of reason, previously, erofs_vmap()'s callers didn't handle them, which can potentially cause NULL pointer access, fix it. Fixes: 3883a79abd02

Re: [PATCH 1/3] staging: erofs: fix error handling when failed to read compresssed data

2019-03-24 Thread Chao Yu
. > > Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") > Cc: # 4.19+ > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 2/3] staging: erofs: introduce erofs_page_is_managed()

2019-03-24 Thread Chao Yu
On 2019/3/19 21:55, Gao Xiang wrote: > 1) In order to clean up unnecessary >page->mapping == MNGD_MAPPING(sbi) wrapped by #ifdefs; > > 2) Needed by "staging: erofs: support IO read error injection". > > Signed-off-by: Gao Xiang

Re: [PATCH 3/3] staging: erofs: support IO read error injection

2019-03-24 Thread Chao Yu
On 2019/3/19 21:55, Gao Xiang wrote: > Used to simulate disk IO read error for testing fatal > error tolerance. > > Here are the details, > 1) use bio->bi_private to indicate super_block >for non-compressed bios since some (mainly meta) >pages can be of the corresponding bdev inode; > 2) g

Re: [PATCH 1/3] staging: erofs: fix error handling when failed to read compresssed data

2019-03-24 Thread Chao Yu
On 2019/3/22 11:25, Gao Xiang wrote: > ping? > > Hi Chao, > could you take some time looking into this series? Done, sorry for the delay. Thanks, > > Thanks, > Gao Xiang > > On 2019/3/19 21:54, Gao Xiang wrote: >> Complete read error handling paths for all three kinds of >> compressed pages:

Re: [PATCH v2 3/3] staging: erofs: support IO read error injection

2019-03-24 Thread Chao Yu
sponding bdev inode; > 2) get super_block dynamically for compressed bios, >therefore it could not inject bios full of staging >pages, yet it doesn't affect the normal usage. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, _

Re: [PATCH] staging: erofs: keep corrupted fs from crashing kernel in erofs_readdir()

2019-03-28 Thread Chao Yu
6e52 ("staging: erofs: add directory operations") > Cc: # 4.19+ > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 07/22] staging: erofs: remove redundant #include "internal.h"

2019-07-31 Thread Chao Yu
On 2019/7/31 20:54, Gao Xiang wrote: > > > On 2019/7/31 20:07, Chao Yu wrote: >> Hi Xiang, >> >> On 2019/7/31 15:08, Gao Xiang wrote: >>> Hi Chao, >>> >>> On 2019/7/31 15:03, Chao Yu wrote: >>>> On 2019/7/29 14:51, Gao Xiang

Re: [PATCH v2 07/22] staging: erofs: remove redundant #include "internal.h"

2019-07-31 Thread Chao Yu
On 2019/7/31 23:57, Gao Xiang wrote: > Because #include "internal.h" is included in xattr.h > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriver

Re: [PATCH v2 08/22] staging: erofs: kill CONFIG_EROFS_FS_IO_MAX_RETRIES

2019-07-31 Thread Chao Yu
sted-by: David Sterba > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2 12/22] staging: erofs: drop __GFP_NOFAIL for managed inode

2019-07-31 Thread Chao Yu
On 2019/7/31 23:57, Gao Xiang wrote: > For historical reasons, __GFP_NOFAIL was set for managed inode. > It's no need using that since EROFS can handle it properly. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ deve

Re: [PATCH 1/3] staging: erofs: inline erofs_inode_is_data_compressed()

2019-08-12 Thread Chao Yu
On 2019/8/13 10:30, Gao Xiang wrote: > As a helper in erofs_fs.h, erofs_inode_is_data_compressed() > should be inlined. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproj

Re: [PATCH 2/3] staging: erofs: remove incomplete cleancache

2019-08-12 Thread Chao Yu
y: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 3/3] staging: erofs: xattr.c: avoid BUG_ON

2019-08-12 Thread Chao Yu
ON only in (eng) debugging version. BTW, do we need add WARN_ON() into DBG_BUGON() to show some details function or call stack in where we encounter the issue? > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@l

Re: [PATCH 3/3] staging: erofs: xattr.c: avoid BUG_ON

2019-08-12 Thread Chao Yu
Hi Xiang, On 2019/8/13 11:57, Gao Xiang wrote: > Hi Chao, > > On Tue, Aug 13, 2019 at 11:20:22AM +0800, Chao Yu wrote: >> On 2019/8/13 10:30, Gao Xiang wrote: >>> Kill all the remaining BUG_ON in EROFS: >>> - one BUG_ON was used to detect xattr on-disk corrupt

Re: [PATCH] staging: erofs: removing an extra call to iloc() in fill_inode()

2019-08-13 Thread Chao Yu
bjection of this patch, but I'd like to > hear Chao/Greg's idea about this... It looks more clean. :) Nitpick, maybe change 'inode_loc' to shorter 'iloc' will be better. Reviewed-by: Chao Yu Thanks, > > Thanks, > Gao Xiang > >> --- >

Re: [PATCH] staging: erofs: removing an extra call to iloc() in fill_inode()

2019-08-13 Thread Chao Yu
On 2019/8/14 11:52, Pratik Shinde wrote: > Yes.since we already have a function with same name (and we are using it in > same > context). > 'inode_loc' was the most meaningful name I could come up with :) [snip] On Wed, Aug 14, 2019 at 7:37 AM Gao Xiang wrote: > iloc is the name of static inlin

Re: [PATCH RESEND 1/2] staging: erofs: introduce EFSCORRUPTED and more logs

2019-08-14 Thread Chao Yu
by: Pavel Machek > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH RESEND 2/2] staging: erofs: differentiate unsupported on-disk format

2019-08-14 Thread Chao Yu
On 2019/8/14 12:32, Gao Xiang wrote: > For some specific fields, use ENOTSUPP instead of EIO > for values which look sane but aren't supported right now. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu > + return -ENOTSUPP; A little bit confused about

Re: [PATCH v2 3/3] staging: erofs: correct all misused ENOTSUPP

2019-08-14 Thread Chao Yu
On 2019/8/14 18:37, Gao Xiang wrote: > As Chao pointed out [1], ENOTSUPP is used for NFS > protocol only, we should use EOPNOTSUPP instead... > > [1] > https://lore.kernel.org/lkml/108ee2f9-75dd-b8ab-8da7-b81c17baf...@huawei.com/ > > Reported-by: Chao Yu > Signed-off-

Re: [PATCH] staging: erofs: use common file type conversion

2019-08-16 Thread Chao Yu
type conversion"). > > [1] > https://lore.kernel.org/r/CAHk-=wiUs+b=ivkm3mvooxgvk7cmmc67ktmnaul0cd_cmmv...@mail.gmail.com/ > > Reported-by: Linus Torvalds > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ de

Re: [PATCH] erofs: move erofs out of staging

2019-08-18 Thread Chao Yu
Hi Richard, On 2019-8-18 17:21, Richard Weinberger wrote: > For normal use I see no problem at all. > I fear distros that try to mount anything you plug into your USB. > > At least SUSE already blacklists erofs: > https://github.com/openSUSE/suse-module-tools/blob/master/suse-module-tools.spec#L2

Re: [PATCH v2] staging: erofs: fix an error handling in erofs_readdir()

2019-08-18 Thread Chao Yu
On 2019-8-18 10:53, Matthew Wilcox wrote: > On Sun, Aug 18, 2019 at 10:32:45AM +0800, Gao Xiang wrote: >> On Sat, Aug 17, 2019 at 07:20:55PM -0700, Matthew Wilcox wrote: >>> On Sun, Aug 18, 2019 at 09:56:31AM +0800, Gao Xiang wrote: @@ -82,8 +82,12 @@ static int erofs_readdir(struct file *f, s

Re: [PATCH v2] staging: erofs: fix an error handling in erofs_readdir()

2019-08-18 Thread Chao Yu
Hi Xiang, On 2019-8-18 18:52, Gao Xiang wrote: > Hi Chao, > > On Sun, Aug 18, 2019 at 06:39:52PM +0800, Chao Yu wrote: >> On 2019-8-18 10:53, Matthew Wilcox wrote: >>> On Sun, Aug 18, 2019 at 10:32:45AM +0800, Gao Xiang wrote: >>>> On Sat, Aug 17, 2019 at 07

Re: [PATCH v3 RESEND] staging: erofs: fix an error handling in erofs_readdir()

2019-08-18 Thread Chao Yu
245.javamail.zim...@nod.at/ > > Reported-by: Richard Weinberger > Fixes: 3aa8ec716e52 ("staging: erofs: add directory operations") > Cc: # 4.19+ > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing lis

Re: [PATCH] staging: erofs: refuse to mount images with malformed volume name

2019-08-18 Thread Chao Yu
n the future. > > [1] > https://lore.kernel.org/r/1133002215.69049.1566119033047.javamail.zim...@nod.at/ > > Reported-by: Richard Weinberger > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ dev

Re: [PATCH 1/6] staging: erofs: some compressed cluster should be submitted for corrupted images

2019-08-19 Thread Chao Yu
o keep the page > working properly (page unlocked with PG_error set, PG_uptodate > not set). > > Let's fix it now. > > Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") > Cc: # 4.19+ > Si

Re: [PATCH 1/6] staging: erofs: some compressed cluster should be submitted for corrupted images

2019-08-19 Thread Chao Yu
o keep the page > working properly (page unlocked with PG_error set, PG_uptodate > not set). > > Let's fix it now. > > Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") > Cc: # 4.19+ > Si

Re: [PATCH 3/6] staging: erofs: add two missing erofs_workgroup_put for corrupted images

2019-08-19 Thread Chao Yu
; > Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") > Cc: # 4.19+ > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 2/6] staging: erofs: cannot set EROFS_V_Z_INITED_BIT if fill_inode_lazy fails

2019-08-19 Thread Chao Yu
333a5895 ("staging: erofs: add compacted compression indexes > support") > Cc: # 5.3+ > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 4/6] staging: erofs: avoid loop in submit chains

2019-08-19 Thread Chao Yu
gain (will trigger tail merging) >| > 1 2 3 1 2 -> 1 2 3 1 > |_ tail end of the chain\___/ (unexpected behavior) > Let's detect and avoid them now. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, _

Re: [PATCH 5/6] staging: erofs: detect potential multiref due to corrupted images

2019-08-19 Thread Chao Yu
On 2019-8-19 18:34, Gao Xiang wrote: > As reported by erofs-utils fuzzer, currently, multiref > (ondisk deduplication) hasn't been supported for now, > we should forbid it properly. > > Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") > Cc: # 4.19+ > Signed-off-by: Gao

Re: [PATCH 6/6] staging: erofs: avoid endless loop of invalid lookback distance 0

2019-08-19 Thread Chao Yu
+ > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Chao Yu
On 2019/8/20 8:55, Qu Wenruo wrote: > [...] I have made a simple fuzzer to inject messy in inode metadata, dir data, compressed indexes and super block, https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/commit/?h=experimental-fuzzer I am testing with som

Re: [PATCH] erofs: move erofs out of staging

2019-08-20 Thread Chao Yu
On 2019/8/20 10:38, Qu Wenruo wrote: > > > On 2019/8/20 上午10:24, Chao Yu wrote: >> On 2019/8/20 8:55, Qu Wenruo wrote: >>> [...] >>>>>> I have made a simple fuzzer to inject messy in inode metadata, >>>>>> dir data, compressed indexes

  1   2   3   >