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

2020-09-28 Thread Gao Xiang
2c390 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=124ccf3b90 > > The issue was bisected to: > > commit 382329a9d8553a98418a6f6e3425f0c288837897 > Author: Gao Xiang > Date: Wed Aug 14 10:37:04 2019 + > > staging: erofs: differentiate unsupporte

Re: [PATCH 10/10] errno.h: Provide EFSCORRUPTED for everybody

2019-11-03 Thread Gao Xiang
n Kara > Acked-by: Theodore Ts'o For EROFS part, Acked-by: Gao Xiang > --- > drivers/staging/exfat/exfat.h| 2 -- > fs/erofs/internal.h | 2 -- > fs/ext4/ext4.h | 1 - > fs/f2fs/f2fs.h | 1 - > fs/xfs/x

Re: [GIT PULL] Staging/IIO driver patches for 5.4-rc1

2019-09-18 Thread Gao Xiang
On Thu, Sep 19, 2019 at 05:11:28AM +0800, Gao Xiang wrote: > Hi Christoph, > > On Wed, Sep 18, 2019 at 11:24:12AM -0700, Christoph Hellwig wrote: > > Just as a note of record: I don't think either file system move > > is a good idea. erofs still needs a

Re: [GIT PULL] Staging/IIO driver patches for 5.4-rc1

2019-09-18 Thread Gao Xiang
se. I think a better way is to use a real address_space structure for page->mapping to point. It's easy to update but I need some time to verify. If I am wrong, please point it out... Thanks, Gao Xiang ___ devel mailing li

Re: [PATCH] staging: exfat: add exfat filesystem code to

2019-09-16 Thread Gao Xiang
latest)... someone could take more time and play a role in that actively in the community and maybe draw a roadmap of this so I could study more and maybe contribute a little in my spare time. And I think if it permits, development on multiple branches could be avoided... If I am wrong, please i

Re: [PATCH v2 00/25] erofs: patchset addressing Christoph's comments

2019-09-04 Thread Gao Xiang
Hi Christoph, On Wed, Sep 04, 2019 at 11:27:11AM +0800, Chao Yu wrote: > On 2019/9/4 10:08, Gao Xiang wrote: > > Hi, > > > > This patchset is based on the following patch by Pratik Shinde, > > https://lore.kernel.org/linux-erofs/20190830095615.10995-1-pratikshinde

Re: [PATCH] erofs: using switch-case while checking the inode type.

2019-09-04 Thread Gao Xiang
On Wed, Sep 04, 2019 at 08:31:34AM +0200, Greg KH wrote: > On Wed, Sep 04, 2019 at 10:12:47AM +0800, Gao Xiang wrote: > > Hi Greg, > > > > On Fri, Aug 30, 2019 at 10:22:33PM +0800, Gao Xiang wrote: > > > On Fri, Aug 30, 2019 at 07:59:48PM +0800, Gao

Re: [PATCH v2 00/25] erofs: patchset addressing Christoph's comments

2019-09-03 Thread Gao Xiang
Hi Christoph, On Wed, Sep 04, 2019 at 07:16:55AM +0200, Christoph Hellwig wrote: > On Wed, Sep 04, 2019 at 10:08:47AM +0800, Gao Xiang wrote: > > Hi, > > > > This patchset is based on the following patch by Pratik Shinde, > > https://lore.kernel.org/linux-e

Re: [PATCH] erofs: using switch-case while checking the inode type.

2019-09-03 Thread Gao Xiang
Hi Greg, On Fri, Aug 30, 2019 at 10:22:33PM +0800, Gao Xiang wrote: > On Fri, Aug 30, 2019 at 07:59:48PM +0800, Gao Xiang wrote: > > Hi Pratik, > > > > The subject line could be better as '[PATCH v2] xx'... > > > > On Fri, Aug 30, 2019 at 03:26:1

[PATCH v2 18/25] erofs: add "erofs_" prefix for common and short functions

2019-09-03 Thread Gao Xiang
Add erofs_ prefix to free_inode, alloc_inode, ... Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/data.c | 4 ++-- fs/erofs/decompressor.c | 22 +++--- fs/erofs/inode.c| 8 fs/erofs/internal.h | 2 +- fs/erofs/namei.c

[PATCH v2 20/25] erofs: kill use_vmap module parameter

2019-09-03 Thread Gao Xiang
se talk to maintainers of other bits of the kernel if you see issues and / or need enhancements. " Let's redo the previous conclusion and kill the vmap approach. [1] https://lore.kernel.org/r/20190830165533.ga10...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang

[PATCH v2 22/25] erofs: rename errln/infoln/debugln to erofs_{err, info, dbg}

2019-09-03 Thread Gao Xiang
Add prefix "erofs_" to these functions and print sb->s_id as a prefix to erofs_{err, info} so that the user knows which file system is affected. Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/data.c | 10 +++-- fs/erofs/decompressor.c | 5 +-- f

[PATCH v2 25/25] erofs: use read_cache_page_gfp for erofs_get_meta_page

2019-09-03 Thread Gao Xiang
de a lot and a minor thing is "no REQ_META (e.g. for blktrace) on metadata at all..." [1] https://lore.kernel.org/r/20190903153704.ga2...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/data.c | 70 +++--

[PATCH v2 16/25] erofs: kill prio and nofail of erofs_get_meta_page()

2019-09-03 Thread Gao Xiang
and nofail and erofs_get_inline_page() now. [1] https://lore.kernel.org/r/20190830162812.ga10...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/data.c | 25 ++--- fs/erofs/inode.c| 2 +- fs/erofs/internal.h | 18 +

[PATCH v2 09/25] erofs: use erofs_inode naming

2019-09-03 Thread Gao Xiang
As Christoph suggested [1], "Why is this called vnode instead of inode? That seems like a rather odd naming for a Linux file system." [1] https://lore.kernel.org/r/20190829101545.gc20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/er

[PATCH v2 23/25] erofs: use read_mapping_page instead of sb_bread

2019-09-03 Thread Gao Xiang
0902125109.ga9...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/super.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/fs/erofs/super.c b/fs/erofs/super.c index 1d9880195ef0..caf9a95173b0 100644 --- a/fs/erofs/super.c +++

[PATCH v2 19/25] erofs: kill all erofs specific fault injection

2019-09-03 Thread Gao Xiang
As Christoph suggested [1], "Please just use plain kmalloc everywhere and let the normal kernel error injection code take care of injeting any errors." [1] https://lore.kernel.org/r/20190829102426.ge20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- Doc

[PATCH v2 17/25] erofs: kill __submit_bio()

2019-09-03 Thread Gao Xiang
re.kernel.org/r/20190830162812.ga10...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/data.c | 21 + fs/erofs/internal.h | 7 --- fs/erofs/zdata.c| 6 -- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/fs/er

[PATCH v2 24/25] erofs: always use iget5_locked

2019-09-03 Thread Gao Xiang
25320.ga16...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/inode.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c index a0cec3c754cd..3350ab65d892 100644 --- a/fs/erofs/inode.c +++ b/fs/erofs/inode.c @@ -24

[PATCH v2 07/25] erofs: better naming for erofs inode related stuffs

2019-09-03 Thread Gao Xiang
.org/r/20190829102426.ge20...@infradead.org/ [3] https://lore.kernel.org/r/20190902122627.gn15...@infradead.org/ [4] https://lore.kernel.org/r/20190902125438.ga17...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/data.c | 9 ++-- fs/erofs/erofs_fs.h |

[PATCH v2 15/25] erofs: localize erofs_grab_bio()

2019-09-03 Thread Gao Xiang
radead.org/ [2] https://lore.kernel.org/r/20190902122016.gl15...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/data.c | 28 +++- fs/erofs/internal.h | 29 - fs/erofs/zdata.c| 10 +++--- 3 files c

[PATCH v2 21/25] erofs: save one level of indentation

2019-09-03 Thread Gao Xiang
As Christoph said [1], ".. and save one level of indentation." [1] https://lore.kernel.org/r/20190829102426.ge20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/inode.c | 65 1 file changed, 33

[PATCH v2 01/25] erofs: remove all the byte offset comments

2019-09-03 Thread Gao Xiang
As Christoph suggested [1], "Please remove all the byte offset comments. that is something that can easily be checked with gdb or pahole." [1] https://lore.kernel.org/r/20190829095954.gb20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/erofs_

[PATCH v2 02/25] erofs: on-disk format should have explicitly assigned numbers

2019-09-03 Thread Gao Xiang
As Christoph suggested [1], on-disk format should have explicitly assigned numbers. [1] https://lore.kernel.org/r/20190829095954.gb20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/erofs_fs.h | 18 +- 1 file changed, 9 insertions(+), 9

[PATCH v2 10/25] erofs: update erofs_fs.h comments

2019-09-03 Thread Gao Xiang
As Christoph said [1] [2], update it now. [1] https://lore.kernel.org/r/20190902124521.ga22...@infradead.org/ [2] https://lore.kernel.org/r/20190902120548.gb15...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/erofs_fs.h | 9 + 1 file changed, 5

[PATCH v2 11/25] erofs: update comments in inode.c

2019-09-03 Thread Gao Xiang
As Christoph suggested [1], update them all. [1] https://lore.kernel.org/r/20190829102426.ge20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/erofs/inode.c b/fs/erofs

[PATCH v2 14/25] erofs: kill verbose debug info in erofs_fill_super

2019-09-03 Thread Gao Xiang
As Christoph said [1], "That is some very verbose debug info. We usually don't add that and let people trace the function instead. " [1] https://lore.kernel.org/r/20190829101545.gc20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/er

[PATCH v2 13/25] erofs: use dsb instead of layout for ondisk super_block

2019-09-03 Thread Gao Xiang
As Christoph pointed out [1], "Why is the variable name for the on-disk subperblock layout? We usually still calls this something with sb in the name, e.g. dsb. for disksuper block. " Let's fix it. [1] https://lore.kernel.org/r/20190829101545.gc20...@infradead.org/ Signed-of

[PATCH v2 12/25] erofs: better erofs symlink stuffs

2019-09-03 Thread Gao Xiang
ops in the same place where you also set those." [1] https://lore.kernel.org/r/20190830163910.gb29...@infradead.org/ [2] https://lore.kernel.org/r/20190829102426.ge20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/e

[PATCH v2 05/25] erofs: update erofs_inode_is_data_compressed helper

2019-09-03 Thread Gao Xiang
re.kernel.org/r/20190829095954.gb20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/erofs_fs.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/erofs/erofs_fs.h b/fs/erofs/erofs_fs.h index 59dcc2e8cb02..87d7ae82339a 100644 --- a/fs/e

[PATCH v2 06/25] erofs: use feature_incompat rather than requirements

2019-09-03 Thread Gao Xiang
ristoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/decompressor.c | 3 ++- fs/erofs/erofs_fs.h | 12 ++-- fs/erofs/internal.h | 2 +- fs/erofs/super.c| 10 +- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/fs/erofs/decompressor.c b/fs/erofs/dec

[PATCH v2 03/25] erofs: some macros are much more readable as a function

2019-09-03 Thread Gao Xiang
As Christoph suggested [1], these macros are much more readable as a function. [1] https://lore.kernel.org/r/20190829095954.gb20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/erofs_fs.h | 22 ++ fs/erofs/inode.c| 4 ++-- fs

[PATCH v2 08/25] erofs: kill erofs_{init,exit}_inode_cache

2019-09-03 Thread Gao Xiang
https://lore.kernel.org/r/20190829101545.gc20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/super.c | 31 --- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/fs/erofs/super.c b/fs/erofs/super.c index 8d9f38d56b3b..499

[PATCH v2 00/25] erofs: patchset addressing Christoph's comments

2019-09-03 Thread Gao Xiang
/lore.kernel.org/r/20190902122016.gl15...@infradead.org/ - use compact/extended instead of erofs_inode_v1/v2 and i_format instead of i_advise; - avoid chained if/else if/else if statements in erofs_read_inode; - avoid erofs_vmap/vunmap wrappers; - use read_cache_page_gfp for erofs_get_meta_pa

[PATCH v2 04/25] erofs: kill __packed for on-disk structures

2019-09-03 Thread Gao Xiang
.@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/erofs_fs.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/erofs/erofs_fs.h b/fs/erofs/erofs_fs.h index c1220b0f26e0..59dcc2e8cb02 100644 --- a/fs/erofs/erofs_fs.h

Re: [PATCH 00/21] erofs: patchset addressing Christoph's comments

2019-09-03 Thread Gao Xiang
Hi Christoph, On Tue, Sep 03, 2019 at 08:37:04AM -0700, Christoph Hellwig wrote: > On Tue, Sep 03, 2019 at 04:17:49PM +0800, Gao Xiang wrote: > > I implement a prelimitary version, but I have no idea it is a really > > cleanup for now. > > The fact that this has to g

Re: [PATCH 00/21] erofs: patchset addressing Christoph's comments

2019-09-03 Thread Gao Xiang
Hi Christoph, On Mon, Sep 02, 2019 at 11:58:03PM -0700, Christoph Hellwig wrote: > On Mon, Sep 02, 2019 at 11:50:38PM +0800, Gao Xiang wrote: > > > > You means killing erofs_get_meta_page or avoid erofs_read_raw_page? > > > > > > > > - For killing e

Re: [PATCH 00/21] erofs: patchset addressing Christoph's comments

2019-09-02 Thread Gao Xiang
Hi Christoph, On Mon, Sep 02, 2019 at 08:23:23AM -0700, Christoph Hellwig wrote: > On Mon, Sep 02, 2019 at 10:24:52PM +0800, Gao Xiang wrote: > > > code quality stuff. We're not addressing the issues with large amounts > > > of functionality duplicating VFS helpers.

