Re: [PATCH v2] btrfs: Unexport and rename btrfs_invalidate_inodes

2018-05-10 Thread Anand Jain



On 04/27/2018 07:36 PM, Nikolay Borisov wrote:

This function is no longer used outside of inode.c so just make it
static. At the same time give a more becoming name, since it's not
really invalidating the inodes but just calling d_prune_alias. Last,
but not least - move the function above the sole caller to avoid
introducing yet-another-pointless forward declaration.

Signed-off-by: Nikolay Borisov 


Reviewed-by: Anand Jain 

Thanks, Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] btrfs: Unexport and rename btrfs_invalidate_inodes

2018-04-28 Thread kbuild test robot
Hi Nikolay,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20180424]
[cannot apply to v4.17-rc2 v4.17-rc1 v4.16 v4.17-rc2]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Nikolay-Borisov/btrfs-Unexport-and-rename-btrfs_invalidate_inodes/20180428-234332
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   fs/btrfs/disk-io.c:4317:17: sparse: undefined identifier 
'btrfs_invalidate_inodes'
   fs/btrfs/disk-io.c:295:27: sparse: expression using sizeof(void)
   fs/btrfs/disk-io.c:295:27: sparse: expression using sizeof(void)
   fs/btrfs/disk-io.c:2257:39: sparse: expression using sizeof(void)
   fs/btrfs/disk-io.c:2257:39: sparse: expression using sizeof(void)
   fs/btrfs/disk-io.c:2298:39: sparse: expression using sizeof(void)
   fs/btrfs/disk-io.c:2298:39: sparse: expression using sizeof(void)
   fs/btrfs/disk-io.c:2560:37: sparse: expression using sizeof(void)
   fs/btrfs/disk-io.c:2788:31: sparse: expression using sizeof(void)
   fs/btrfs/disk-io.c:3191:17: sparse: incompatible types in comparison 
expression (different address spaces)
   fs/btrfs/disk-io.c:3523:33: sparse: expression using sizeof(void)
   fs/btrfs/disk-io.c:3523:33: sparse: expression using sizeof(void)
   fs/btrfs/disk-io.c:3532:33: sparse: expression using sizeof(void)
   fs/btrfs/disk-io.c:3532:33: sparse: expression using sizeof(void)
>> fs/btrfs/disk-io.c:4317:40: sparse: call with no type!
   fs/btrfs/disk-io.c: In function 'btrfs_destroy_delalloc_inodes':
   fs/btrfs/disk-io.c:4317:3: error: implicit declaration of function 
'btrfs_invalidate_inodes'; did you mean 'btrfs_update_inode'? 
[-Werror=implicit-function-declaration]
  btrfs_invalidate_inodes(btrfs_inode->root);
  ^~~
  btrfs_update_inode
   cc1: some warnings being treated as errors

vim +4317 fs/btrfs/disk-io.c

acce952b0 liubo2011-01-06  4297  
143bede52 Jeff Mahoney 2012-03-01  4298  static void 
btrfs_destroy_delalloc_inodes(struct btrfs_root *root)
acce952b0 liubo2011-01-06  4299  {
acce952b0 liubo2011-01-06  4300 struct btrfs_inode *btrfs_inode;
acce952b0 liubo2011-01-06  4301 struct list_head splice;
acce952b0 liubo2011-01-06  4302  
acce952b0 liubo2011-01-06  4303 INIT_LIST_HEAD();
acce952b0 liubo2011-01-06  4304  
eb73c1b7c Miao Xie 2013-05-15  4305 spin_lock(>delalloc_lock);
eb73c1b7c Miao Xie 2013-05-15  4306 
list_splice_init(>delalloc_inodes, );
acce952b0 liubo2011-01-06  4307  
acce952b0 liubo2011-01-06  4308 while (!list_empty()) {
eb73c1b7c Miao Xie 2013-05-15  4309 btrfs_inode = 
list_first_entry(, struct btrfs_inode,
acce952b0 liubo2011-01-06  4310 
   delalloc_inodes);
acce952b0 liubo2011-01-06  4311  
acce952b0 liubo2011-01-06  4312 
list_del_init(_inode->delalloc_inodes);
df0af1a57 Miao Xie 2013-01-29  4313 
clear_bit(BTRFS_INODE_IN_DELALLOC_LIST,
df0af1a57 Miao Xie 2013-01-29  4314   
_inode->runtime_flags);
eb73c1b7c Miao Xie 2013-05-15  4315 
spin_unlock(>delalloc_lock);
acce952b0 liubo2011-01-06  4316  
acce952b0 liubo2011-01-06 @4317 
btrfs_invalidate_inodes(btrfs_inode->root);
b216cbfb5 Miao Xie 2013-05-15  4318  
eb73c1b7c Miao Xie 2013-05-15  4319 
spin_lock(>delalloc_lock);
acce952b0 liubo2011-01-06  4320 }
acce952b0 liubo2011-01-06  4321  
eb73c1b7c Miao Xie 2013-05-15  4322 
spin_unlock(>delalloc_lock);
acce952b0 liubo2011-01-06  4323  }
acce952b0 liubo2011-01-06  4324  

