Re: [PATCH 00/25] staging: erofs: introduce erofs file system

2018-07-28 Thread Gao Xiang
On 2018/7/28 15:25, Greg Kroah-Hartman wrote: > Thanks for submitting this, the filesystem looks very interesting. I've > queued it all up now in the staging-next tree. Thanks for applying, we are continuously optimizing further and hope to attract more fs guys :) Thanks, Gao

[PATCH] staging: erofs: fix a compile warning of Z_EROFS_VLE_VMAP_ONSTACK_PAGES

2018-07-28 Thread Gao Xiang
There is a type mismatch in the definition of Z_EROFS_VLE_VMAP_ONSTACK_PAGES, let's fix it. Link: https://lists.01.org/pipermail/kbuild-all/2018-July/050707.html Reported-by: kbuild test robot Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.h | 2 +- 1 file changed, 1 insertion

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

2018-08-02 Thread Gao Xiang
Hi Greg, On 2018/8/3 1:33, Greg KH wrote: > Sorry, I already took the first version in my tree. Don't worry about > it for now you can fix this up after 4.19-rc1 is out when we enable the > filesystem again. > OK, We will fix it and enable erofs after 4.19-rc1 is out. :) Thank

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

2018-07-28 Thread Gao Xiang
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
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

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

2018-07-29 Thread Gao Xiang
Hi Chao, On 2018/7/30 10:07, Chao Yu wrote: > On 2018/7/29 13:34, Gao Xiang via Linux-erofs wrote: >> 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.htm

Re: [staging:staging-testing 546/628] drivers/staging/erofs/namei.c:195:8-14: WARNING: PTR_ERR_OR_ZERO can be used

2018-07-29 Thread Gao Xiang
ozlabs.org/pipermail/linux-erofs/2018-July/000269.html Thanks for the report. Thanks, Gao Xiang ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH] staging: erofs: use the wrapped PTR_ERR_OR_ZERO instead of open code

2018-07-29 Thread Gao Xiang
Just clean up and logic doesn't change. Link: https://lists.01.org/pipermail/kbuild-all/2018-July/050766.html Fixes: d72d1ce60174 ("staging: erofs: add namei functions") Reported-by: kbuild test robot Signed-off-by: Gao Xiang --- drivers/staging/erofs/namei.c | 2 +- 1 file

Re: [PATCH 00/25] staging: erofs: introduce erofs file system

2018-07-26 Thread Gao Xiang
On 2018/7/27 9:39, Gao Xiang wrote: > Every file system has its typical usage case. > > I don't think there exists a silver bullet solving all usage cases optimally. > JFFS2, YAFFS and UBIFS are designed for raw flash, we use UFS or eMMC solution > rather than raw nand fla

[PATCH 02/25] staging: erofs: add erofs in-memory stuffs

2018-07-26 Thread Gao Xiang
Signed-off-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 281 +++ 1 file changed, 281 insertions(+) create mode 100644 drivers/staging/erofs/internal.h diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h

[PATCH 01/25] staging: erofs: add on-disk layout

2018-07-26 Thread Gao Xiang
-by: Gao Xiang --- drivers/staging/erofs/erofs_fs.h | 266 +++ 1 file changed, 266 insertions(+) create mode 100644 drivers/staging/erofs/erofs_fs.h diff --git a/drivers/staging/erofs/erofs_fs.h b/drivers/staging/erofs/erofs_fs.h new file mode 100644 index 000

[PATCH 00/25] staging: erofs: introduce erofs file system

2018-07-26 Thread Gao Xiang
ure staging: erofs: support tracepoint Gao Xiang (22): staging: erofs: add on-disk layout staging: erofs: add erofs in-memory stuffs staging: erofs: add super block operations staging: erofs: add raw address_space operations staging: erofs: add inode operations staging: erofs: add direct

[PATCH 24/25] staging: erofs: introduce cached decompression

2018-07-26 Thread Gao Xiang
This patch adds an optional choice which can be enabled by users in order to cache both incomplete ends of compressed clusters as a complement to the in-place decompression in order to boost random read, but it costs more memory than the in-place decompression only. Signed-off-by: Gao Xiang

[PATCH 23/25] staging: erofs: introduce VLE decompression support