Re: [PATCH v6 03/24] erofs: add super block operations

2019-09-02 Thread Gao Xiang
Hi Christoph, On Mon, Sep 02, 2019 at 08:19:10AM -0700, Christoph Hellwig wrote: > On Mon, Sep 02, 2019 at 10:43:04PM +0800, Gao Xiang wrote: > > Hi Christoph, > > > > ... > > > > 24 __le32 features;/* (aka. feature_compat) */ > > > >

Re: [PATCH v8 11/24] erofs: introduce xattr & posixacl support

2019-09-02 Thread Gao Xiang
attr is necessary for Android, but ACL is not. I'm fine with killing these two, but EROFS can be used in more wider embedded scenerios (other than Android), I have no idea xattrs is useful for those embedded devices... Thanks, Gao Xiang ___ dev

Re: [PATCH v8 11/24] erofs: introduce xattr & posixacl support

2019-09-02 Thread Gao Xiang
ne to keep the options, I just wanted to ensure this wasn't > copy and pasted for no good reason. Note that for XFS we don't have > an option for xattrs, as those are integral to a lot of file system > features. WE have an ACL o

Re: [PATCH v6 03/24] erofs: add super block operations

2019-09-02 Thread Gao Xiang
Hi Christoph, On Mon, Sep 02, 2019 at 05:51:09AM -0700, Christoph Hellwig wrote: > On Sun, Sep 01, 2019 at 04:54:55PM +0800, Gao Xiang wrote: > > No modification at this... (some comments already right here...) > > > 20 /* 128-byte erofs on-disk super block */ > > 21

Re: [PATCH 00/21] erofs: patchset addressing Christoph's comments

2019-09-02 Thread Gao Xiang
Hi Christoph, On Mon, Sep 02, 2019 at 05:46:45AM -0700, Christoph Hellwig wrote: > On Sun, Sep 01, 2019 at 01:51:09PM +0800, Gao Xiang wrote: > > Hi, > > > > This patchset is based on the following patch by Pratik Shinde, > > https://lore.kernel.org/linux-e

Re: [PATCH v6 05/24] erofs: add inode operations

2019-09-02 Thread Gao Xiang
Hi David, On Mon, Sep 02, 2019 at 03:43:29PM +0200, David Sterba wrote: > On Sun, Sep 01, 2019 at 05:34:00PM +0800, Gao Xiang wrote: > > > > +static int read_inode(struct inode *inode, void *data) > > > > +{ > > > > + struct erofs_vnode *vi =

Re: [PATCH 16/21] erofs: kill magic underscores

2019-09-02 Thread Gao Xiang
Hi Christoph, On Mon, Sep 02, 2019 at 05:54:38AM -0700, Christoph Hellwig wrote: > On Mon, Sep 02, 2019 at 08:39:37PM +0800, Gao Xiang wrote: > > > > > > > + if (erofs_inode_version(advise) == EROFS_INODE_LAYOUT_V2) { > > > > > > I still need t

Re: [PATCH 07/21] erofs: use erofs_inode naming

2019-09-02 Thread Gao Xiang
Hi Christoph, On Mon, Sep 02, 2019 at 05:47:37AM -0700, Christoph Hellwig wrote: > On Mon, Sep 02, 2019 at 08:13:06PM +0800, Gao Xiang wrote: > > Hi Christoph, > > > > On Mon, Sep 02, 2019 at 05:10:21AM -0700, Christoph Hellwig wrote: > > > > { > > &

Re: [PATCH v8 11/24] erofs: introduce xattr & posixacl support

2019-09-02 Thread Gao Xiang
Access Control Lists" > > + depends on EROFS_FS_XATTR > > + select FS_POSIX_ACL > > + default y > > Is there any good reason to make these optional these days? ...Android (like smartphones) will not use it at least (just my personal thought, an option tho

Re: [PATCH v6 01/24] erofs: add on-disk layout

2019-09-02 Thread Gao Xiang
Hi Christoph, On Mon, Sep 02, 2019 at 05:45:21AM -0700, Christoph Hellwig wrote: > On Sun, Sep 01, 2019 at 03:54:11PM +0800, Gao Xiang wrote: > > It could be better has a name though, because 1) erofs.mkfs uses this > > definition explicitly, and we keep this on-disk defini

Re: [PATCH 20/21] erofs: kill use_vmap module parameter

2019-09-02 Thread Gao Xiang
. > > And don't forget to report your performance observations to the arm64 > maintainers! In my observation, vm_map_ram always performs better... If there are something strange later, I will report to them immediately... :) Thanks, Gao Xiang ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 16/21] erofs: kill magic underscores

2019-09-02 Thread Gao Xiang
T, EROFS_I_VERSION_BITS) > > > > +#define erofs_inode_data_mapping(advise) \ > > + erofs_bitrange(advise, EROFS_I_DATA_MAPPING_BIT, \ > > + EROFS_I_DATA_MAPPING_BITS) > > All these should probably be inline functions. Will fix... Thanks, Gao Xiang ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 12/21] erofs: kill verbose debug info in erofs_fill_super

2019-09-02 Thread Gao Xiang
Hi Christoph, On Mon, Sep 02, 2019 at 05:14:24AM -0700, Christoph Hellwig wrote: > On Sun, Sep 01, 2019 at 01:51:21PM +0800, Gao Xiang wrote: > > From: Gao Xiang > > > > As Christoph said [1], "That is some very verbose > > debug info. We usually don't

Re: [PATCH 11/21] erofs: use dsb instead of layout for ondisk super_block

2019-09-02 Thread Gao Xiang
ded. Yes, thanks and will fix it... Thanks, Gao Xiang ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 07/21] erofs: use erofs_inode naming

2019-09-02 Thread Gao Xiang
Why doesn't this use EROFS_I? This looks a little odd. Thanks for your reply and suggestion... EROFS_I seems the revert direction ---> inode to erofs_inode here we need "erofs_inode" to inode... Am I missing something? Hope not Thanks, Gao Xiang _

Re: [PATCH v6 01/24] erofs: add on-disk layout

2019-09-02 Thread Gao Xiang
hat Christoph was trying to say that it's unnecessary to __packed for this case since we designed most erofs on-disk format in natural alignment... Anyway, I updated, that seems okay...) Thanks, Gao Xiang > > Best regards, >

Re: [PATCH v6 06/24] erofs: support special inode

2019-09-01 Thread Gao Xiang
Hi Christoph, On Thu, Aug 29, 2019 at 03:25:03AM -0700, Christoph Hellwig wrote: > On Fri, Aug 02, 2019 at 08:53:29PM +0800, Gao Xiang wrote: > > This patch adds to support special inode, such as > > block dev, char, socket, pipe inode. > > > > Signed-off-by: Gao X

Re: [PATCH v6 05/24] erofs: add inode operations

2019-09-01 Thread Gao Xiang
Hi Christoph, Here are redo-ed comments of your suggestions... On Thu, Aug 29, 2019 at 03:24:26AM -0700, Christoph Hellwig wrote: > On Fri, Aug 02, 2019 at 08:53:28PM +0800, Gao Xiang wrote: > > This adds core functions to get, read an inode. > > It adds statx support as well.

Re: [PATCH v6 03/24] erofs: add super block operations