:: The code at line 4317 was first introduced by commit
:: acce952b0263825da32cf10489413dec78053347 Btrfs: forced readonly mounts 
on errors

:: TO: liubo 
:: CC: Chris Mason 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] btrfs: Unexport and rename btrfs_invalidate_inodes

2018-04-28 Thread kbuild test robot
Hi Nikolay,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20180424]
[cannot apply to v4.17-rc2 v4.17-rc1 v4.16 v4.17-rc2]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Nikolay-Borisov/btrfs-Unexport-and-rename-btrfs_invalidate_inodes/20180428-234332
config: i386-randconfig-a0-201816 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   fs//btrfs/disk-io.c: In function 'btrfs_destroy_delalloc_inodes':
>> fs//btrfs/disk-io.c:4317:3: error: implicit declaration of function 
>> 'btrfs_invalidate_inodes' [-Werror=implicit-function-declaration]
  btrfs_invalidate_inodes(btrfs_inode->root);
  ^
   cc1: some warnings being treated as errors

vim +/btrfs_invalidate_inodes +4317 fs//btrfs/disk-io.c

acce952b0 liubo2011-01-06  4297  
143bede52 Jeff Mahoney 2012-03-01  4298  static void 
btrfs_destroy_delalloc_inodes(struct btrfs_root *root)
acce952b0 liubo2011-01-06  4299  {
acce952b0 liubo2011-01-06  4300 struct btrfs_inode *btrfs_inode;
acce952b0 liubo2011-01-06  4301 struct list_head splice;
acce952b0 liubo2011-01-06  4302  
acce952b0 liubo2011-01-06  4303 INIT_LIST_HEAD();
acce952b0 liubo2011-01-06  4304  
eb73c1b7c Miao Xie 2013-05-15  4305 spin_lock(>delalloc_lock);
eb73c1b7c Miao Xie 2013-05-15  4306 
list_splice_init(>delalloc_inodes, );
acce952b0 liubo2011-01-06  4307  
acce952b0 liubo2011-01-06  4308 while (!list_empty()) {
eb73c1b7c Miao Xie 2013-05-15  4309 btrfs_inode = 
list_first_entry(, struct btrfs_inode,
acce952b0 liubo2011-01-06  4310 
   delalloc_inodes);
acce952b0 liubo2011-01-06  4311  
acce952b0 liubo2011-01-06  4312 
list_del_init(_inode->delalloc_inodes);
df0af1a57 Miao Xie 2013-01-29  4313 
clear_bit(BTRFS_INODE_IN_DELALLOC_LIST,
df0af1a57 Miao Xie 2013-01-29  4314   
_inode->runtime_flags);
eb73c1b7c Miao Xie 2013-05-15  4315 
spin_unlock(>delalloc_lock);
acce952b0 liubo2011-01-06  4316  
acce952b0 liubo2011-01-06 @4317 
btrfs_invalidate_inodes(btrfs_inode->root);
b216cbfb5 Miao Xie 2013-05-15  4318  
eb73c1b7c Miao Xie 2013-05-15  4319 
spin_lock(>delalloc_lock);
acce952b0 liubo2011-01-06  4320 }
acce952b0 liubo2011-01-06  4321  
eb73c1b7c Miao Xie 2013-05-15  4322 
spin_unlock(>delalloc_lock);
acce952b0 liubo2011-01-06  4323  }
acce952b0 liubo2011-01-06  4324  