2018-07-26 Thread Gao Xiang
sed independently, which ensures random read number for all use cases. Signed-off-by: Gao Xiang --- drivers/staging/erofs/inode.c |5 + drivers/staging/erofs/internal.h |6 + drivers/staging/erofs/super.c | 25 + drivers/staging/erofs/unzip_vle.c | 1119

[PATCH 22/25] staging: erofs: introduce workstation for decompression

2018-07-26 Thread Gao Xiang
-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 93 drivers/staging/erofs/super.c| 9 drivers/staging/erofs/utils.c| 81 -- 3 files changed, 180 insertions(+), 3 deletions(-) diff --git a/drivers/staging

[PATCH 21/25] staging: erofs: introduce erofs shrinker

2018-07-26 Thread Gao Xiang
Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 7 drivers/staging/erofs/super.c| 15 +++ drivers/staging/erofs/utils.c| 85 +--- 3 files changed, 101 insertions(+), 6 deletions(-) diff --git a/drivers/staging/erofs/intern

[PATCH 20/25] staging: erofs: introduce superblock registration

2018-07-26 Thread Gao Xiang
In order to introducing shrinker solution for erofs, let's manage all mounted erofs instances at first. Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 6 ++ drivers/staging/erofs/super.c| 4 drivers/staging/erofs/utils.c| 17 + 3 files changed

[PATCH 11/25] staging: erofs: introduce error injection infrastructure

2018-07-26 Thread Gao Xiang
-by: Gao Xiang Signed-off-by: Chao Yu --- drivers/staging/erofs/Kconfig| 6 + drivers/staging/erofs/inode.c| 3 ++- drivers/staging/erofs/internal.h | 57 drivers/staging/erofs/super.c| 38 +++ 4 files changed, 103

[PATCH 14/25] staging: erofs: introduce pagevec for unzip subsystem

2018-07-26 Thread Gao Xiang
for booting the whole array itself up will be needed. Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_pagevec.h | 172 ++ 1 file changed, 172 insertions(+) create mode 100644 drivers/staging/erofs/unzip_pagevec.h diff --git a/drivers/staging/erofs

[PATCH 12/25] staging: erofs: support tracepoint

2018-07-26 Thread Gao Xiang
From: Chao Yu Add basic tracepoints for ->readpage{,s}, ->lookup, ->destroy_inode, fill_inode and map_blocks. Reviewed-by: Gao Xiang Signed-off-by: Chao Yu --- drivers/staging/erofs/data.c | 13 +- drivers/staging/erofs/include/trace/events/erof

[PATCH 10/25] staging: erofs: support special inode

2018-07-26 Thread Gao Xiang
From: Chao Yu This patch adds to support special inode, such as block dev, char, socket, pipe inode. Reviewed-by: Gao Xiang Signed-off-by: Chao Yu --- drivers/staging/erofs/inode.c| 36 ++-- drivers/staging/erofs/internal.h | 1 + 2 files changed, 35

[PATCH 15/25] staging: erofs: add erofs_map_blocks_iter

2018-07-26 Thread Gao Xiang
This patch introduces an iterable L2P mapping operation 'erofs_map_blocks_iter'. Compared with 'erofs_map_blocks', it avoids a number of redundant 'release and regrab' processes if they request the same meta page. Signed-off-by: Gao Xiang --- drivers/staging/erofs/Kconfig | 10 ++ drivers

[PATCH 13/25] staging: erofs: : introduce tagged pointer

2018-07-26 Thread Gao Xiang
allocation. Link: https://en.wikipedia.org/wiki/Tagged_pointer Signed-off-by: Gao Xiang --- drivers/staging/erofs/include/linux/tagptr.h | 110 +++ 1 file changed, 110 insertions(+) create mode 100644 drivers/staging/erofs/include/linux/tagptr.h diff --git a/drivers

[PATCH 25/25] staging: erofs: add a TODO and update MAINTAINERS for staging

2018-07-26 Thread Gao Xiang
This patch adds a TODO to list the things to be done, and the relevant info to MAINTAINERS so we can take all the blame :) Signed-off-by: Gao Xiang --- MAINTAINERS| 7 +++ drivers/staging/erofs/TODO | 45 + 2 files changed, 52

[PATCH 17/25] staging: erofs: globalize prepare_bio and __submit_bio

2018-07-26 Thread Gao Xiang
The unzip subsystem also uses these functions, let's export them to internal.h. Signed-off-by: Gao Xiang --- drivers/staging/erofs/data.c | 34 +- drivers/staging/erofs/internal.h | 33 + 2 files changed, 42 insertions(+), 25

[PATCH 18/25] staging: erofs: introduce a customized LZ4 decompression

2018-07-26 Thread Gao Xiang
pleted. Link: https://groups.google.com/forum/#!topic/lz4c/_3kkz5N6n00 Therefore, I hacked the LZ4 decompression logic by hand, probably NOT the fastest approach, and hope for better implementation. Signed-off-by: Miao Xie Signed-off-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/ero

[PATCH 19/25] staging: erofs: add a generic z_erofs VLE decompressor

2018-07-26 Thread Gao Xiang
Currently, this patch only simply implements LZ4 decompressor due to its development priority. In the future, erofs will support more compression algorithm and format other than LZ4, thus a generic decompressor interface will be needed. Signed-off-by: Gao Xiang --- drivers/staging/erofs

[PATCH 16/25] staging: erofs: add erofs_allocpage

2018-07-26 Thread Gao Xiang
This patch introduces an temporary _on-stack_ page pool to reuse the freed page directly as much as it can for better performance and release all pages at a time, it also slightly reduces the possibility of the potential memory allocation failure. Signed-off-by: Gao Xiang --- drivers/staging

[PATCH 05/25] staging: erofs: add inode operations

2018-07-26 Thread Gao Xiang
This adds core functions to get, read an inode. Signed-off-by: Miao Xie Signed-off-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/inode.c | 210 ++ 1 file changed, 210 insertions(+) create mode 100644 drivers/staging/erofs/inode.c diff

[PATCH 03/25] staging: erofs: add super block operations

2018-07-26 Thread Gao Xiang
This commit adds erofs super block operations, including (u)mount, remount_fs, show_options, statfs, in addition to some private icache management functions. Signed-off-by: Miao Xie Signed-off-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/super.c | 415

[PATCH 06/25] staging: erofs: add directory operations

2018-07-26 Thread Gao Xiang
This adds functions for directory, mainly readdir. Signed-off-by: Miao Xie Signed-off-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/dir.c | 145 1 file changed, 145 insertions(+) create mode 100644 drivers/staging/erofs/dir.c

[PATCH 09/25] staging: erofs: introduce xattr & acl support

2018-07-26 Thread Gao Xiang
will be used instead. Signed-off-by: Miao Xie Signed-off-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/Kconfig| 37 +++ drivers/staging/erofs/Makefile | 1 + drivers/staging/erofs/inode.c| 33 ++- drivers/staging/erofs/internal.h | 22 ++ drivers/staging/erofs

[PATCH 08/25] staging: erofs: update Kconfig and Makefile

2018-07-26 Thread Gao Xiang
This commit adds Makefile and Kconfig for erofs, and updates Makefile and Kconfig files in the fs directory. Signed-off-by: Miao Xie Signed-off-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/Kconfig| 2 ++ drivers/staging/Makefile | 1 + drivers/staging/erofs/Kconfig

[PATCH 04/25] staging: erofs: add raw address_space operations

2018-07-26 Thread Gao Xiang
This commit adds functions for meta and raw data, and also provides address_space_operations for raw data access. Signed-off-by: Miao Xie Signed-off-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/data.c | 362 +++ 1 file changed, 362

[PATCH 2/2] staging: erofs: remove a redundant marco in xattr

2018-08-01 Thread Gao Xiang
There is no need to '#if CONFIG_EROFS_FS_XATTR' in xattr.c, let's remove it. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/xattr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/erofs/xattr.c b/drivers/staging/erofs/xattr.c index b74b314..6b9685f

[PATCH 1/2] staging: erofs: add the missing break in z_erofs_map_blocks_iter

2018-08-01 Thread Gao Xiang
This patch adds a missing break after adding the default case. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- Hi Greg, There are two erofs bugfix & cleanup patches ready for staging-next upstream. The original preview thread: https://lists.ozlabs.org/pipermail/linux-erofs/2018-July/00

[PATCH RESEND 1/2] staging: erofs: add the missing break in z_erofs_map_blocks_iter

2018-08-01 Thread Gao Xiang
This patch adds a missing break after adding the default case. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- As pointed out by Dan Carpenter: - fix the wrong place of fallthrough comments drivers/staging/erofs/unzip_vle.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers

Re: [PATCH 1/2] staging: erofs: add the missing break in z_erofs_map_blocks_iter

2018-08-01 Thread Gao Xiang
Hi Dan, On 2018/8/1 17:02, Dan Carpenter wrote: > On Wed, Aug 01, 2018 at 02:38:30PM +0800, Gao Xiang wrote: >> diff --git a/drivers/staging/erofs/unzip_vle.c >> b/drivers/staging/erofs/unzip_vle.c >> index bd2d7a8..6d3ab31 100644 >> --- a/drivers/staging/erofs/u

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

2018-08-05 Thread Gao Xiang
you can add: Reviewed-by: Gao Xiang Thanks, Gao Xiang ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

2018-08-02 Thread Gao Xiang
error. > > For potentail conflict in between erofs and vfs changes in incoming > merge window, Stephen suggested that we can disable CONFIG_EROFS_FS > temporarily to pass merge window, and after that we can do restore by > reenabling CONFIG_EROFS_FS and applying those fixing patches. Als

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

2018-07-29 Thread Gao Xiang
no code changes, but the following patches will be upstreamed as we disscussed this morning...) And could you review '[PATCH] staging: erofs: use the wrapped PTR_ERR_OR_ZERO instead of open code' I just sent in the morning? Thanks, Gao Xiang ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH] staging: erofs: remove an extra semicolon in z_erofs_vle_unzip_all

2018-08-05 Thread Gao Xiang
There is an extra semicolon in z_erofs_vle_unzip_all, remove it. Reported-by: Julia Lawall Signed-off-by: zhong jiang Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- zhongjiang also submitted a patch yesterday titled "drivers/staging: Remove some unneeded semicolon&qu

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

2018-08-12 Thread 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 `PTR_ERR applied after initialization to constant' reported by kbuild

Re: [PATCH 3/8] staging: erofs: add error handling for xattr submodule

2018-08-12 Thread Gao Xiang
Hi Chao, On 2018/8/13 10:00, Chao Yu wrote: > On 2018/8/12 22:01, Chao Yu wrote: >> From: Gao Xiang >> >> This patch enhances the missing error handling code for >> xattr submodule, which improves the stability for the rare cases. >> >> Signed-off

Re: [PATCH 2/8] staging: erofs: separate erofs_get_meta_page

2018-08-13 Thread Gao Xiang
e page been truncated? */ 1558 if (unlikely(page->mapping != mapping)) { 1559 unlock_page(page); 1560 put_page(page); 1561 goto repeat; 1562 } - filemap_faul

Re: [PATCH 3/8] staging: erofs: add error handling for xattr submodule

2018-08-13 Thread Gao Xiang
it->ofs += value_sz; > goto out; > } > > It looks like if we hit an error, we increase it->ofs. All the other > error paths in this function take a negative error and increase it->ofs > so this looks like an error path. The goto out look like this: Let me try to explain the design idea... If we are about to processing the xattr value, for getxattr, we need to check the xattr buffer is enough to contain the upcoming xattr value, return 0 to process(copy) its value to xattr buffer, return < 0 if some error (eg. buffer size is not enough) occurred. for listxattr, we need to skip this round to handle the next xattr item rather than continue to processing its upcoming xattr value, so 1 (>0) is returned. P.S. Whether `foreach' succeed or not, it should point to the next xattr item rather than the arbitary position, so that we can handle the next xattr properly (if the current xattr is not the needed xattr). > > /* we assume that ofs is aligned with 4 bytes */ > it->ofs = EROFS_XATTR_ALIGN(it->ofs); > return err; > > So we return 1 here and the callers all treat it at success... There > needs to be some documentation for what positive returns mean. OK, let me add more comments to show that. Thanks, Gao Xiang > > regards, > dan carpenter > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 6/8] staging: erofs: fix vle_decompressed_index_clusterofs

2018-08-13 Thread Gao Xiang
rofs, > > Not related to your patch, but don't make functions inline. Leave it to > the compiler to decide. OK, thanks for your suggestion. Thanks, Gao Xiang > > regards, > dan carpenter > > __

Re: [PATCH 4/8] staging: erofs: cleanup z_erofs_vle_work_{lookup, register}

2018-08-13 Thread Gao Xiang
ure. > Thanks for review, I personally tend to leave this patch unmodified for now :( . The struct is wrote in order to read-only or assign and read at once, and let compilers notice that (all modifications are local so compilers can handle them safely)... Thanks, Gao Xiang > reg

Re: [PATCH 4/8] staging: erofs: cleanup z_erofs_vle_work_{lookup, register}

2018-08-13 Thread Gao Xiang
Hi Dan, On 2018/8/13 20:00, Dan Carpenter wrote: > On Sun, Aug 12, 2018 at 10:01:46PM +0800, Chao Yu wrote: >> 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_registe

Re: [PATCH 3/8] staging: erofs: add error handling for xattr submodule

2018-08-13 Thread Gao Xiang
Hi Dan, On 2018/8/13 20:40, Dan Carpenter wrote: > On Mon, Aug 13, 2018 at 08:17:27PM +0800, Gao Xiang wrote: >>>> @@ -294,8 +322,11 @@ static int inline_getxattr(struct inode *inode, >>>> struct getxattr_iter *it) >>>>r

Re: [PATCH] staging: erofs: add int to usigned

2018-08-13 Thread Gao Xiang
Hi Leon, On 2018/8/13 20:09, Leon Imhof wrote: > Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'" > detected by checkpatch.pl > > Signed-off-by: Leon Imhof Looks fine, Reviewed-by: Gao Xiang (BTW, could you fix the title of this commit? Than

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

2018-08-13 Thread Gao Xiang
a new version of `[PATCH] staging: erofs: add int to usigned'. Reviewed-by: Gao Xiang Thanks, Gao Xiang > drivers/staging/erofs/data.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/erofs/data.c b/drivers/staging/erofs/data.c >

Re: [PATCH 3/8] staging: erofs: add error handling for xattr submodule

2018-08-13 Thread Gao Xiang
Hi Dan, On 2018/8/13 20:25, Dan Carpenter wrote: > On Mon, Aug 13, 2018 at 08:17:27PM +0800, Gao Xiang wrote: >>> /* we assume that ofs is aligned with 4 bytes */ >>> it->ofs = EROFS_XATTR_ALIGN(it->ofs); >>> return err; >>> > This migh

[PATCH] staging: erofs: fix potential overflow in z_erofs_vle_normalaccess_readpage{, s}

2018-08-23 Thread Gao Xiang
ing/erofs/unzip_vle.c:1322 z_erofs_vle_normalaccess_readpage() warn: should 'page->index << 12' be a 64 bit type? It needs to cast variable's type to erofs_off_t before left shifting. Reported-by: Dan Carpenter Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- This patch is based

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

2018-08-28 Thread Gao Xiang
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: >>

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

2018-08-28 Thread Gao Xiang
ermail/linux-erofs/2018-July/000282.html https://lists.ozlabs.org/pipermail/linux-erofs/2018-July/000284.html Thanks in advance... Thanks, Gao Xiang ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

2018-08-27 Thread Gao Xiang
Wilcox Cc: David Howells Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- Hi Greg, Could you please apply this patch to enable EROFS from 4.19-rc2, thanks... p.s. We would like to provide a more stable EROFS when linux-4.19 is out, and there are also two patchsets (the one is alread

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

2018-08-28 Thread Gao Xiang
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: >> This reverts commit 156c3df8d4db4e693c062978186f44079413d74d. >> >> Since XArray and the new mount apis aren't merged in 4.19-rc1 >> merge window, the

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

2018-08-30 Thread Gao Xiang
l use "== NULL" or "!= NULL" explicitly, too, eg: xfs, ext4, ext2, ocfs2, etc... You could 'grep' in the fs directory... Other commits look good for me at glance. Thanks, Gao Xiang ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

2018-08-30 Thread Gao Xiang
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

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

2018-09-05 Thread Gao Xiang
;>>> On Tue, Aug 28, 2018 at 04:56:43PM +0800, Chao Yu wrote: >>>>> >>>>> On 2018/8/28 14:28, Gao Xiang wrote: >>>>>> >>>>>> On 2018/8/28 13:44, Greg Kroah-Hartman wrote: >>>>>>> On Tue, Aug 28,

[PATCH 2/2 dhowells/mount-api] staging: erofs: update .mount and .remount_sb

2018-09-06 Thread Gao Xiang
This patch updates .mount and .remount_sb after commit ("vfs: Require specification of size of mount data for internal mounts") in reference to drivers/usb/gadget/function/f_fs.c. Reported-by: Stephen Rothwell Signed-off-by: Gao Xiang --- drivers/staging/erofs/super.c | 13 ++

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

2018-09-06 Thread Gao Xiang
This patch follows commit 1751e8a6cb93 ("Rename superblock flags (MS_xyz -> SB_xyz)") and after commit ("vfs: Suppress MS_* flag defs within the kernel unless explicitly enabled"), there is no MS_RDONLY and MS_NOATIME at all. Reported-by: Stephen Rothwell Reviewed-by: Chao

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

2018-09-06 Thread Gao Xiang
On 2018/9/6 18:08, David Howells wrote: > Gao Xiang wrote: > >> This patch follows commit 1751e8a6cb93 ("Rename superblock >> flags (MS_xyz -> SB_xyz)") and after commit ("vfs: Suppress >> MS_* flag defs within the kernel unless explicitly enabled&

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

2018-09-07 Thread Gao Xiang
r patch. Do you have some interest to fix this patch as Chao's suggestion? Or I could fix this patch based on your work, if you have no time to do...Thanks in advance. Thanks, Gao Xiang > On 2018/8/31 4:56, Thomas Weißschuh wrote: >> Signed-off-by: Thomas Weißschuh >>

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

2018-09-07 Thread Gao Xiang
Hi Dan, On 2018/9/7 17:17, Dan Carpenter wrote: > On Fri, Sep 07, 2018 at 04:48:44PM +0800, Gao Xiang wrote: >> Hi Thomas, >> >> On 2018/9/3 9:53, Chao Yu wrote: >>> Hi, >>> >>> It looks like there is another patch from Pavel Zemlyanoy changin

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
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)) 21 return false

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 v2] staging: erofs: use explicit unsigned int type

2018-09-07 Thread Gao Xiang
= 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 success immediately. > */ > -stat

Re: [PATCH] erofs: option validation in remount

2018-09-11 Thread Gao Xiang
; +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_FAUL

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] 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
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? Should

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: >>>>

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

2018-10-08 Thread Gao Xiang
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

[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=8300807f9e2dffb6552514763ad60e005c12eb94 Sorry for bothering... Thanks, Gao Xiang On 2018/10/13 1:59, Gao Xiang via Linux-erofs wrote: > From:

[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

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"

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

2018-11-07 Thread Gao Xiang
nt 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 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
ue) >>> 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

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

2018-11-09 Thread Gao Xiang
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, > > Could I ask a simple

[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 +

[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 +- 3 files

[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 t

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: >>>> >>

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 4/6] staging: erofs: formatting add spaces arround '*'

2018-09-02 Thread Gao Xiang
gt;> "Check: spaces preferred around that '*'". >> >> Signed-off-by: Pavel Zemlyanoy > > 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 2/6] staging: erofs: formatting fix to NULL comparison

2018-09-02 Thread Gao Xiang
ually can help to save > some time during review. :) > I am traveling in Tibet. Sorry for the late response. OK, that is fine. I will follow the new kernel coding style strictly for the upcoming code. Reviewed-by: Gao Xiang Thanks, Gao Xiang >> >> regards, >> dan carpenter >> > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

2018-09-02 Thread Gao Xiang
"; >> >> and 1 warning of type: >> "WARNING: braces {} are not necessary for any arm of this statement". >> >> Signed-off-by: Pavel Zemlyanoy > > Reviewed-by: Chao Yu > Reviewed-by: Gao Xiang Thanks, Gao Xiang > Thanks, > > __

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

2018-09-02 Thread Gao Xiang
ixes 11 warnings of the type: >> "WARNING: Prefer 'unsigned int' to bare use of 'unsigned'" >> >> Signed-off-by: Pavel Zemlyanoy > > Reviewed-by: Chao Yu > Reviewed-by: Gao Xiang Thanks, Gao Xiang > Thanks, > > ___

  1   2   3   4   5   6   7   8   9   >