2019-09-01 Thread Gao Xiang
Hi Christoph, Here is also my redo-ed comments... On Thu, Aug 29, 2019 at 03:15:45AM -0700, Christoph Hellwig wrote: > On Fri, Aug 02, 2019 at 08:53:26PM +0800, Gao Xiang wrote: > > +static int __init erofs_init_inode_cache(void) > > +{ > > + erofs_inode_cachep = kmem_cach

Re: [PATCH v6 01/24] erofs: add on-disk layout

2019-09-01 Thread Gao Xiang
re readable as a function. Fixed in https://lore.kernel.org/linux-fsdevel/20190901055130.30572-4-hsiang...@aol.com/ > > > +#define EROFS_XATTR_ENTRY_SIZE(entry) EROFS_XATTR_ALIGN( \ > > + sizeof(struct erofs_xattr_entry) + \ > > + (entry)->e_name_len + le16_to_cpu((entry)->

[PATCH 21/21] erofs: save one level of indentation

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph said [1], ".. and save one level of indentation." [1] https://lore.kernel.org/r/20190829102426.ge20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/inode.c | 65 --

[PATCH 18/21] erofs: add "erofs_" prefix for common and short functions

2019-08-31 Thread Gao Xiang
From: Gao Xiang Add erofs_ prefix to free_inode, alloc_inode, ... Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/data.c | 6 +++--- fs/erofs/decompressor.c | 22 +++--- fs/erofs/inode.c| 8 fs/erofs/namei.c| 10

[PATCH 19/21] erofs: kill all erofs specific fault injection

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested [1], "Please just use plain kmalloc everywhere and let the normal kernel error injection code take care of injeting any errors." [1] https://lore.kernel.org/r/20190829102426.ge20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by:

[PATCH 15/21] erofs: kill __submit_bio()

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph pointed out [1], " Why is there __submit_bio which really just obsfucates what is going on? Also why is __submit_bio using bio_set_op_attrs instead of opencode it as the comment right next to it asks you to? " Let's use submit_bio directly inst

[PATCH 14/21] erofs: kill prio and nofail of erofs_get_meta_page()

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph pointed out [1], "Why is there __erofs_get_meta_page with the two weird booleans instead of a single erofs_get_meta_page that gets and gfp_t for additional flags and an unsigned int for additional bio op flags." And since all callers can handle errors,

[PATCH 20/21] erofs: kill use_vmap module parameter

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph said [1], "vm_map_ram is supposed to generally behave better. So if it doesn't please report that that to the arch maintainer and linux-mm so that they can look into the issue. Having user make choices of deep down kernel internals is just a horrible

[PATCH 17/21] erofs: use a switch statement when dealing with the file modes

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested [1], " Please use a switch statement when dealing with the file modes to make everything easier to read." [1] https://lore.kernel.org/r/20190829102503.gf20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/ero

[PATCH 16/21] erofs: kill magic underscores

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph said [1], " > + vi->datamode = __inode_data_mapping(advise); What is the deal with these magic underscores here and various other similar helpers? " Let avoid magic underscores now... [1] https://lore.kernel.org/lkml/20190829102426.ge20.

[PATCH 13/21] erofs: simplify erofs_grab_bio() since bio_alloc() never fail

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph pointed out [1], "erofs_grab_bio tries to handle a bio_alloc failure, except that the function will not actually fail due the mempool backing it." Sorry about useless code, fix it now. [1] https://lore.kernel.org/lkml/20190830162812.ga10...@infradead.org

[PATCH 05/21] erofs: update erofs_inode_is_data_compressed helper

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph said, "This looks like a really obsfucated way to write: return datamode == EROFS_INODE_FLAT_COMPRESSION || datamode == EROFS_INODE_FLAT_COMPRESSION_LEGACY; " Although I had my own consideration, it's the right way for

[PATCH 06/21] erofs: kill erofs_{init,exit}_inode_cache

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph said [1] "having this function seems entirely pointless", let's kill those. filesystem function name ext2,f2fs,ext4,isofs,squashfs,cifs,... init_inodecache In addition, add a necessary "rcu_barrier()"

[PATCH 08/21] erofs: update comments in inode.c

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested [1], update them all. [1] https://lore.kernel.org/r/20190829102426.ge20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/erofs

[PATCH 12/21] erofs: kill verbose debug info in erofs_fill_super

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph said [1], "That is some very verbose debug info. We usually don't add that and let people trace the function instead. " [1] https://lore.kernel.org/r/20190829101545.gc20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang

[PATCH 04/21] erofs: kill __packed for on-disk structures

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested "Please don't add __packed" [1], remove all __packed except struct erofs_dirent here. Note that all on-disk fields except struct erofs_dirent (12 bytes with a 8-byte nid) in EROFS are naturally aligned. [1] https://lore.kernel.org/r/2019

[PATCH 09/21] erofs: update erofs symlink stuffs

2019-08-31 Thread Gao Xiang
From: Gao Xiang Fix as Christoph suggested [1] [2], "remove is_inode_fast_symlink and just opencode it in the few places using it" and "Please just set the ops directly instead of obsfucating that in a single caller, single line inline function. And please set it instead of the

[PATCH 07/21] erofs: use erofs_inode naming

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested [1], "Why is this called vnode instead of inode? That seems like a rather odd naming for a Linux file system." [1] https://lore.kernel.org/r/20190829101545.gc20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang ---

[PATCH 03/21] erofs: some macros are much more readable as a function

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested [1], these macros are much more readable as a function. [1] https://lore.kernel.org/r/20190829095954.gb20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/erofs_fs.h | 22 ++ fs/erofs/inode.c

[PATCH 10/21] erofs: kill is_inode_layout_compression()

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested [1], "The name of this helper is a little odd. But I think just opencoding it seems generally cleaner anyway. " [1] https://lore.kernel.org/r/20190829102426.ge20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang ---

[PATCH 11/21] erofs: use dsb instead of layout for ondisk super_block

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph pointed out [1], "Why is the variable name for the on-disk subperblock layout? We usually still calls this something with sb in the name, e.g. dsb. for disksuper block. " Let's fix it. [1] https://lore.kernel.org/r/20190829101545.gc20...@infradead.org

[PATCH 02/21] erofs: on-disk format should have explicitly assigned numbers

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph claimed [1], on-disk format should have explicitly assigned numbers. I have to change it. [1] https://lore.kernel.org/r/20190829095954.gb20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/erofs_fs.h | 18

[PATCH 01/21] erofs: remove all the byte offset comments

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested [1], "Please remove all the byte offset comments. that is something that can easily be checked with gdb or pahole." [1] https://lore.kernel.org/r/20190829095954.gb20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang ---

[PATCH 00/21] erofs: patchset addressing Christoph's comments

2019-08-31 Thread Gao Xiang
h was followed f2fs and previously discussed in earlier topic [1], but let's follow what Christoph's said now. Comments and suggestions are welcome... [1] https://lore.kernel.org/r/1eed1e6b-f95e-aa8e-c3e7-e9870401e...@kernel.org/ Thanks, Gao Xiang Gao Xiang (21): erofs: remove all

Re: [PATCH v6 03/24] erofs: add super block operations

2019-08-30 Thread Gao Xiang
On Sat, Aug 31, 2019 at 09:34:44AM +0300, Amir Goldstein wrote: > On Fri, Aug 30, 2019 at 8:16 PM Gao Xiang wrote: > > > > Hi Christoph, > > > > On Fri, Aug 30, 2019 at 09:39:10AM -0700, Christoph Hellwig wrote: > > > On Thu, Aug 29, 2019 at 06:50:48PM +0800, G

Re: [PATCH v6 03/24] erofs: add super block operations

2019-08-30 Thread Gao Xiang
Hi Christoph, On Sat, Aug 31, 2019 at 01:15:10AM +0800, Gao Xiang wrote: [] > > > > > > > + /* be careful RCU symlink path (see ext4_inode_info->i_data)! */ > > > > > + if (is_inode_fast_symlink(inode)) >

Re: [PATCH v6 05/24] erofs: add inode operations

2019-08-30 Thread Gao Xiang
Hi Christoph, On Fri, Aug 30, 2019 at 09:42:05AM -0700, Christoph Hellwig wrote: > On Thu, Aug 29, 2019 at 07:59:22PM +0800, Gao Xiang wrote: > > On Thu, Aug 29, 2019 at 03:24:26AM -0700, Christoph Hellwig wrote: > > > > [] > > > > > > > > >

Re: [PATCH v6 04/24] erofs: add raw address_space operations

2019-08-30 Thread Gao Xiang
Hi Christoph, On Fri, Aug 30, 2019 at 09:40:13AM -0700, Christoph Hellwig wrote: > On Thu, Aug 29, 2019 at 07:46:11PM +0800, Gao Xiang wrote: > > Hi Christoph, > > > > On Thu, Aug 29, 2019 at 03:17:21AM -0700, Christoph Hellwig wrote: > > > The actual address_sp

Re: [PATCH v6 03/24] erofs: add super block operations

2019-08-30 Thread Gao Xiang
Hi Christoph, On Fri, Aug 30, 2019 at 09:39:10AM -0700, Christoph Hellwig wrote: > On Thu, Aug 29, 2019 at 06:50:48PM +0800, Gao Xiang wrote: > > > Please use an erofs_ prefix for all your functions. > > > > It is already a static function, I have no idea what is wrong

Re: [PATCH v8 20/24] erofs: introduce generic decompression backend

2019-08-30 Thread Gao Xiang
Hi Christoph, On Fri, Aug 30, 2019 at 09:35:34AM -0700, Christoph Hellwig wrote: > On Thu, Aug 15, 2019 at 12:41:51PM +0800, Gao Xiang wrote: > > +static bool use_vmap; > > +module_param(use_vmap, bool, 0444); > > +MODULE_PARM_DESC(use_vmap, "Use vmap() instead of vm

Re: [PATCH v3 7/7] erofs: redundant assignment in __erofs_get_meta_page()

2019-08-30 Thread Gao Xiang
have to admit, that code was originally just copied from f2fs with some modification (maybe it's not a good example for us). Thanks, Gao Xiang ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v3 6/7] erofs: remove all likely/unlikely annotations

2019-08-30 Thread Gao Xiang
Hi Christoph, On Fri, Aug 30, 2019 at 08:46:50AM -0700, Christoph Hellwig wrote: > On Fri, Aug 30, 2019 at 11:36:42AM +0800, Gao Xiang wrote: > > As Dan Carpenter suggested [1], I have to remove > > all erofs likely/unlikely annotations. > > Do you have to remove all of them

Re: [PATCH v2 2/7] erofs: some marcos are much more readable as a function

2019-08-30 Thread Gao Xiang
On Fri, Aug 30, 2019 at 11:52:23PM +0800, Gao Xiang wrote: > Hi Christoph, > > On Fri, Aug 30, 2019 at 08:45:51AM -0700, Christoph Hellwig wrote: > > On Thu, Aug 29, 2019 at 08:16:27PM -0700, Joe Perches wrote: > > > > - sizeof(__u32) * ((__count) - 1)

Re: [PATCH v2 2/7] erofs: some marcos are much more readable as a function

2019-08-30 Thread Gao Xiang
order to keep the number continuously, actually the content could be an array of shared_xattr_id and an inline xattr combination (struct erofs_xattr_entry + name + value) Thanks, Gao Xiang ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v3 1/7] erofs: on-disk format should have explicitly assigned numbers

2019-08-30 Thread Gao Xiang
On Fri, Aug 30, 2019 at 11:36:37AM +0800, Gao Xiang wrote: > As Christoph claimed [1], on-disk format should have > explicitly assigned numbers. I have to change it. > > [1] https://lore.kernel.org/r/20190829095954.gb20...@infradead.org/ > Reported-by: Christoph Hellwig > Re

Re: [PATCH] erofs: using switch-case while checking the inode type.

2019-08-30 Thread Gao Xiang
On Fri, Aug 30, 2019 at 07:59:48PM +0800, Gao Xiang wrote: > Hi Pratik, > > The subject line could be better as '[PATCH v2] xx'... > > On Fri, Aug 30, 2019 at 03:26:15PM +0530, Pratik Shinde wrote: > > while filling the linux inode, using switch-case statement

Re: [PATCH v6 01/24] erofs: add on-disk layout

2019-08-30 Thread Gao Xiang
Hi David, On Fri, Aug 30, 2019 at 02:07:14PM +0200, David Sterba wrote: > On Thu, Aug 29, 2019 at 08:58:17AM -0700, Joe Perches wrote: > > On Thu, 2019-08-29 at 18:32 +0800, Gao Xiang wrote: > > > Hi Christoph, > > > > > > On Thu, Aug 29, 2019 at 02:59

Re: [PATCH v3 6/7] erofs: remove all likely/unlikely annotations

2019-08-30 Thread Gao Xiang
Hi Dan, On Fri, Aug 30, 2019 at 02:30:47PM +0300, Dan Carpenter wrote: > On Fri, Aug 30, 2019 at 11:36:42AM +0800, Gao Xiang wrote: > > As Dan Carpenter suggested [1], I have to remove > > all erofs likely/unlikely annotations. > > > > [1] https://lore.kernel.org/l

Re: [PATCH] staging: exfat: add exfat filesystem code to staging

2019-08-30 Thread Gao Xiang
Hi Dan, On Fri, Aug 30, 2019 at 02:26:12PM +0300, Dan Carpenter wrote: > On Fri, Aug 30, 2019 at 04:43:33PM +0800, Gao Xiang wrote: > > Hi Dan, > > > > On Fri, Aug 30, 2019 at 11:34:45AM +0300, Dan Carpenter wrote: > > > On Fri, Aug 30, 2019 at 12:04:41AM +0800, G

Re: [PATCH] erofs: using switch-case while checking the inode type.

2019-08-30 Thread Gao Xiang
> > Signed-off-by: Pratik Shinde I have no problem of this patch, and I will do a test and reply you "Reviewed-by:" in hours (I'm doing another patchset to resolve what Christoph suggested again)... Thanks, Gao Xiang > --- > fs/erofs/inode.c | 18 -- &g

Re: [PATCH] staging: exfat: add exfat filesystem code to staging

2019-08-30 Thread Gao Xiang
Hi Dan, On Fri, Aug 30, 2019 at 11:34:45AM +0300, Dan Carpenter wrote: > On Fri, Aug 30, 2019 at 12:04:41AM +0800, Gao Xiang wrote: > > Anyway, I'm fine to delete them all if you like, but I think majority of > > these > > are meaningful. > > > > data.c-

Re: [PATCH] staging: exfat: add exfat filesystem code to staging

2019-08-29 Thread Gao Xiang
e since there are many personal tendencies from various people in it, as the saying goes "There are a thousand Hamlets in a thousand people's eyes. " Anyway, I have sent a patch to kill them all blindly as you like, so I think we can come to an agr

Re: [PATCH v3 6/7] erofs: remove all likely/unlikely annotations

2019-08-29 Thread Gao Xiang
Hi Chao, On Fri, Aug 30, 2019 at 02:25:13PM +0800, Chao Yu wrote: > On 2019/8/30 11:36, Gao Xiang wrote: > > As Dan Carpenter suggested [1], I have to remove > > all erofs likely/unlikely annotations. > > > > [1] https://lore.kernel.org/linux-fsdevel/20190829154346.GK2

[PATCH v4 2/7] erofs: some macros are much more readable as a function

2019-08-29 Thread Gao Xiang
As Christoph suggested [1], these macros are much more readable as a function. [1] https://lore.kernel.org/r/20190829095954.gb20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- v4: a type fix in commit message. v3: change as Joe suggested, https://lore.kernel.org

  1   2   3   4   5   6   7   8   9   >