:: The code at line 4317 was first introduced by commit
:: acce952b0263825da32cf10489413dec78053347 Btrfs: forced readonly mounts 
on errors

:: TO: liubo 
:: CC: Chris Mason 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH v2] btrfs: Unexport and rename btrfs_invalidate_inodes

2018-04-28 Thread kbuild test robot
Hi Nikolay,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20180424]
[cannot apply to v4.17-rc2 v4.17-rc1 v4.16 v4.17-rc2]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Nikolay-Borisov/btrfs-Unexport-and-rename-btrfs_invalidate_inodes/20180428-234332
config: x86_64-randconfig-x013-201816 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   fs/btrfs/disk-io.c: In function 'btrfs_destroy_delalloc_inodes':
>> fs/btrfs/disk-io.c:4317:3: error: implicit declaration of function 
>> 'btrfs_invalidate_inodes'; did you mean 'btrfs_update_inode'? 
>> [-Werror=implicit-function-declaration]
  btrfs_invalidate_inodes(btrfs_inode->root);
  ^~~
  btrfs_update_inode
   cc1: some warnings being treated as errors

vim +4317 fs/btrfs/disk-io.c

acce952b0 liubo2011-01-06  4297  
143bede52 Jeff Mahoney 2012-03-01  4298  static void 
btrfs_destroy_delalloc_inodes(struct btrfs_root *root)
acce952b0 liubo2011-01-06  4299  {
acce952b0 liubo2011-01-06  4300 struct btrfs_inode *btrfs_inode;
acce952b0 liubo2011-01-06  4301 struct list_head splice;
acce952b0 liubo2011-01-06  4302  
acce952b0 liubo2011-01-06  4303 INIT_LIST_HEAD();
acce952b0 liubo2011-01-06  4304  
eb73c1b7c Miao Xie 2013-05-15  4305 spin_lock(>delalloc_lock);
eb73c1b7c Miao Xie 2013-05-15  4306 
list_splice_init(>delalloc_inodes, );
acce952b0 liubo2011-01-06  4307  
acce952b0 liubo2011-01-06  4308 while (!list_empty()) {
eb73c1b7c Miao Xie 2013-05-15  4309 btrfs_inode = 
list_first_entry(, struct btrfs_inode,
acce952b0 liubo2011-01-06  4310 
   delalloc_inodes);
acce952b0 liubo2011-01-06  4311  
acce952b0 liubo2011-01-06  4312 
list_del_init(_inode->delalloc_inodes);
df0af1a57 Miao Xie 2013-01-29  4313 
clear_bit(BTRFS_INODE_IN_DELALLOC_LIST,
df0af1a57 Miao Xie 2013-01-29  4314   
_inode->runtime_flags);
eb73c1b7c Miao Xie 2013-05-15  4315 
spin_unlock(>delalloc_lock);
acce952b0 liubo2011-01-06  4316  
acce952b0 liubo2011-01-06 @4317 
btrfs_invalidate_inodes(btrfs_inode->root);
b216cbfb5 Miao Xie 2013-05-15  4318  
eb73c1b7c Miao Xie 2013-05-15  4319 
spin_lock(>delalloc_lock);
acce952b0 liubo2011-01-06  4320 }
acce952b0 liubo2011-01-06  4321  
eb73c1b7c Miao Xie 2013-05-15  4322 
spin_unlock(>delalloc_lock);
acce952b0 liubo2011-01-06  4323  }
acce952b0 liubo2011-01-06  4324  

:: The code at line 4317 was first introduced by commit
:: acce952b0263825da32cf10489413dec78053347 Btrfs: forced readonly mounts 
on errors

:: TO: liubo 
:: CC: Chris Mason 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip