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)) > > > > > + kfree(inode->i_link); > > > > > > > >

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: > > > > [] > > > > > > > > > + > > > > + /* fill last page if

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_space operations seem to largely

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 here. > > Which part of

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

2019-08-30 Thread Christoph Hellwig
On Sat, Aug 31, 2019 at 12:52:17AM +0800, Gao Xiang wrote: > 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); > > >

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_map_ram() (default > > 0)");

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

2019-08-30 Thread Gao Xiang
Hi Christoph, On Fri, Aug 30, 2019 at 09:28:12AM -0700, Christoph Hellwig wrote: > > - err = bio_add_page(bio, page, PAGE_SIZE, 0); > > - if (err != PAGE_SIZE) { > > + if (bio_add_page(bio, page, PAGE_SIZE, 0) != PAGE_SIZE) { > > err = -EFAULT; >

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

2019-08-30 Thread Christoph Hellwig
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: > > [] > > > > > > + > > > + /* fill last page if inline data is available */ > > > + err = fill_inline_data(inode, data, ofs); > > > > Well, I think

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

2019-08-30 Thread Christoph Hellwig
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_space operations seem to largely duplicate > > the iomap versions. Please use those instead. Also I don't think > > any new

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

2019-08-30 Thread Christoph Hellwig
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 here. Which part of all wasn't clear? Have you looked at the prefixes for most functions in the various other big

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

2019-08-30 Thread Christoph Hellwig
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_map_ram() (default 0)"); And how would anyone know which to pick?

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

2019-08-30 Thread Christoph Hellwig
> - err = bio_add_page(bio, page, PAGE_SIZE, 0); > - if (err != PAGE_SIZE) { > + if (bio_add_page(bio, page, PAGE_SIZE, 0) != PAGE_SIZE) { > err = -EFAULT; > goto err_out; > } This patch looks like an

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, or just those where

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); }) > > > > +static inline

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

2019-08-30 Thread Gao Xiang
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); }) > > > +static inline unsigned int erofs_xattr_ibody_size(__le16 d_icount) > > > +{ > > > + unsigned

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

2019-08-30 Thread Christoph Hellwig
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, or just those where you don't have a particularly good reason why you think in this particular case they might

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

2019-08-30 Thread Christoph Hellwig
On Thu, Aug 29, 2019 at 08:16:27PM -0700, Joe Perches wrote: > > - sizeof(__u32) * ((__count) - 1); }) > > +static inline unsigned int erofs_xattr_ibody_size(__le16 d_icount) > > +{ > > + unsigned int icount = le16_to_cpu(d_icount); > > + > > + if (!icount) > > + return 0;

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 > Reviewed-by: Chao Yu >

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 to check > > the type of inode.

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:54AM -0700, Christoph Hellwig wrote: > > >

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]

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

2019-08-30 Thread Gao Xiang via Linux-erofs
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 to check > the type of inode. > switch-case statement looks more clean here. > > Signed-off-by:

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

2019-08-30 Thread Dan Carpenter
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/linux-fsdevel/20190829154346.GK23584@kadam/ > Reported-by: Dan Carpenter > Signed-off-by: Gao Xiang > ---

Re: [PATCH v8 00/24] erofs: promote erofs from staging v8

2019-08-30 Thread Chao Yu
On 2019/8/15 12:41, Gao Xiang wrote: > [I strip the previous cover letter, the old one can be found in v6: > https://lore.kernel.org/r/20190802125347.166018-1-gaoxian...@huawei.com/] > > We'd like to submit a formal moving patch applied to staging tree > for 5.4, before that we'd like to hear if

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

2019-08-30 Thread Chao Yu
Xiang, the code itself looks clean to me. Reviewed-by: Chao Yu Thanks, On 2019/8/30 14:31, Gao Xiang wrote: > 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

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

2019-08-30 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.GK23584@kadam/ > >

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

2019-08-30 Thread Chao Yu
On 2019/8/30 11:36, Gao Xiang wrote: > As Joe Perches suggested [1], > err = bio_add_page(bio, page, PAGE_SIZE, 0); > - if (unlikely(err != PAGE_SIZE)) { > + if (err != PAGE_SIZE) { > err = -EFAULT; > goto err_out; >

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

2019-08-30 Thread Chao Yu
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.GK23584@kadam/ > Reported-by: Dan Carpenter > Signed-off-by: Gao Xiang I suggest we can modify this by

Re: [PATCH v3 5/7] erofs: kill erofs_{init,exit}_inode_cache

2019-08-30 Thread Chao Yu
On 2019/8/30 11:36, Gao Xiang wrote: > As Christoph said [1] "having this function > seems entirely pointless", I have to kill those. > > filesystem function name > ext2,f2fs,ext4,isofs,squashfs,cifs,... init_inodecache > > In addition, add a "rcu_barrier()" when

Re: [PATCH v3 4/7] erofs: kill __packed for on-disk structures

2019-08-30 Thread Chao Yu
On 2019/8/30 11:36, Gao Xiang wrote: > As Christoph claimed "Please don't add __packed" [1], > I have to 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]

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

2019-08-30 Thread Chao Yu
On 2019/8/30 11:36, Gao Xiang wrote: > As Christoph suggested [1], these marcos 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 Reviewed-by: Chao Yu Thanks,