[josef-btrfs:kill-mmap-sem-v5 9/10] htmldocs: mm/filemap.c:2882: warning: Function parameter or member 'mkwrite' not described in 'filemap_page_mkwrite_nommapsem'

2018-10-26 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
kill-mmap-sem-v5
head:   c7a3e899803d98ae543468f0026500c651528a6c
commit: c52634339df10df75f28787f431b937de3c3c591 [9/10] mm: introduce 
filemap_page_mkwrite_nommapsem
reproduce: make htmldocs

All warnings (new ones prefixed by >>):

   WARNING: convert(1) not found, for SVG to PDF conversion install ImageMagick 
(https://www.imagemagick.org)
   include/linux/srcu.h:175: warning: Function parameter or member 'p' not 
described in 'srcu_dereference_notrace'
   include/linux/srcu.h:175: warning: Function parameter or member 'sp' not 
described in 'srcu_dereference_notrace'
   include/linux/gfp.h:1: warning: no structured comments found
>> mm/filemap.c:2882: warning: Function parameter or member 'mkwrite' not 
>> described in 'filemap_page_mkwrite_nommapsem'
   mm/filemap.c:2882: warning: Excess function parameter 'page_mkwrite_cb' 
description in 'filemap_page_mkwrite_nommapsem'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4381: warning: Function parameter or member 
'wext.ibss' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 
'wext.connect' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 
'wext.keys' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 'wext.ie' 
not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 
'wext.ie_len' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 
'wext.bssid' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 
'wext.ssid' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 
'wext.default_key' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 
'wext.default_mgmt_key' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 
'wext.prev_bssid_valid' not described in 'wireless_dev'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' 
description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 

Re: [PATCH] btrfs: Fix error handling in btrfs_cleanup_ordered_extents

2018-10-26 Thread kbuild test robot
Hi Nikolay,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v4.19]
[also build test ERROR on next-20181019]
[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-Fix-error-handling-in-btrfs_cleanup_ordered_extents/20181026-194005
config: x86_64-randconfig-x014-201842 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   fs/btrfs/inode.c: In function 'btrfs_cleanup_ordered_extents':
>> fs/btrfs/inode.c:10618:0: error: unterminated argument list invoking macro 
>> "if"
};

>> fs/btrfs/inode.c:140:2: error: expected '(' at end of input
 if (page_start >= offset && page_end <= (offset + bytes - 1) {
 ^~
>> fs/btrfs/inode.c:140:2: warning: this 'if' clause does not guard... 
>> [-Wmisleading-indentation]
   fs/btrfs/inode.c:10618:0: note: ...this statement, but the latter is 
misleadingly indented as if it were guarded by the 'if'
};

>> fs/btrfs/inode.c:140:2: error: expected declaration or statement at end of 
>> input
 if (page_start >= offset && page_end <= (offset + bytes - 1) {
 ^~
   fs/btrfs/inode.c:122:6: warning: unused variable 'page_end' 
[-Wunused-variable]
 u64 page_end = page_start + PAGE_SIZE - 1;
 ^~~~
   fs/btrfs/inode.c: At top level:
   fs/btrfs/inode.c:87:12: warning: 'btrfs_setsize' declared 'static' but never 
defined [-Wunused-function]
static int btrfs_setsize(struct inode *inode, struct iattr *attr);
   ^
   fs/btrfs/inode.c:88:12: warning: 'btrfs_truncate' declared 'static' but 
never defined [-Wunused-function]
static int btrfs_truncate(struct inode *inode, bool skip_writeback);
   ^~
   fs/btrfs/inode.c:89:12: warning: 'btrfs_finish_ordered_io' declared 'static' 
but never defined [-Wunused-function]
static int btrfs_finish_ordered_io(struct btrfs_ordered_extent 
*ordered_extent);
   ^~~
   fs/btrfs/inode.c:90:21: warning: 'cow_file_range' declared 'static' but 
never defined [-Wunused-function]
static noinline int cow_file_range(struct inode *inode,
^~
   fs/btrfs/inode.c:95:27: warning: 'create_io_em' declared 'static' but never 
defined [-Wunused-function]
static struct extent_map *create_io_em(struct inode *inode, u64 start, u64 
len,
  ^~~~
   fs/btrfs/inode.c:101:13: warning: '__endio_write_update_ordered' declared 
'static' but never defined [-Wunused-function]
static void __endio_write_update_ordered(struct inode *inode,
^~~~
   fs/btrfs/inode.c:71:27: warning: 'btrfs_inode_cachep' defined but not used 
[-Wunused-variable]
static struct kmem_cache *btrfs_inode_cachep;
  ^~

vim +/if +10618 fs/btrfs/inode.c

76dda93c Yan, Zheng  2009-09-21  10615  
82d339d9 Alexey Dobriyan 2009-10-09  10616  const struct dentry_operations 
btrfs_dentry_operations = {
76dda93c Yan, Zheng  2009-09-21  10617  .d_delete   = 
btrfs_dentry_delete,
76dda93c Yan, Zheng  2009-09-21 @10618  };

:: The code at line 10618 was first introduced by commit
:: 76dda93c6ae2c1dc3e6cde34569d6aca26b0c918 Btrfs: add snapshot/subvolume 
destroy ioctl

:: TO: Yan, Zheng 
:: 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] btrfs: Fix error handling in btrfs_cleanup_ordered_extents

2018-10-26 Thread kbuild test robot
Hi Nikolay,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v4.19]
[also build test ERROR on next-20181019]
[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-Fix-error-handling-in-btrfs_cleanup_ordered_extents/20181026-194005
config: i386-randconfig-x007-201842 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   fs//btrfs/inode.c: In function 'btrfs_cleanup_ordered_extents':
>> fs//btrfs/inode.c:140:63: error: expected ')' before '{' token
 if (page_start >= offset && page_end <= (offset + bytes - 1) {
  ^
>> fs//btrfs/inode.c:146:1: error: expected expression before '}' token
}
^

vim +140 fs//btrfs/inode.c

86  
87  static int btrfs_setsize(struct inode *inode, struct iattr *attr);
88  static int btrfs_truncate(struct inode *inode, bool skip_writeback);
89  static int btrfs_finish_ordered_io(struct btrfs_ordered_extent 
*ordered_extent);
90  static noinline int cow_file_range(struct inode *inode,
91 struct page *locked_page,
92 u64 start, u64 end, u64 delalloc_end,
93 int *page_started, unsigned long 
*nr_written,
94 int unlock, struct btrfs_dedupe_hash 
*hash);
95  static struct extent_map *create_io_em(struct inode *inode, u64 start, 
u64 len,
96 u64 orig_start, u64 block_start,
97 u64 block_len, u64 
orig_block_len,
98 u64 ram_bytes, int compress_type,
99 int type);
   100  
   101  static void __endio_write_update_ordered(struct inode *inode,
   102   const u64 offset, const u64 
bytes,
   103   const bool uptodate);
   104  
   105  /*
   106   * Cleanup all submitted ordered extents in specified range to handle 
errors
   107   * from the fill_dellaloc() callback.
   108   *
   109   * NOTE: caller must ensure that when an error happens, it can not call
   110   * extent_clear_unlock_delalloc() to clear both the bits 
EXTENT_DO_ACCOUNTING
   111   * and EXTENT_DELALLOC simultaneously, because that causes the reserved 
metadata
   112   * to be released, which we want to happen only when finishing the 
ordered
   113   * extent (btrfs_finish_ordered_io()).
   114   */
   115  static inline void btrfs_cleanup_ordered_extents(struct inode *inode,
   116   struct page 
*locked_page,
   117   u64 offset, u64 bytes)
   118  {
   119  unsigned long index = offset >> PAGE_SHIFT;
   120  unsigned long end_index = (offset + bytes - 1) >> PAGE_SHIFT;
   121  u64 page_start = page_offset(locked_page);
   122  u64 page_end = page_start + PAGE_SIZE - 1;
   123  
   124  struct page *page;
   125  
   126  while (index <= end_index) {
   127  page = find_get_page(inode->i_mapping, index);
   128  index++;
   129  if (!page)
   130  continue;
   131  ClearPagePrivate2(page);
   132  put_page(page);
   133  }
   134  
   135  /*
   136   * In case this page belongs to the delalloc range being 
instantiated
   137   * then skip it, since the first page of a range is going to be
   138   * properly cleaned up by the caller of run_delalloc_range
   139   */
 > 140  if (page_start >= offset && page_end <= (offset + bytes - 1) {
   141  offset += PAGE_SIZE;
   142  bytes -= PAGE_SIZE;
   143  }
   144  
   145  return __endio_write_update_ordered(inode, offset, bytes, 
false);
 > 146  }
   147  

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


.config.gz
Description: application/gzip


[josef-btrfs:kill-mmap-sem-v3 10/10] include/linux/compiler_types.h:258:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'inline'

2018-09-30 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
kill-mmap-sem-v3
head:   2bdf3757643c03bcff975b2e3352f022e33e3d0a
commit: 2bdf3757643c03bcff975b2e3352f022e33e3d0a [10/10] btrfs: drop mmap_sem 
in mkwrite for btrfs
config: sh-allyesconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 2bdf3757643c03bcff975b2e3352f022e33e3d0a
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=sh 

All errors (new ones prefixed by >>):

   In file included from :0:0:
>> include/linux/compiler_types.h:258:2: error: expected '=', ',', ';', 'asm' 
>> or '__attribute__' before 'inline'
 inline __attribute__((always_inline, unused)) notrace __gnu_inline
 ^
   include/linux/mm.h:1475:8: note: in expansion of macro 'inline'
stiatc inline struct file *maybe_unlock_mmap_for_io(struct vm_area_struct 
*vma,
   ^~
   make[2]: *** [arch/sh/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [sub-make] Error 2

vim +258 include/linux/compiler_types.h

815f0ddb Nick Desaulniers 2018-08-22  242  
815f0ddb Nick Desaulniers 2018-08-22  243  /*
815f0ddb Nick Desaulniers 2018-08-22  244   * Force always-inline if the user 
requests it so via the .config.
815f0ddb Nick Desaulniers 2018-08-22  245   * GCC does not warn about unused 
static inline functions for
815f0ddb Nick Desaulniers 2018-08-22  246   * -Wunused-function.  This turns 
out to avoid the need for complex #ifdef
815f0ddb Nick Desaulniers 2018-08-22  247   * directives.  Suppress the warning 
in clang as well by using "unused"
815f0ddb Nick Desaulniers 2018-08-22  248   * function attribute, which is 
redundant but not harmful for gcc.
815f0ddb Nick Desaulniers 2018-08-22  249   * Prefer gnu_inline, so that extern 
inline functions do not emit an
815f0ddb Nick Desaulniers 2018-08-22  250   * externally visible function. This 
makes extern inline behave as per gnu89
815f0ddb Nick Desaulniers 2018-08-22  251   * semantics rather than c99. This 
prevents multiple symbol definition errors
815f0ddb Nick Desaulniers 2018-08-22  252   * of extern inline functions at 
link time.
815f0ddb Nick Desaulniers 2018-08-22  253   * A lot of inline functions can 
cause havoc with function tracing.
815f0ddb Nick Desaulniers 2018-08-22  254   */
815f0ddb Nick Desaulniers 2018-08-22  255  #if 
!defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
815f0ddb Nick Desaulniers 2018-08-22  256   
!defined(CONFIG_OPTIMIZE_INLINING)
815f0ddb Nick Desaulniers 2018-08-22  257  #define inline \
815f0ddb Nick Desaulniers 2018-08-22 @258   inline 
__attribute__((always_inline, unused)) notrace __gnu_inline
815f0ddb Nick Desaulniers 2018-08-22  259  #else
815f0ddb Nick Desaulniers 2018-08-22  260  #define inline inline
__attribute__((unused)) notrace __gnu_inline
815f0ddb Nick Desaulniers 2018-08-22  261  #endif
815f0ddb Nick Desaulniers 2018-08-22  262  

:: The code at line 258 was first introduced by commit
:: 815f0ddb346c196018d4d8f8f55c12b83da1de3f include/linux/compiler*.h: make 
compiler-*.h mutually exclusive

:: TO: Nick Desaulniers 
:: CC: Linus Torvalds 

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


.config.gz
Description: application/gzip


[josef-btrfs:kill-mmap-sem-v3 4/10] mm/shmem.c:1682:10: error: implicit declaration of function 'find_swap_cache'; did you mean 'find_swap_entry'?

2018-09-29 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
kill-mmap-sem-v3
head:   2bdf3757643c03bcff975b2e3352f022e33e3d0a
commit: 435e2282677bd076783518a0cda335c32d6b9884 [4/10] mm: clean up swapcache 
lookup and creation function names
config: x86_64-randconfig-g3-09300506 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout 435e2282677bd076783518a0cda335c32d6b9884
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   mm/shmem.c: In function 'shmem_getpage_gfp':
>> mm/shmem.c:1682:10: error: implicit declaration of function 
>> 'find_swap_cache'; did you mean 'find_swap_entry'? 
>> [-Werror=implicit-function-declaration]
  page = find_swap_cache(swap, NULL, 0);
 ^~~
 find_swap_entry
   mm/shmem.c:1682:8: warning: assignment makes pointer from integer without a 
cast [-Wint-conversion]
  page = find_swap_cache(swap, NULL, 0);
   ^
   cc1: some warnings being treated as errors
--
   mm/memory.c: In function 'do_swap_page':
>> mm/memory.c:2938:9: error: implicit declaration of function 
>> 'find_swap_cache'; did you mean 'add_to_swap_cache'? 
>> [-Werror=implicit-function-declaration]
 page = find_swap_cache(entry, vma, vmf->address);
^~~
add_to_swap_cache
   mm/memory.c:2938:7: warning: assignment makes pointer from integer without a 
cast [-Wint-conversion]
 page = find_swap_cache(entry, vma, vmf->address);
  ^
   cc1: some warnings being treated as errors

vim +1682 mm/shmem.c

  1610  
  1611  /*
  1612   * shmem_getpage_gfp - find page in cache, or get from swap, or allocate
  1613   *
  1614   * If we allocate a new one we do not mark it dirty. That's up to the
  1615   * vm. If we swap it in we mark it dirty since we also free the swap
  1616   * entry since a page cannot live in both the swap and page cache.
  1617   *
  1618   * fault_mm and fault_type are only supplied by shmem_fault:
  1619   * otherwise they are NULL.
  1620   */
  1621  static int shmem_getpage_gfp(struct inode *inode, pgoff_t index,
  1622  struct page **pagep, enum sgp_type sgp, gfp_t gfp,
  1623  struct vm_area_struct *vma, struct vm_fault *vmf,
  1624  vm_fault_t *fault_type)
  1625  {
  1626  struct address_space *mapping = inode->i_mapping;
  1627  struct shmem_inode_info *info = SHMEM_I(inode);
  1628  struct shmem_sb_info *sbinfo;
  1629  struct mm_struct *charge_mm;
  1630  struct mem_cgroup *memcg;
  1631  struct page *page;
  1632  swp_entry_t swap;
  1633  enum sgp_type sgp_huge = sgp;
  1634  pgoff_t hindex = index;
  1635  int error;
  1636  int once = 0;
  1637  int alloced = 0;
  1638  
  1639  if (index > (MAX_LFS_FILESIZE >> PAGE_SHIFT))
  1640  return -EFBIG;
  1641  if (sgp == SGP_NOHUGE || sgp == SGP_HUGE)
  1642  sgp = SGP_CACHE;
  1643  repeat:
  1644  swap.val = 0;
  1645  page = find_lock_entry(mapping, index);
  1646  if (radix_tree_exceptional_entry(page)) {
  1647  swap = radix_to_swp_entry(page);
  1648  page = NULL;
  1649  }
  1650  
  1651  if (sgp <= SGP_CACHE &&
  1652  ((loff_t)index << PAGE_SHIFT) >= i_size_read(inode)) {
  1653  error = -EINVAL;
  1654  goto unlock;
  1655  }
  1656  
  1657  if (page && sgp == SGP_WRITE)
  1658  mark_page_accessed(page);
  1659  
  1660  /* fallocated page? */
  1661  if (page && !PageUptodate(page)) {
  1662  if (sgp != SGP_READ)
  1663  goto clear;
  1664  unlock_page(page);
  1665  put_page(page);
  1666  page = NULL;
  1667  }
  1668  if (page || (sgp == SGP_READ && !swap.val)) {
  1669  *pagep = page;
  1670  return 0;
  1671  }
  1672  
  1673  /*
  1674   * Fast cache lookup did not find it:
  1675   * bring it back from swap or allocate.
  1676   */
  1677  sbinfo = SHMEM_SB(inode->i_sb);
  1678  charge_mm = vma ? vma->vm_mm : current->mm;
  1679  
  1680  if (swap.val) {
  1681  /* Look it up and read it in.. */
> 1682  page = find_swap_cache(swap, NULL, 0);
  1683  if (!page) {
  1684  /* Or update major stats only when swapin 
succeeds?? */
  1685  if (fault_type) {
  1686  *fault_type |= VM_FAULT_MAJOR;
  1687  count_vm_event(PGMAJFAULT);
  1688  count_memcg_event_mm(charge_mm, 

[josef-btrfs:kill-mmap-sem-v3 4/10] mm/shmem.c:1682:3: error: implicit declaration of function 'find_swap_cache'

2018-09-29 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
kill-mmap-sem-v3
head:   2bdf3757643c03bcff975b2e3352f022e33e3d0a
commit: 435e2282677bd076783518a0cda335c32d6b9884 [4/10] mm: clean up swapcache 
lookup and creation function names
config: i386-randconfig-sb0-09300821 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
git checkout 435e2282677bd076783518a0cda335c32d6b9884
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   mm/shmem.c: In function 'shmem_getpage_gfp':
>> mm/shmem.c:1682:3: error: implicit declaration of function 'find_swap_cache' 
>> [-Werror=implicit-function-declaration]
  page = find_swap_cache(swap, NULL, 0);
  ^
   mm/shmem.c:1682:8: warning: assignment makes pointer from integer without a 
cast
  page = find_swap_cache(swap, NULL, 0);
   ^
   cc1: some warnings being treated as errors
--
   mm/memory.c: In function 'do_swap_page':
>> mm/memory.c:2938:2: error: implicit declaration of function 
>> 'find_swap_cache' [-Werror=implicit-function-declaration]
 page = find_swap_cache(entry, vma, vmf->address);
 ^
   mm/memory.c:2938:7: warning: assignment makes pointer from integer without a 
cast
 page = find_swap_cache(entry, vma, vmf->address);
  ^
   cc1: some warnings being treated as errors

vim +/find_swap_cache +1682 mm/shmem.c

  1610  
  1611  /*
  1612   * shmem_getpage_gfp - find page in cache, or get from swap, or allocate
  1613   *
  1614   * If we allocate a new one we do not mark it dirty. That's up to the
  1615   * vm. If we swap it in we mark it dirty since we also free the swap
  1616   * entry since a page cannot live in both the swap and page cache.
  1617   *
  1618   * fault_mm and fault_type are only supplied by shmem_fault:
  1619   * otherwise they are NULL.
  1620   */
  1621  static int shmem_getpage_gfp(struct inode *inode, pgoff_t index,
  1622  struct page **pagep, enum sgp_type sgp, gfp_t gfp,
  1623  struct vm_area_struct *vma, struct vm_fault *vmf,
  1624  vm_fault_t *fault_type)
  1625  {
  1626  struct address_space *mapping = inode->i_mapping;
  1627  struct shmem_inode_info *info = SHMEM_I(inode);
  1628  struct shmem_sb_info *sbinfo;
  1629  struct mm_struct *charge_mm;
  1630  struct mem_cgroup *memcg;
  1631  struct page *page;
  1632  swp_entry_t swap;
  1633  enum sgp_type sgp_huge = sgp;
  1634  pgoff_t hindex = index;
  1635  int error;
  1636  int once = 0;
  1637  int alloced = 0;
  1638  
  1639  if (index > (MAX_LFS_FILESIZE >> PAGE_SHIFT))
  1640  return -EFBIG;
  1641  if (sgp == SGP_NOHUGE || sgp == SGP_HUGE)
  1642  sgp = SGP_CACHE;
  1643  repeat:
  1644  swap.val = 0;
  1645  page = find_lock_entry(mapping, index);
  1646  if (radix_tree_exceptional_entry(page)) {
  1647  swap = radix_to_swp_entry(page);
  1648  page = NULL;
  1649  }
  1650  
  1651  if (sgp <= SGP_CACHE &&
  1652  ((loff_t)index << PAGE_SHIFT) >= i_size_read(inode)) {
  1653  error = -EINVAL;
  1654  goto unlock;
  1655  }
  1656  
  1657  if (page && sgp == SGP_WRITE)
  1658  mark_page_accessed(page);
  1659  
  1660  /* fallocated page? */
  1661  if (page && !PageUptodate(page)) {
  1662  if (sgp != SGP_READ)
  1663  goto clear;
  1664  unlock_page(page);
  1665  put_page(page);
  1666  page = NULL;
  1667  }
  1668  if (page || (sgp == SGP_READ && !swap.val)) {
  1669  *pagep = page;
  1670  return 0;
  1671  }
  1672  
  1673  /*
  1674   * Fast cache lookup did not find it:
  1675   * bring it back from swap or allocate.
  1676   */
  1677  sbinfo = SHMEM_SB(inode->i_sb);
  1678  charge_mm = vma ? vma->vm_mm : current->mm;
  1679  
  1680  if (swap.val) {
  1681  /* Look it up and read it in.. */
> 1682  page = find_swap_cache(swap, NULL, 0);
  1683  if (!page) {
  1684  /* Or update major stats only when swapin 
succeeds?? */
  1685  if (fault_type) {
  1686  *fault_type |= VM_FAULT_MAJOR;
  1687  count_vm_event(PGMAJFAULT);
  1688  count_memcg_event_mm(charge_mm, 
PGMAJFAULT);
  1689  }
  1690  /* Here we actually start the io */
  1691  page = shmem_swapin(swap, gfp, info, index);
  1692  

[PATCH] btrfs: fix ptr_ret.cocci warnings

2018-07-10 Thread kbuild test robot
From: kbuild test robot 

fs/btrfs/super.c:2243:8-14: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 193ea416dc5e ("btrfs: get fs_devices pointer form btrfs_scan_one_device")
CC: Gu Jinxiang 
Signed-off-by: kbuild test robot 
---

 super.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -2240,7 +2240,7 @@ static long btrfs_control_ioctl(struct f
case BTRFS_IOC_SCAN_DEV:
fs_devices = btrfs_scan_one_device(vol->name, FMODE_READ,
_root_fs_type);
-   ret = IS_ERR(fs_devices) ? PTR_ERR(fs_devices) : 0;
+   ret = PTR_ERR_OR_ZERO(fs_devices);
break;
case BTRFS_IOC_DEVICES_READY:
fs_devices = btrfs_scan_one_device(vol->name, FMODE_READ,
--
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 2/2] btrfs: get fs_devices pointer form btrfs_scan_one_device

2018-07-10 Thread kbuild test robot
Hi Gu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on v4.18-rc4]
[cannot apply to btrfs/next next-20180709]
[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/Gu-Jinxiang/btrfs-make-fs_devices-to-be-a-local-variable/20180710-191730


coccinelle warnings: (new ones prefixed by >>)

>> fs/btrfs/super.c:2243:8-14: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
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] btrfs: tree-checker: Verify block_group_item

2018-07-02 Thread kbuild test robot
Hi Qu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on btrfs/next]
[also build test WARNING on v4.18-rc3 next-20180629]
[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/Qu-Wenruo/btrfs-tree-checker-Verify-block_group_item/20180702-135502
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git 
next
config: i386-randconfig-x016-201826 (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=i386 

All warnings (new ones prefixed by >>):

   fs/btrfs/tree-checker.c: In function 'check_block_group_item':
>> fs/btrfs/tree-checker.c:402:41: warning: format '%lu' expects argument of 
>> type 'long unsigned int', but argument 6 has type 'unsigned int' [-Wformat=]
   "invalid item size, have %u expect %lu",
  ~~^
  %u

vim +402 fs/btrfs/tree-checker.c

   379  
   380  static int check_block_group_item(struct btrfs_fs_info *fs_info,
   381struct extent_buffer *leaf,
   382struct btrfs_key *key, int slot)
   383  {
   384  struct btrfs_block_group_item bgi;
   385  u32 item_size = btrfs_item_size_nr(leaf, slot);
   386  u64 flags;
   387  
   388  /*
   389   * Here we don't really care about unalignment since extent 
allocator
   390   * can handle it.
   391   * We care more about the size, as if one block group is larger 
than
   392   * maximum size, it's must be some obvious corruption
   393   */
   394  if (key->offset > 10ULL * SZ_1G) {
   395  block_group_err(fs_info, leaf, slot,
   396  "invalid block group size, have %llu expect (0, 
%llu)",
   397  key->offset, 10ULL * SZ_1G);
   398  return -EUCLEAN;
   399  }
   400  if (item_size != sizeof(bgi)) {
   401  block_group_err(fs_info, leaf, slot,
 > 402  "invalid item size, have %u expect %lu",
   403  item_size, sizeof(bgi));
   404  return -EUCLEAN;
   405  }
   406  read_extent_buffer(leaf, , btrfs_item_ptr_offset(leaf, 
slot),
   407 sizeof(bgi));
   408  if (btrfs_block_group_chunk_objectid() !=
   409  BTRFS_FIRST_CHUNK_TREE_OBJECTID) {
   410  block_group_err(fs_info, leaf, slot,
   411  "invalid block group chunk objectid, have %llu expect 
%llu",
   412  btrfs_block_group_chunk_objectid(),
   413  BTRFS_FIRST_CHUNK_TREE_OBJECTID);
   414  return -EUCLEAN;
   415  }
   416  if (btrfs_block_group_used() > key->offset) {
   417  block_group_err(fs_info, leaf, slot,
   418  "invalid block group used, have %llu expect [0, 
%llu)",
   419  btrfs_block_group_used(), 
key->offset);
   420  return -EUCLEAN;
   421  }
   422  flags = btrfs_block_group_flags();
   423  if (!((flags & BTRFS_BLOCK_GROUP_PROFILE_MASK) == 0 ||
   424hweight64(flags & BTRFS_BLOCK_GROUP_PROFILE_MASK) == 1)) {
   425  block_group_err(fs_info, leaf, slot,
   426  "invalid profile flags, have 0x%llx (%lu bits set) expect no more than 
1 bit set",
   427  flags & BTRFS_BLOCK_GROUP_PROFILE_MASK,
   428  hweight64(flags & 
BTRFS_BLOCK_GROUP_PROFILE_MASK));
   429  return -EUCLEAN;
   430  }
   431  if (hweight64(flags & BTRFS_BLOCK_GROUP_TYPE_MASK) != 1) {
   432  block_group_err(fs_info, leaf, slot,
   433  "invalid type flags, have 0x%llx (%lu bits set) expect exactly 1 bit 
set",
   434  flags & BTRFS_BLOCK_GROUP_TYPE_MASK,
   435  hweight64(flags & BTRFS_BLOCK_GROUP_TYPE_MASK));
   436  return -EUCLEAN;
   437  }
   438  return 0;
   439  }
   440  

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


.config.gz
Description: application/gzip


[josef-btrfs:blk-iolatency-v7 14/14] mm/readahead.c:504:6: error: implicit declaration of function 'blk_cgroup_congested'

2018-06-30 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency-v7
head:   4f16e9aa09862911cb7ec38061a48b91a72142c3
commit: 4f16e9aa09862911cb7ec38061a48b91a72142c3 [14/14] skip readahead if the 
cgroup is congested
config: openrisc-or1ksim_defconfig (attached as .config)
compiler: or1k-linux-gcc (GCC) 6.0.0 20160327 (experimental)
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 4f16e9aa09862911cb7ec38061a48b91a72142c3
# save the attached .config to linux build tree
make.cross ARCH=openrisc 

All errors (new ones prefixed by >>):

   mm/readahead.c: In function 'page_cache_sync_readahead':
>> mm/readahead.c:504:6: error: implicit declaration of function 
>> 'blk_cgroup_congested' [-Werror=implicit-function-declaration]
 if (blk_cgroup_congested())
 ^~~~
   cc1: some warnings being treated as errors

vim +/blk_cgroup_congested +504 mm/readahead.c

   481  
   482  /**
   483   * page_cache_sync_readahead - generic file readahead
   484   * @mapping: address_space which holds the pagecache and I/O vectors
   485   * @ra: file_ra_state which holds the readahead state
   486   * @filp: passed on to ->readpage() and ->readpages()
   487   * @offset: start offset into @mapping, in pagecache page-sized units
   488   * @req_size: hint: total size of the read which the caller is 
performing in
   489   *pagecache pages
   490   *
   491   * page_cache_sync_readahead() should be called when a cache miss 
happened:
   492   * it will submit the read.  The readahead logic may decide to 
piggyback more
   493   * pages onto the read request if access patterns suggest it will 
improve
   494   * performance.
   495   */
   496  void page_cache_sync_readahead(struct address_space *mapping,
   497 struct file_ra_state *ra, struct file 
*filp,
   498 pgoff_t offset, unsigned long req_size)
   499  {
   500  /* no read-ahead */
   501  if (!ra->ra_pages)
   502  return;
   503  
 > 504  if (blk_cgroup_congested())
   505  return;
   506  
   507  /* be dumb */
   508  if (filp && (filp->f_mode & FMODE_RANDOM)) {
   509  force_page_cache_readahead(mapping, filp, offset, 
req_size);
   510  return;
   511  }
   512  
   513  /* do read-ahead */
   514  ondemand_readahead(mapping, ra, filp, false, offset, req_size);
   515  }
   516  EXPORT_SYMBOL_GPL(page_cache_sync_readahead);
   517  

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


.config.gz
Description: application/gzip


[josef-btrfs:blk-iolatency-v7 14/14] mm/readahead.c:504:6: error: implicit declaration of function 'blk_cgroup_congested'; did you mean 'bdi_rw_congested'?

2018-06-30 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency-v7
head:   4f16e9aa09862911cb7ec38061a48b91a72142c3
commit: 4f16e9aa09862911cb7ec38061a48b91a72142c3 [14/14] skip readahead if the 
cgroup is congested
config: sh-allnoconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 4f16e9aa09862911cb7ec38061a48b91a72142c3
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=sh 

All errors (new ones prefixed by >>):

   mm/readahead.c: In function 'page_cache_sync_readahead':
>> mm/readahead.c:504:6: error: implicit declaration of function 
>> 'blk_cgroup_congested'; did you mean 'bdi_rw_congested'? 
>> [-Werror=implicit-function-declaration]
 if (blk_cgroup_congested())
 ^~~~
 bdi_rw_congested
   cc1: some warnings being treated as errors

vim +504 mm/readahead.c

   481  
   482  /**
   483   * page_cache_sync_readahead - generic file readahead
   484   * @mapping: address_space which holds the pagecache and I/O vectors
   485   * @ra: file_ra_state which holds the readahead state
   486   * @filp: passed on to ->readpage() and ->readpages()
   487   * @offset: start offset into @mapping, in pagecache page-sized units
   488   * @req_size: hint: total size of the read which the caller is 
performing in
   489   *pagecache pages
   490   *
   491   * page_cache_sync_readahead() should be called when a cache miss 
happened:
   492   * it will submit the read.  The readahead logic may decide to 
piggyback more
   493   * pages onto the read request if access patterns suggest it will 
improve
   494   * performance.
   495   */
   496  void page_cache_sync_readahead(struct address_space *mapping,
   497 struct file_ra_state *ra, struct file 
*filp,
   498 pgoff_t offset, unsigned long req_size)
   499  {
   500  /* no read-ahead */
   501  if (!ra->ra_pages)
   502  return;
   503  
 > 504  if (blk_cgroup_congested())
   505  return;
   506  
   507  /* be dumb */
   508  if (filp && (filp->f_mode & FMODE_RANDOM)) {
   509  force_page_cache_readahead(mapping, filp, offset, 
req_size);
   510  return;
   511  }
   512  
   513  /* do read-ahead */
   514  ondemand_readahead(mapping, ra, filp, false, offset, req_size);
   515  }
   516  EXPORT_SYMBOL_GPL(page_cache_sync_readahead);
   517  

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


.config.gz
Description: application/gzip


Re: [PATCH] Revert "btrfs: fix a possible umount deadlock"

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

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v4.18-rc2]
[also build test ERROR on next-20180628]
[cannot apply to btrfs/next]
[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/Revert-btrfs-fix-a-possible-umount-deadlock/20180629-044154
config: x86_64-randconfig-x015-201825 (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/volumes.c: In function 'btrfs_close_one_device':
>> fs/btrfs/volumes.c:1041:25: error: 'free_device' undeclared (first use in 
>> this function); did you mean 'new_device'?
 call_rcu(>rcu, free_device);
^~~
new_device
   fs/btrfs/volumes.c:1041:25: note: each undeclared identifier is reported 
only once for each function it appears in

vim +1041 fs/btrfs/volumes.c

  1006  
  1007  static void btrfs_close_one_device(struct btrfs_device *device)
  1008  {
  1009  struct btrfs_fs_devices *fs_devices = device->fs_devices;
  1010  struct btrfs_device *new_device;
  1011  struct rcu_string *name;
  1012  
  1013  if (device->bdev)
  1014  fs_devices->open_devices--;
  1015  
  1016  if (test_bit(BTRFS_DEV_STATE_WRITEABLE, >dev_state) &&
  1017  device->devid != BTRFS_DEV_REPLACE_DEVID) {
  1018  list_del_init(>dev_alloc_list);
  1019  fs_devices->rw_devices--;
  1020  }
  1021  
  1022  if (test_bit(BTRFS_DEV_STATE_MISSING, >dev_state))
  1023  fs_devices->missing_devices--;
  1024  
  1025  btrfs_close_bdev(device);
  1026  
  1027  new_device = btrfs_alloc_device(NULL, >devid,
  1028  device->uuid);
  1029  BUG_ON(IS_ERR(new_device)); /* -ENOMEM */
  1030  
  1031  /* Safe because we are under uuid_mutex */
  1032  if (device->name) {
  1033  name = rcu_string_strdup(device->name->str, GFP_NOFS);
  1034  BUG_ON(!name); /* -ENOMEM */
  1035  rcu_assign_pointer(new_device->name, name);
  1036  }
  1037  
  1038  list_replace_rcu(>dev_list, _device->dev_list);
  1039  new_device->fs_devices = device->fs_devices;
  1040  
> 1041  call_rcu(>rcu, free_device);
  1042  }
  1043  

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


.config.gz
Description: application/gzip


Re: [PATCH] Revert "btrfs: fix a possible umount deadlock"

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

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v4.18-rc2]
[also build test ERROR on next-20180628]
[cannot apply to btrfs/next]
[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/Revert-btrfs-fix-a-possible-umount-deadlock/20180629-044154
config: i386-randconfig-a0-201825 (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/volumes.c: In function 'btrfs_close_one_device':
>> fs//btrfs/volumes.c:1041:25: error: 'free_device' undeclared (first use in 
>> this function)
 call_rcu(>rcu, free_device);
^
   fs//btrfs/volumes.c:1041:25: note: each undeclared identifier is reported 
only once for each function it appears in

vim +/free_device +1041 fs//btrfs/volumes.c

  1006  
  1007  static void btrfs_close_one_device(struct btrfs_device *device)
  1008  {
  1009  struct btrfs_fs_devices *fs_devices = device->fs_devices;
  1010  struct btrfs_device *new_device;
  1011  struct rcu_string *name;
  1012  
  1013  if (device->bdev)
  1014  fs_devices->open_devices--;
  1015  
  1016  if (test_bit(BTRFS_DEV_STATE_WRITEABLE, >dev_state) &&
  1017  device->devid != BTRFS_DEV_REPLACE_DEVID) {
  1018  list_del_init(>dev_alloc_list);
  1019  fs_devices->rw_devices--;
  1020  }
  1021  
  1022  if (test_bit(BTRFS_DEV_STATE_MISSING, >dev_state))
  1023  fs_devices->missing_devices--;
  1024  
  1025  btrfs_close_bdev(device);
  1026  
  1027  new_device = btrfs_alloc_device(NULL, >devid,
  1028  device->uuid);
  1029  BUG_ON(IS_ERR(new_device)); /* -ENOMEM */
  1030  
  1031  /* Safe because we are under uuid_mutex */
  1032  if (device->name) {
  1033  name = rcu_string_strdup(device->name->str, GFP_NOFS);
  1034  BUG_ON(!name); /* -ENOMEM */
  1035  rcu_assign_pointer(new_device->name, name);
  1036  }
  1037  
  1038  list_replace_rcu(>dev_list, _device->dev_list);
  1039  new_device->fs_devices = device->fs_devices;
  1040  
> 1041  call_rcu(>rcu, free_device);
  1042  }
  1043  

---
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: Add graceful handling of V0 extents

2018-06-26 Thread kbuild test robot
Hi Nikolay,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20180626]
[cannot apply to btrfs/next v4.18-rc2 v4.18-rc1 v4.17 v4.18-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-Add-graceful-handling-of-V0-extents/20180626-231445
config: i386-randconfig-s1-201825 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   fs/btrfs/extent-tree.c: In function 'btrfs_lookup_extent_info':
>> fs/btrfs/extent-tree.c:871:4: error: implicit declaration of function 
>> 'btrfs_print_v0_err' [-Werror=implicit-function-declaration]
   btrfs_print_v0_err(fs_info);
   ^~
   fs/btrfs/extent-tree.c: In function 'remove_extent_data_ref':
>> fs/btrfs/extent-tree.c:1308:22: error: 'fs_info' undeclared (first use in 
>> this function)
  btrfs_print_v0_err(fs_info);
 ^~~
   fs/btrfs/extent-tree.c:1308:22: note: each undeclared identifier is reported 
only once for each function it appears in
   cc1: some warnings being treated as errors
--
   fs/btrfs/print-tree.c: In function 'print_extent_item':
>> fs/btrfs/print-tree.c:56:3: error: implicit declaration of function 
>> 'btrfs_print_v0_err' [-Werror=implicit-function-declaration]
  btrfs_print_v0_err(eb->fs_info);
  ^~
   cc1: some warnings being treated as errors
--
   fs/btrfs/relocation.c: In function 'find_inline_backref':
>> fs/btrfs/relocation.c:602:3: error: implicit declaration of function 
>> 'btrfs_print_v0_err' [-Werror=implicit-function-declaration]
  btrfs_print_v0_err(leaf->fs_info);
  ^~
   cc1: some warnings being treated as errors

vim +/btrfs_print_v0_err +871 fs/btrfs/extent-tree.c

   794  
   795  /*
   796   * helper function to lookup reference count and flags of a tree block.
   797   *
   798   * the head node for delayed ref is used to store the sum of all the
   799   * reference count modifications queued up in the rbtree. the head
   800   * node may also store the extent flags to set. This way you can check
   801   * to see what the reference count and extent flags would be if all of
   802   * the delayed refs are not processed.
   803   */
   804  int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans,
   805   struct btrfs_fs_info *fs_info, u64 bytenr,
   806   u64 offset, int metadata, u64 *refs, u64 
*flags)
   807  {
   808  struct btrfs_delayed_ref_head *head;
   809  struct btrfs_delayed_ref_root *delayed_refs;
   810  struct btrfs_path *path;
   811  struct btrfs_extent_item *ei;
   812  struct extent_buffer *leaf;
   813  struct btrfs_key key;
   814  u32 item_size;
   815  u64 num_refs;
   816  u64 extent_flags;
   817  int ret;
   818  
   819  /*
   820   * If we don't have skinny metadata, don't bother doing anything
   821   * different
   822   */
   823  if (metadata && !btrfs_fs_incompat(fs_info, SKINNY_METADATA)) {
   824  offset = fs_info->nodesize;
   825  metadata = 0;
   826  }
   827  
   828  path = btrfs_alloc_path();
   829  if (!path)
   830  return -ENOMEM;
   831  
   832  if (!trans) {
   833  path->skip_locking = 1;
   834  path->search_commit_root = 1;
   835  }
   836  
   837  search_again:
   838  key.objectid = bytenr;
   839  key.offset = offset;
   840  if (metadata)
   841  key.type = BTRFS_METADATA_ITEM_KEY;
   842  else
   843  key.type = BTRFS_EXTENT_ITEM_KEY;
   844  
   845  ret = btrfs_search_slot(trans, fs_info->extent_root, , 
path, 0, 0);
   846  if (ret < 0)
   847  goto out_free;
   848  
   849  if (ret > 0 && metadata && key.type == BTRFS_METADATA_ITEM_KEY) 
{
   850  if (path->slots[0]) {
   851  path->slots[0]--;
   852  btrfs_item_key_to_cpu(path->nodes[0], ,
   853path->slots[0]);
   854  if (key.objectid == bytenr &&
   855  key.type == BTRFS_EXTENT_ITEM_KEY &&
   856  key.offset == fs_info->nodesize)
   857  ret = 0;
   858  }
   859  }
   860  
   861  if (ret == 0) {
   862  leaf = path->nodes[0];
   863  item_size = btrfs_item_size_nr(leaf, path->slots[0]);
   864  if (item_size 

Re: [PATCH v2] btrfs: Add graceful handling of V0 extents

2018-06-26 Thread kbuild test robot
Hi Nikolay,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20180626]
[cannot apply to btrfs/next v4.18-rc2 v4.18-rc1 v4.17 v4.18-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-Add-graceful-handling-of-V0-extents/20180626-231445
config: x86_64-randconfig-x015-201825 (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/extent-tree.c: In function 'btrfs_lookup_extent_info':
>> fs//btrfs/extent-tree.c:871:4: error: implicit declaration of function 
>> 'btrfs_print_v0_err'; did you mean 'btrfs_print_tree'? 
>> [-Werror=implicit-function-declaration]
   btrfs_print_v0_err(fs_info);
   ^~
   btrfs_print_tree
   fs//btrfs/extent-tree.c: In function 'remove_extent_data_ref':
>> fs//btrfs/extent-tree.c:1308:22: error: 'fs_info' undeclared (first use in 
>> this function); did you mean 'qc_info'?
  btrfs_print_v0_err(fs_info);
 ^~~
 qc_info
   fs//btrfs/extent-tree.c:1308:22: note: each undeclared identifier is 
reported only once for each function it appears in
   cc1: some warnings being treated as errors
--
   fs//btrfs/print-tree.c: In function 'print_extent_item':
>> fs//btrfs/print-tree.c:56:3: error: implicit declaration of function 
>> 'btrfs_print_v0_err'; did you mean 'btrfs_print_tree'? 
>> [-Werror=implicit-function-declaration]
  btrfs_print_v0_err(eb->fs_info);
  ^~
  btrfs_print_tree
   cc1: some warnings being treated as errors
--
   fs//btrfs/relocation.c: In function 'find_inline_backref':
>> fs//btrfs/relocation.c:602:3: error: implicit declaration of function 
>> 'btrfs_print_v0_err'; did you mean 'btrfs_print_tree'? 
>> [-Werror=implicit-function-declaration]
  btrfs_print_v0_err(leaf->fs_info);
  ^~
  btrfs_print_tree
   cc1: some warnings being treated as errors

vim +871 fs//btrfs/extent-tree.c

   794  
   795  /*
   796   * helper function to lookup reference count and flags of a tree block.
   797   *
   798   * the head node for delayed ref is used to store the sum of all the
   799   * reference count modifications queued up in the rbtree. the head
   800   * node may also store the extent flags to set. This way you can check
   801   * to see what the reference count and extent flags would be if all of
   802   * the delayed refs are not processed.
   803   */
   804  int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans,
   805   struct btrfs_fs_info *fs_info, u64 bytenr,
   806   u64 offset, int metadata, u64 *refs, u64 
*flags)
   807  {
   808  struct btrfs_delayed_ref_head *head;
   809  struct btrfs_delayed_ref_root *delayed_refs;
   810  struct btrfs_path *path;
   811  struct btrfs_extent_item *ei;
   812  struct extent_buffer *leaf;
   813  struct btrfs_key key;
   814  u32 item_size;
   815  u64 num_refs;
   816  u64 extent_flags;
   817  int ret;
   818  
   819  /*
   820   * If we don't have skinny metadata, don't bother doing anything
   821   * different
   822   */
   823  if (metadata && !btrfs_fs_incompat(fs_info, SKINNY_METADATA)) {
   824  offset = fs_info->nodesize;
   825  metadata = 0;
   826  }
   827  
   828  path = btrfs_alloc_path();
   829  if (!path)
   830  return -ENOMEM;
   831  
   832  if (!trans) {
   833  path->skip_locking = 1;
   834  path->search_commit_root = 1;
   835  }
   836  
   837  search_again:
   838  key.objectid = bytenr;
   839  key.offset = offset;
   840  if (metadata)
   841  key.type = BTRFS_METADATA_ITEM_KEY;
   842  else
   843  key.type = BTRFS_EXTENT_ITEM_KEY;
   844  
   845  ret = btrfs_search_slot(trans, fs_info->extent_root, , 
path, 0, 0);
   846  if (ret < 0)
   847  goto out_free;
   848  
   849  if (ret > 0 && metadata && key.type == BTRFS_METADATA_ITEM_KEY) 
{
   850  if (path->slots[0]) {
   851  path->slots[0]--;
   852  btrfs_item_key_to_cpu(path->nodes[0], ,
   853path->slots[0]);
   854  if (key.objectid == bytenr &&
   855  key.type == BTRFS_EXTENT_ITEM_KEY &&
   856  key.offset == fs_info->nodesize)
   857  ret = 0;
   858   

[josef-btrfs:blk-iolatency-v5 14/14] mm/readahead.c:503:2: note: in expansion of macro 'if'

2018-06-21 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency-v5
head:   9ca920cdc56987426bfc77c18dbfff9d99f242e3
commit: 9ca920cdc56987426bfc77c18dbfff9d99f242e3 [14/14] skip readahead if the 
cgroup is congested
config: x86_64-randconfig-x013-201824 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout 9ca920cdc56987426bfc77c18dbfff9d99f242e3
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:10:0,
from mm/readahead.c:10:
   mm/readahead.c: In function 'page_cache_sync_readahead':
   mm/readahead.c:503:6: error: implicit declaration of function 
'blk_cgroup_congested'; did you mean 'bdi_rw_congested'? 
[-Werror=implicit-function-declaration]
 if (blk_cgroup_congested())
 ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
 if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
 ^~~~
>> mm/readahead.c:503:2: note: in expansion of macro 'if'
 if (blk_cgroup_congested())
 ^~
   cc1: some warnings being treated as errors

vim +/if +503 mm/readahead.c

   480  
   481  /**
   482   * page_cache_sync_readahead - generic file readahead
   483   * @mapping: address_space which holds the pagecache and I/O vectors
   484   * @ra: file_ra_state which holds the readahead state
   485   * @filp: passed on to ->readpage() and ->readpages()
   486   * @offset: start offset into @mapping, in pagecache page-sized units
   487   * @req_size: hint: total size of the read which the caller is 
performing in
   488   *pagecache pages
   489   *
   490   * page_cache_sync_readahead() should be called when a cache miss 
happened:
   491   * it will submit the read.  The readahead logic may decide to 
piggyback more
   492   * pages onto the read request if access patterns suggest it will 
improve
   493   * performance.
   494   */
   495  void page_cache_sync_readahead(struct address_space *mapping,
   496 struct file_ra_state *ra, struct file 
*filp,
   497 pgoff_t offset, unsigned long req_size)
   498  {
   499  /* no read-ahead */
   500  if (!ra->ra_pages)
   501  return;
   502  
 > 503  if (blk_cgroup_congested())
   504  return;
   505  
   506  /* be dumb */
   507  if (filp && (filp->f_mode & FMODE_RANDOM)) {
   508  force_page_cache_readahead(mapping, filp, offset, 
req_size);
   509  return;
   510  }
   511  
   512  /* do read-ahead */
   513  ondemand_readahead(mapping, ra, filp, false, offset, req_size);
   514  }
   515  EXPORT_SYMBOL_GPL(page_cache_sync_readahead);
   516  

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


.config.gz
Description: application/gzip


[josef-btrfs:blk-iolatency-v5 14/14] mm/readahead.c:503:6: error: implicit declaration of function 'blk_cgroup_congested'; did you mean 'bdi_rw_congested'?

2018-06-21 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency-v5
head:   9ca920cdc56987426bfc77c18dbfff9d99f242e3
commit: 9ca920cdc56987426bfc77c18dbfff9d99f242e3 [14/14] skip readahead if the 
cgroup is congested
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout 9ca920cdc56987426bfc77c18dbfff9d99f242e3
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   mm/readahead.c: In function 'page_cache_sync_readahead':
>> mm/readahead.c:503:6: error: implicit declaration of function 
>> 'blk_cgroup_congested'; did you mean 'bdi_rw_congested'? 
>> [-Werror=implicit-function-declaration]
 if (blk_cgroup_congested())
 ^~~~
 bdi_rw_congested
   cc1: some warnings being treated as errors

vim +503 mm/readahead.c

   480  
   481  /**
   482   * page_cache_sync_readahead - generic file readahead
   483   * @mapping: address_space which holds the pagecache and I/O vectors
   484   * @ra: file_ra_state which holds the readahead state
   485   * @filp: passed on to ->readpage() and ->readpages()
   486   * @offset: start offset into @mapping, in pagecache page-sized units
   487   * @req_size: hint: total size of the read which the caller is 
performing in
   488   *pagecache pages
   489   *
   490   * page_cache_sync_readahead() should be called when a cache miss 
happened:
   491   * it will submit the read.  The readahead logic may decide to 
piggyback more
   492   * pages onto the read request if access patterns suggest it will 
improve
   493   * performance.
   494   */
   495  void page_cache_sync_readahead(struct address_space *mapping,
   496 struct file_ra_state *ra, struct file 
*filp,
   497 pgoff_t offset, unsigned long req_size)
   498  {
   499  /* no read-ahead */
   500  if (!ra->ra_pages)
   501  return;
   502  
 > 503  if (blk_cgroup_congested())
   504  return;
   505  
   506  /* be dumb */
   507  if (filp && (filp->f_mode & FMODE_RANDOM)) {
   508  force_page_cache_readahead(mapping, filp, offset, 
req_size);
   509  return;
   510  }
   511  
   512  /* do read-ahead */
   513  ondemand_readahead(mapping, ra, filp, false, offset, req_size);
   514  }
   515  EXPORT_SYMBOL_GPL(page_cache_sync_readahead);
   516  

---
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 3/3] btrfs: Fix a C compliance issue

2018-06-20 Thread kbuild test robot
Hi Bart,

I love your patch! Yet something to improve:

[auto build test ERROR on v4.18-rc1]
[also build test ERROR on next-20180620]
[cannot apply to btrfs/next]
[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/Bart-Van-Assche/Three-patches-that-address-static-analyzer-reports/20180621-041247
config: m68k-sun3_defconfig (attached as .config)
compiler: m68k-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=m68k 

All errors (new ones prefixed by >>):

   fs//btrfs/super.c: In function 'btrfs_print_mod_info':
>> fs//btrfs/super.c:2386:4: error: expected expression before ';' token
   ;
   ^

vim +2386 fs//btrfs/super.c

  2370  
  2371  static void __init btrfs_print_mod_info(void)
  2372  {
  2373  static const char options[] =
  2374  #ifdef CONFIG_BTRFS_DEBUG
  2375  ", debug=on"
  2376  #endif
  2377  #ifdef CONFIG_BTRFS_ASSERT
  2378  ", assert=on"
  2379  #endif
  2380  #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY
  2381  ", integrity-checker=on"
  2382  #endif
  2383  #ifdef CONFIG_BTRFS_FS_REF_VERIFY
  2384  ", ref-verify=on"
  2385  #endif
> 2386  ;
  2387  pr_info("Btrfs loaded, crc32c=%s%s\n", crc32c_impl(), options);
  2388  }
  2389  

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


.config.gz
Description: application/gzip


[josef-btrfs:blk-iolatency-v4 7/13] mm/memcontrol.c:5470: undefined reference to `mem_cgroup_throttle_swaprate'

2018-06-11 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency-v4
head:   2d27efa1f4e84d52483c459da4c7df5ab36c7b21
commit: 9a7b50c36a45712a7ef0260cd60ed8cf27d61486 [7/13] memcontrol: schedule 
throttling if we are congested
config: x86_64-randconfig-s2-06120537 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
git checkout 9a7b50c36a45712a7ef0260cd60ed8cf27d61486
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   mm/memcontrol.o: In function `mem_cgroup_try_charge_delay':
>> mm/memcontrol.c:5470: undefined reference to `mem_cgroup_throttle_swaprate'

vim +5470 mm/memcontrol.c

  5460  
  5461  int mem_cgroup_try_charge_delay(struct page *page, struct mm_struct *mm,
  5462gfp_t gfp_mask, struct mem_cgroup **memcgp,
  5463bool compound)
  5464  {
  5465  struct mem_cgroup *memcg;
  5466  int ret;
  5467  
  5468  ret = mem_cgroup_try_charge(page, mm, gfp_mask, memcgp, 
compound);
  5469  memcg = *memcgp;
> 5470  mem_cgroup_throttle_swaprate(memcg, page_to_nid(page), 
> gfp_mask);
  5471  return ret;
  5472  }
  5473  

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


.config.gz
Description: application/gzip


[josef-btrfs:blk-iolatency 7/13] mm/memcontrol.c:5470: undefined reference to `mem_cgroup_throttle_swaprate'

2018-05-31 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency
head:   2a5cee452665b4531b9466ad61ea0e55d298ea8e
commit: c7d786e9b482df1830ee7610678657d3ffd0c123 [7/13] memcontrol: schedule 
throttling if we are congested
config: i386-randconfig-a0-201821 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
git checkout c7d786e9b482df1830ee7610678657d3ffd0c123
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   mm/memcontrol.o: In function `mem_cgroup_try_charge_delay':
>> mm/memcontrol.c:5470: undefined reference to `mem_cgroup_throttle_swaprate'

vim +5470 mm/memcontrol.c

  5460  
  5461  int mem_cgroup_try_charge_delay(struct page *page, struct mm_struct *mm,
  5462gfp_t gfp_mask, struct mem_cgroup **memcgp,
  5463bool compound)
  5464  {
  5465  struct mem_cgroup *memcg;
  5466  int ret;
  5467  
  5468  ret = mem_cgroup_try_charge(page, mm, gfp_mask, memcgp, 
compound);
  5469  memcg = *memcgp;
> 5470  mem_cgroup_throttle_swaprate(memcg, page_to_nid(page), 
> gfp_mask);
  5471  return ret;
  5472  }
  5473  

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


.config.gz
Description: application/gzip


[josef-btrfs:blk-iolatency 7/13] include/linux/swap.h:641:20: error: two or more data types in declaration specifiers

2018-05-31 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency
head:   2a5cee452665b4531b9466ad61ea0e55d298ea8e
commit: c7d786e9b482df1830ee7610678657d3ffd0c123 [7/13] memcontrol: schedule 
throttling if we are congested
config: i386-randconfig-x008-201821 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout c7d786e9b482df1830ee7610678657d3ffd0c123
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from include/linux/suspend.h:5:0,
from arch/x86/kernel/asm-offsets.c:13:
>> include/linux/swap.h:641:20: error: two or more data types in declaration 
>> specifiers
static inline void void mem_cgroup_throttle_swaprate(struct mem_cgroup 
*memcg,
   ^~~~
   make[2]: *** [arch/x86/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [sub-make] Error 2

vim +641 include/linux/swap.h

   640  
 > 641  static inline void void mem_cgroup_throttle_swaprate(struct mem_cgroup 
 > *memcg,
   642   int node, gfp_t 
gfP_maks)
   643  {
   644  }
   645  

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


.config.gz
Description: application/gzip


[josef-btrfs:blk-iolatency 12/13] blk-iolatency.c:undefined reference to `__udivdi3'

2018-05-30 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency
head:   6fd950dfd5f71e7eba6d0763c6861669cec7963f
commit: f624090ed7dadc44d46a8a0b4381ab286c9f45fb [12/13] block: introduce 
blk-iolatency io controller
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout f624090ed7dadc44d46a8a0b4381ab286c9f45fb
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   block/blk-iolatency.o: In function `iolatency_pd_stat':
>> blk-iolatency.c:(.text+0x1b4): undefined reference to `__udivdi3'
>> blk-iolatency.c:(.text+0x1dc): undefined reference to `__divdi3'
   block/blk-iolatency.o: In function `iolatency_prfill_limit':
   blk-iolatency.c:(.text+0x3d0): undefined reference to `__udivdi3'

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


.config.gz
Description: application/gzip


[josef-btrfs:blk-iolatency 7/13] mm/memcontrol.c:5479:3: error: implicit declaration of function 'blkcg_schedule_throttle'; did you mean 'poll_schedule_timeout'?

2018-05-26 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency
head:   b62bb0da2afe1437b9d2d687ea1f509466fd3843
commit: 2caae39bf0a83094c506f98be6e339355544d103 [7/13] memcontrol: schedule 
throttling if we are congested
config: x86_64-randconfig-s4-05270049 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout 2caae39bf0a83094c506f98be6e339355544d103
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   mm/memcontrol.c: In function 'mem_cgroup_try_charge_delay':
>> mm/memcontrol.c:5479:3: error: implicit declaration of function 
>> 'blkcg_schedule_throttle'; did you mean 'poll_schedule_timeout'? 
>> [-Werror=implicit-function-declaration]
  blkcg_schedule_throttle(bdev_get_queue(bdev), true);
  ^~~
  poll_schedule_timeout
   cc1: some warnings being treated as errors

vim +5479 mm/memcontrol.c

  5460  
  5461  int mem_cgroup_try_charge_delay(struct page *page, struct mm_struct *mm,
  5462gfp_t gfp_mask, struct mem_cgroup **memcgp,
  5463bool compound)
  5464  {
  5465  struct mem_cgroup *memcg;
  5466  struct block_device *bdev;
  5467  int ret;
  5468  
  5469  ret = mem_cgroup_try_charge(page, mm, gfp_mask, memcgp, 
compound);
  5470  memcg = *memcgp;
  5471  
  5472  if (!(gfp_mask & __GFP_IO) || !memcg)
  5473  return ret;
  5474  #ifdef CONFIG_BLOCK
  5475  if (atomic_read(>css.cgroup->congestion_count) &&
  5476  has_usable_swap()) {
  5477  map_swap_page(page, );
  5478  
> 5479  blkcg_schedule_throttle(bdev_get_queue(bdev), true);
  5480  }
  5481  #endif
  5482  return ret;
  5483  }
  5484  

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


.config.gz
Description: application/gzip


[josef-btrfs:blk-iolatency 7/13] mm/memcontrol.c:5476:6: error: implicit declaration of function 'has_usable_swap'

2018-05-26 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency
head:   b62bb0da2afe1437b9d2d687ea1f509466fd3843
commit: 2caae39bf0a83094c506f98be6e339355544d103 [7/13] memcontrol: schedule 
throttling if we are congested
config: x86_64-randconfig-s3-05270017 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout 2caae39bf0a83094c506f98be6e339355544d103
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   mm/memcontrol.c: In function 'mem_cgroup_try_charge_delay':
>> mm/memcontrol.c:5476:6: error: implicit declaration of function 
>> 'has_usable_swap' [-Werror=implicit-function-declaration]
 has_usable_swap()) {
 ^~~
>> mm/memcontrol.c:5477:3: error: implicit declaration of function 
>> 'map_swap_page'; did you mean 'do_swap_page'? 
>> [-Werror=implicit-function-declaration]
  map_swap_page(page, );
  ^
  do_swap_page
   cc1: some warnings being treated as errors

vim +/has_usable_swap +5476 mm/memcontrol.c

  5460  
  5461  int mem_cgroup_try_charge_delay(struct page *page, struct mm_struct *mm,
  5462gfp_t gfp_mask, struct mem_cgroup **memcgp,
  5463bool compound)
  5464  {
  5465  struct mem_cgroup *memcg;
  5466  struct block_device *bdev;
  5467  int ret;
  5468  
  5469  ret = mem_cgroup_try_charge(page, mm, gfp_mask, memcgp, 
compound);
  5470  memcg = *memcgp;
  5471  
  5472  if (!(gfp_mask & __GFP_IO) || !memcg)
  5473  return ret;
  5474  #ifdef CONFIG_BLOCK
  5475  if (atomic_read(>css.cgroup->congestion_count) &&
> 5476  has_usable_swap()) {
> 5477  map_swap_page(page, );
  5478  
  5479  blkcg_schedule_throttle(bdev_get_queue(bdev), true);
  5480  }
  5481  #endif
  5482  return ret;
  5483  }
  5484  

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


.config.gz
Description: application/gzip


[josef-btrfs:blk-iolatency 6/13] common.c:undefined reference to `blkcg_maybe_throttle_current'

2018-05-25 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency
head:   6bbc4451bcc7359b14e190615ff671fd63e34d62
commit: 605adede5ce998f9e834c1783e74dc0660b346db [6/13] blkcg: add generic 
throttling mechanism
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout 605adede5ce998f9e834c1783e74dc0660b346db
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   arch/x86/entry/common.o: In function `prepare_exit_to_usermode':
>> common.c:(.text+0x139): undefined reference to `blkcg_maybe_throttle_current'

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


.config.gz
Description: application/gzip


[josef-btrfs:blk-iolatency 7/13] include/linux/blkdev.h:2092:9: note: in expansion of macro 'NULL'

2018-05-25 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency
head:   6bbc4451bcc7359b14e190615ff671fd63e34d62
commit: e13e26d1ad161949ae1fdd02623c2d81a666328e [7/13] memcontrol: schedule 
throttling if we are congested
config: x86_64-randconfig-x018-201820 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout e13e26d1ad161949ae1fdd02623c2d81a666328e
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/posix_types.h:5:0,
from include/uapi/linux/types.h:14,
from include/linux/compiler.h:169,
from include/asm-generic/bug.h:5,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from include/linux/pagemap.h:8,
from fs/configfs/inode.c:32:
   include/linux/blkdev.h: In function 'bdev_get_queue':
   include/linux/stddef.h:8:14: warning: return makes integer from pointer 
without a cast [-Wint-conversion]
#define NULL ((void *)0)
 ^
>> include/linux/blkdev.h:2092:9: note: in expansion of macro 'NULL'
 return NULL;
^~~~
   Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
   Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
   Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_read
   Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_write
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls64
   Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u64
   Cyclomatic Complexity 1 include/linux/list.h:INIT_LIST_HEAD
   Cyclomatic Complexity 1 include/linux/list.h:__list_del
   Cyclomatic Complexity 2 include/linux/list.h:__list_del_entry
   Cyclomatic Complexity 1 include/linux/list.h:list_del_init
   Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_read
   Cyclomatic Complexity 1 
arch/x86/include/asm/atomic.h:arch_atomic_dec_and_test
   Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_read
   Cyclomatic Complexity 1 
include/asm-generic/atomic-instrumented.h:atomic_dec_and_test
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_lock
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock
   Cyclomatic Complexity 1 include/linux/list_bl.h:hlist_bl_unhashed
   Cyclomatic Complexity 3 include/linux/dcache.h:dget_dlock
   Cyclomatic Complexity 3 include/linux/dcache.h:dget
   Cyclomatic Complexity 1 include/linux/dcache.h:d_unhashed
   Cyclomatic Complexity 1 include/linux/dcache.h:d_really_is_negative
   Cyclomatic Complexity 1 include/linux/dcache.h:d_really_is_positive
   Cyclomatic Complexity 3 include/linux/dcache.h:simple_positive
   Cyclomatic Complexity 1 include/linux/dcache.h:d_inode
   Cyclomatic Complexity 1 include/linux/fs.h:inode_lock
   Cyclomatic Complexity 1 include/linux/fs.h:inode_unlock
   Cyclomatic Complexity 56 include/linux/slab.h:kmalloc_index
   Cyclomatic Complexity 68 include/linux/slab.h:kmalloc_large
   Cyclomatic Complexity 9 include/linux/slab.h:kmalloc
   Cyclomatic Complexity 1 include/linux/slab.h:kzalloc
   Cyclomatic Complexity 3 
fs/configfs/configfs_internal.h:release_configfs_dirent
   Cyclomatic Complexity 3 fs/configfs/configfs_internal.h:configfs_put
   Cyclomatic Complexity 1 fs/configfs/inode.c:set_default_inode_attr
   Cyclomatic Complexity 1 fs/configfs/inode.c:set_inode_attr
   Cyclomatic Complexity 24 fs/configfs/inode.c:configfs_setattr
   Cyclomatic Complexity 5 fs/configfs/inode.c:configfs_set_inode_lock_class
   Cyclomatic Complexity 5 fs/configfs/inode.c:configfs_new_inode
   Cyclomatic Complexity 7 fs/configfs/inode.c:configfs_create
   Cyclomatic Complexity 9 fs/configfs/inode.c:configfs_get_name
   Cyclomatic Complexity 4 fs/configfs/inode.c:configfs_drop_dentry
   Cyclomatic Complexity 10 fs/configfs/inode.c:configfs_hash_and_remove
--
   In file included from include/uapi/linux/posix_types.h:5:0,
from include/uapi/linux/types.h:14,
from include/linux/types.h:6,
from include/linux/list.h:5,
from include/linux/module.h:9,
from drivers/mmc/core/core.c:13:
   include/linux/blkdev.h: In function 'bdev_get_queue':
   include/linux/stddef.h:8:14: warning: return makes integer from pointer 
without a cast [-Wint-conversion]
#define NULL ((void *)0)
 ^
>> include/linux/blkdev.h:2092:9: note: in expansion of macro 'NULL'
 return NULL;
^~~~
   Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
   Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
   

[josef-btrfs:blk-iolatency 5/13] mm/page_io.c:342:2: note: in expansion of macro 'if'

2018-05-24 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency
head:   e4e4c15dbfeb48d4261b3746cd00e77b441be92b
commit: 2598d1c2fa24725d77032c488db69ae4895666bd [5/13] swap,blkcg: issue swap 
io with the appropriate context
config: x86_64-randconfig-s2-05250808 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
git checkout 2598d1c2fa24725d77032c488db69ae4895666bd
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:5:0,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from mm/page_io.c:14:
   mm/page_io.c: In function '__swap_writepage':
   mm/page_io.c:342:10: error: 'struct page' has no member named 'mem_cgroup'
 if (page->mem_cgroup) {
 ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
 if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
 ^~~~
>> mm/page_io.c:342:2: note: in expansion of macro 'if'
 if (page->mem_cgroup) {
 ^~
   mm/page_io.c:342:10: error: 'struct page' has no member named 'mem_cgroup'
 if (page->mem_cgroup) {
 ^
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
 if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
 ^~~~
>> mm/page_io.c:342:2: note: in expansion of macro 'if'
 if (page->mem_cgroup) {
 ^~
   mm/page_io.c:342:10: error: 'struct page' has no member named 'mem_cgroup'
 if (page->mem_cgroup) {
 ^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
  __r = !!(cond); \
   ^~~~
>> mm/page_io.c:342:2: note: in expansion of macro 'if'
 if (page->mem_cgroup) {
 ^~
   mm/page_io.c:345:36: error: 'struct page' has no member named 'mem_cgroup'
  blkcg_css = cgroup_get_e_css(page->mem_cgroup->css.cgroup,
   ^~
   mm/page_io.c:346:12: error: 'io_cgrp_subsys' undeclared (first use in this 
function)
  _cgrp_subsys);
   ^~
   mm/page_io.c:346:12: note: each undeclared identifier is reported only once 
for each function it appears in

vim +/if +342 mm/page_io.c

   277  
   278  int __swap_writepage(struct page *page, struct writeback_control *wbc,
   279  bio_end_io_t end_write_func)
   280  {
   281  struct bio *bio;
   282  int ret;
   283  struct swap_info_struct *sis = page_swap_info(page);
   284  
   285  VM_BUG_ON_PAGE(!PageSwapCache(page), page);
   286  if (sis->flags & SWP_FILE) {
   287  struct kiocb kiocb;
   288  struct file *swap_file = sis->swap_file;
   289  struct address_space *mapping = swap_file->f_mapping;
   290  struct bio_vec bv = {
   291  .bv_page = page,
   292  .bv_len  = PAGE_SIZE,
   293  .bv_offset = 0
   294  };
   295  struct iov_iter from;
   296  
   297  iov_iter_bvec(, ITER_BVEC | WRITE, , 1, 
PAGE_SIZE);
   298  init_sync_kiocb(, swap_file);
   299  kiocb.ki_pos = page_file_offset(page);
   300  
   301  set_page_writeback(page);
   302  unlock_page(page);
   303  ret = mapping->a_ops->direct_IO(, );
   304  if (ret == PAGE_SIZE) {
   305  count_vm_event(PSWPOUT);
   306  ret = 0;
   307  } else {
   308  /*
   309   * In the case of swap-over-nfs, this can be a
   310   * temporary failure if the system has limited
   311   * memory for allocating transmit buffers.
   312   * Mark the page dirty and avoid
   313   * rotate_reclaimable_page but rate-limit the
   314   * messages but do not flag PageError like
   315   * the normal direct-to-bio case as it could
   316   * be temporary.
   317   */
   318  set_page_dirty(page);
   319  ClearPageReclaim(page);
   320  pr_err_ratelimited("Write error on dio swapfile 
(%llu)\n",
   321 page_file_offset(page));
   322  }
   323  end_page_writeback(page);
   324  return ret;
   325  }
   326  
   327  ret = 

[josef-btrfs:for-4.18/block 12/13] blk-iolatency.c:undefined reference to `__udivdi3'

2018-05-24 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
for-4.18/block
head:   657e770d4d6e3b03c3d4b96e427b30d6f766e2e2
commit: 377f8e81c17e1e9a47ea5908b08a7a991a9faa6f [12/13] block: introduce 
blk-iolatency io controller
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout 377f8e81c17e1e9a47ea5908b08a7a991a9faa6f
# save the attached .config to linux build tree
make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   block/blk-iolatency.c: In function 'blkiolatency_timer_fn':
>> block/blk-iolatency.c:573:57: warning: integer overflow in expression 
>> [-Woverflow]
  if (now - lat_info->last_scale_event >= (NSEC_PER_SEC * 5))
^
--
   block/blk-iolatency.o: In function `iolatency_pd_stat':
>> blk-iolatency.c:(.text+0x1b1): undefined reference to `__udivdi3'
>> blk-iolatency.c:(.text+0x1d9): undefined reference to `__divdi3'
   block/blk-iolatency.o: In function `iolatency_prfill_limit':
   blk-iolatency.c:(.text+0x3d0): undefined reference to `__udivdi3'

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


.config.gz
Description: application/gzip


[josef-btrfs:for-4.18/block 6/13] include/linux/blk-cgroup.h:832:13: error: 'blkcg_schedule_throttle' defined but not used

2018-05-24 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
for-4.18/block
head:   657e770d4d6e3b03c3d4b96e427b30d6f766e2e2
commit: b5c78af7bc40baa7dd71d1b5fccb78ece59812ba [6/13] blkcg: add generic 
throttling mechanism
config: sparc-defconfig (attached as .config)
compiler: sparc-linux-gcc (GCC) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout b5c78af7bc40baa7dd71d1b5fccb78ece59812ba
# save the attached .config to linux build tree
make.cross ARCH=sparc 

All errors (new ones prefixed by >>):

   In file included from include/linux/blkdev.h:21:0,
from include/linux/blk-cgroup.h:21,
from include/linux/tracehook.h:54,
from arch/sparc/kernel/ptrace_32.c:24:
   include/linux/bio.h:556:55: error: 'struct blkcg_gq' declared inside 
parameter list will not be visible outside of this definition or declaration 
[-Werror]
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
  ^~~~
   In file included from include/linux/tracehook.h:54:0,
from arch/sparc/kernel/ptrace_32.c:24:
>> include/linux/blk-cgroup.h:832:13: error: 'blkcg_schedule_throttle' defined 
>> but not used [-Werror=unused-function]
static void blkcg_schedule_throttle(struct request_queue *q, bool 
use_memdelay) { }
^~~
>> include/linux/blk-cgroup.h:831:13: error: 'blkcg_add_delay' defined but not 
>> used [-Werror=unused-function]
static void blkcg_add_delay(struct blkcg_gq *blkg, u64 now, u64 delta) { }
^~~
   In file included from include/linux/blkdev.h:21:0,
from include/linux/blk-cgroup.h:21,
from include/linux/tracehook.h:54,
from arch/sparc/kernel/ptrace_32.c:24:
>> include/linux/bio.h:556:12: error: 'bio_associate_blkg' defined but not used 
>> [-Werror=unused-function]
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
   ^~
   cc1: all warnings being treated as errors

vim +/blkcg_schedule_throttle +832 include/linux/blk-cgroup.h

   828  
   829  static inline bool blkcg_bio_issue_check(struct request_queue *q,
   830   struct bio *bio) { return 
true; }
 > 831  static void blkcg_add_delay(struct blkcg_gq *blkg, u64 now, u64 delta) 
 > { }
 > 832  static void blkcg_schedule_throttle(struct request_queue *q, bool 
 > use_memdelay) { }
   833  static inline void blkcg_maybe_throttle_current(void) {}
   834  

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


.config.gz
Description: application/gzip


[josef-btrfs:for-4.18/block 1/13] include/linux/bio.h:556:55: warning: 'struct blkcg_gq' declared inside parameter list

2018-05-24 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
for-4.18/block
head:   657e770d4d6e3b03c3d4b96e427b30d6f766e2e2
commit: 03766852a022b0ff5f8c4b73f40ef205a36d095e [1/13] block: add bi_blkg to 
the bio for cgroups
config: i386-randconfig-a0-201820 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
git checkout 03766852a022b0ff5f8c4b73f40ef205a36d095e
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/linux/blkdev.h:21:0,
from include/linux/t10-pi.h:6,
from drivers//target/target_core_device.c:36:
>> include/linux/bio.h:556:55: warning: 'struct blkcg_gq' declared inside 
>> parameter list
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
  ^
>> include/linux/bio.h:556:55: warning: its scope is only this definition or 
>> declaration, which is probably not what you want
   include/linux/bio.h:556:12: warning: 'bio_associate_blkg' defined but not 
used [-Wunused-function]
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
   ^

vim +556 include/linux/bio.h

   544  
   545  #define bio_dev(bio) \
   546  disk_devt((bio)->bi_disk)
   547  
   548  #ifdef CONFIG_BLK_CGROUP
   549  int bio_associate_blkcg(struct bio *bio, struct cgroup_subsys_state 
*blkcg_css);
   550  int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg);
   551  void bio_disassociate_task(struct bio *bio);
   552  void bio_clone_blkcg_association(struct bio *dst, struct bio *src);
   553  #else   /* CONFIG_BLK_CGROUP */
   554  static inline int bio_associate_blkcg(struct bio *bio,
   555  struct cgroup_subsys_state *blkcg_css) { return 
0; }
 > 556  static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
 > return 0; }
   557  static inline void bio_disassociate_task(struct bio *bio) { }
   558  static inline void bio_clone_blkcg_association(struct bio *dst,
   559  struct bio *src) { }
   560  #endif  /* CONFIG_BLK_CGROUP */
   561  

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


.config.gz
Description: application/gzip


[josef-btrfs:for-4.18/block 6/13] include/linux/tracehook.h:195:2: error: implicit declaration of function 'blkcg_maybe_throttle_current'

2018-05-24 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
for-4.18/block
head:   657e770d4d6e3b03c3d4b96e427b30d6f766e2e2
commit: b5c78af7bc40baa7dd71d1b5fccb78ece59812ba [6/13] blkcg: add generic 
throttling mechanism
config: i386-randconfig-x000-201820 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout b5c78af7bc40baa7dd71d1b5fccb78ece59812ba
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from kernel/exit.c:52:0:
   include/linux/tracehook.h: In function 'tracehook_notify_resume':
>> include/linux/tracehook.h:195:2: error: implicit declaration of function 
>> 'blkcg_maybe_throttle_current' [-Werror=implicit-function-declaration]
 blkcg_maybe_throttle_current();
 ^~~~
   Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
   Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
   Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_read
   Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_write
   Cyclomatic Complexity 2 arch/x86/include/asm/bitops.h:set_bit
   Cyclomatic Complexity 2 arch/x86/include/asm/bitops.h:clear_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:constant_test_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:variable_test_bit
   Cyclomatic Complexity 1 include/linux/list.h:INIT_LIST_HEAD
   Cyclomatic Complexity 1 include/linux/list.h:__list_add_valid
   Cyclomatic Complexity 1 include/linux/list.h:__list_del_entry_valid
   Cyclomatic Complexity 2 include/linux/list.h:__list_add
   Cyclomatic Complexity 1 include/linux/list.h:list_add
   Cyclomatic Complexity 1 include/linux/list.h:__list_del
   Cyclomatic Complexity 2 include/linux/list.h:__list_del_entry
   Cyclomatic Complexity 1 include/linux/list.h:list_del_init
   Cyclomatic Complexity 1 include/linux/list.h:list_empty
   Cyclomatic Complexity 1 include/linux/list.h:__list_splice
   Cyclomatic Complexity 2 include/linux/list.h:list_splice_tail_init
   Cyclomatic Complexity 1 include/linux/list.h:hlist_empty
   Cyclomatic Complexity 1 arch/x86/include/asm/current.h:get_current
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_read
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_inc
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_dec
   Cyclomatic Complexity 1 
arch/x86/include/asm/atomic.h:arch_atomic_dec_and_test
   Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_read
   Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_inc
   Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_dec
   Cyclomatic Complexity 1 
include/asm-generic/atomic-instrumented.h:atomic_dec_and_test
   Cyclomatic Complexity 7 
include/asm-generic/atomic-instrumented.h:cmpxchg_size
   Cyclomatic Complexity 1 include/asm-generic/atomic-long.h:atomic_long_read
   Cyclomatic Complexity 2 arch/x86/include/asm/jump_label.h:arch_static_branch
   Cyclomatic Complexity 1 include/linux/jump_label.h:static_key_false
   Cyclomatic Complexity 1 include/linux/thread_info.h:set_ti_thread_flag
   Cyclomatic Complexity 1 include/linux/thread_info.h:clear_ti_thread_flag
   Cyclomatic Complexity 2 include/linux/thread_info.h:test_ti_thread_flag
   Cyclomatic Complexity 1 include/linux/thread_info.h:check_object_size
   Cyclomatic Complexity 2 include/linux/thread_info.h:copy_overflow
   Cyclomatic Complexity 5 include/linux/thread_info.h:check_copy_size
   Cyclomatic Complexity 1 arch/x86/include/asm/preempt.h:preempt_count
   Cyclomatic Complexity 2 arch/x86/include/asm/preempt.h:preempt_count_set
   Cyclomatic Complexity 6 arch/x86/include/asm/preempt.h:__preempt_count_add
   Cyclomatic Complexity 1 
arch/x86/include/asm/preempt.h:__preempt_count_dec_and_test
   Cyclomatic Complexity 1 include/linux/lockdep.h:lockdep_free_task
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_lock
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_lock_irq
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock_irq
   Cyclomatic Complexity 1 include/linux/wait.h:init_waitqueue_func_entry
   Cyclomatic Complexity 1 include/linux/seqlock.h:raw_write_seqcount_begin
   Cyclomatic Complexity 1 include/linux/seqlock.h:raw_write_seqcount_end
   Cyclomatic Complexity 1 include/linux/seqlock.h:write_seqcount_begin_nested
   Cyclomatic Complexity 1 include/linux/seqlock.h:write_seqcount_begin
   Cyclomatic Complexity 1 include/linux/seqlock.h:write_seqcount_end
   Cyclomatic Complexity 1 include/linux/seqlock.h:write_seqlock
   Cyclomatic Complexity 1 include/linux/seqlock.h:write_sequnlock
   Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_lock_acquire
   Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_lock_release
 

[josef-btrfs:blk-iolatency 7/13] mm/memory.c:2497:2: note: in expansion of macro 'if'

2018-05-24 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency
head:   657e770d4d6e3b03c3d4b96e427b30d6f766e2e2
commit: 90f955bbc57765617e3e99f784f3239c3d8f0360 [7/13] memcontrol: schedule 
throttling if we are congested
config: x86_64-randconfig-x018-201820 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout 90f955bbc57765617e3e99f784f3239c3d8f0360
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:10:0,
from include/linux/list.h:9,
from include/linux/smp.h:12,
from include/linux/kernel_stat.h:5,
from mm/memory.c:41:
   mm/memory.c: In function 'wp_page_copy':
   mm/memory.c:2497:6: error: implicit declaration of function 
'mem_cgroup_try_charge_delay'; did you mean 'mem_cgroup_try_charge_swap'? 
[-Werror=implicit-function-declaration]
 if (mem_cgroup_try_charge_delay(new_page, mm, GFP_KERNEL, , false))
 ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
 if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
 ^~~~
>> mm/memory.c:2497:2: note: in expansion of macro 'if'
 if (mem_cgroup_try_charge_delay(new_page, mm, GFP_KERNEL, , false))
 ^~
   Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
   Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
   Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_read
   Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_write
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:__set_bit
   Cyclomatic Complexity 3 arch/x86/include/asm/bitops.h:clear_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:test_and_set_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:test_and_set_bit_lock
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:constant_test_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:variable_test_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls64
   Cyclomatic Complexity 1 include/linux/bitops.h:fls_long
   Cyclomatic Complexity 1 include/linux/log2.h:__rounddown_pow_of_two
   Cyclomatic Complexity 2 include/linux/list.h:__list_add
   Cyclomatic Complexity 1 include/linux/list.h:list_add
   Cyclomatic Complexity 1 include/linux/list.h:list_empty
   Cyclomatic Complexity 2 arch/x86/include/asm/jump_label.h:arch_static_branch
   Cyclomatic Complexity 1 include/linux/jump_label.h:static_key_false
   Cyclomatic Complexity 2 include/linux/string.h:kbasename
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_read
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_inc
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_dec
   Cyclomatic Complexity 1 
arch/x86/include/asm/atomic.h:arch_atomic_dec_and_test
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic64_64.h:arch_atomic64_read
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic64_64.h:arch_atomic64_add
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic64_64.h:arch_atomic64_sub
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic64_64.h:arch_atomic64_inc
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic64_64.h:arch_atomic64_dec
   Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_read
   Cyclomatic Complexity 1 
include/asm-generic/atomic-instrumented.h:atomic64_read
   Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_inc
   Cyclomatic Complexity 1 
include/asm-generic/atomic-instrumented.h:atomic64_inc
   Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_dec
   Cyclomatic Complexity 1 
include/asm-generic/atomic-instrumented.h:atomic64_dec
   Cyclomatic Complexity 1 
include/asm-generic/atomic-instrumented.h:atomic64_add
   Cyclomatic Complexity 1 
include/asm-generic/atomic-instrumented.h:atomic64_sub
   Cyclomatic Complexity 1 
include/asm-generic/atomic-instrumented.h:atomic_dec_and_test
   Cyclomatic Complexity 1 include/asm-generic/atomic-long.h:atomic_long_read
   Cyclomatic Complexity 1 include/asm-generic/atomic-long.h:atomic_long_inc
   Cyclomatic Complexity 1 include/asm-generic/atomic-long.h:atomic_long_dec
   Cyclomatic Complexity 1 include/asm-generic/atomic-long.h:atomic_long_add
   Cyclomatic Complexity 1 include/asm-generic/atomic-long.h:atomic_long_sub
   Cyclomatic Complexity 1 include/linux/smp.h:up_smp_call_function
   Cyclomatic Complexity 1 arch/x86/include/asm/current.h:get_current
   Cyclomatic Complexity 2 arch/x86/include/asm/page_64.h:__phys_addr_nodebug
   Cyclomatic Complexity 1 arch/x86/include/asm/page_64.h:clear_page
   Cyclomatic Complexity 1 arch/x86/include/asm/page.h:copy_user_page
   Cyclomatic Complexity 1 arch/x86/include/asm/pgtable_types.h:native_pgd_val
   Cyclomatic 

[josef-btrfs:for-4.18/block 5/13] mm/page_io.c:346:12: error: 'io_cgrp_subsys' undeclared; did you mean 'pids_cgrp_subsys'?

2018-05-24 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
for-4.18/block
head:   657e770d4d6e3b03c3d4b96e427b30d6f766e2e2
commit: 17842d132a0e6a079842f9843739aa6abec4e9ce [5/13] swap,blkcg: issue swap 
io with the appropriate context
config: i386-randconfig-x016-201820 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout 17842d132a0e6a079842f9843739aa6abec4e9ce
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from mm/page_io.c:19:0:
   include/linux/bio.h:556:55: warning: 'struct blkcg_gq' declared inside 
parameter list will not be visible outside of this definition or declaration
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
  ^~~~
   mm/page_io.c: In function '__swap_writepage':
>> mm/page_io.c:346:12: error: 'io_cgrp_subsys' undeclared (first use in this 
>> function); did you mean 'pids_cgrp_subsys'?
  _cgrp_subsys);
   ^~
   pids_cgrp_subsys
   mm/page_io.c:346:12: note: each undeclared identifier is reported only once 
for each function it appears in
   In file included from mm/page_io.c:19:0:
   At top level:
   include/linux/bio.h:556:12: warning: 'bio_associate_blkg' defined but not 
used [-Wunused-function]
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
   ^~

vim +346 mm/page_io.c

   277  
   278  int __swap_writepage(struct page *page, struct writeback_control *wbc,
   279  bio_end_io_t end_write_func)
   280  {
   281  struct bio *bio;
   282  int ret;
   283  struct swap_info_struct *sis = page_swap_info(page);
   284  
   285  VM_BUG_ON_PAGE(!PageSwapCache(page), page);
   286  if (sis->flags & SWP_FILE) {
   287  struct kiocb kiocb;
   288  struct file *swap_file = sis->swap_file;
   289  struct address_space *mapping = swap_file->f_mapping;
   290  struct bio_vec bv = {
   291  .bv_page = page,
   292  .bv_len  = PAGE_SIZE,
   293  .bv_offset = 0
   294  };
   295  struct iov_iter from;
   296  
   297  iov_iter_bvec(, ITER_BVEC | WRITE, , 1, 
PAGE_SIZE);
   298  init_sync_kiocb(, swap_file);
   299  kiocb.ki_pos = page_file_offset(page);
   300  
   301  set_page_writeback(page);
   302  unlock_page(page);
   303  ret = mapping->a_ops->direct_IO(, );
   304  if (ret == PAGE_SIZE) {
   305  count_vm_event(PSWPOUT);
   306  ret = 0;
   307  } else {
   308  /*
   309   * In the case of swap-over-nfs, this can be a
   310   * temporary failure if the system has limited
   311   * memory for allocating transmit buffers.
   312   * Mark the page dirty and avoid
   313   * rotate_reclaimable_page but rate-limit the
   314   * messages but do not flag PageError like
   315   * the normal direct-to-bio case as it could
   316   * be temporary.
   317   */
   318  set_page_dirty(page);
   319  ClearPageReclaim(page);
   320  pr_err_ratelimited("Write error on dio swapfile 
(%llu)\n",
   321 page_file_offset(page));
   322  }
   323  end_page_writeback(page);
   324  return ret;
   325  }
   326  
   327  ret = bdev_write_page(sis->bdev, swap_page_sector(page), page, 
wbc);
   328  if (!ret) {
   329  count_swpout_vm_event(page);
   330  return 0;
   331  }
   332  
   333  ret = 0;
   334  bio = get_swap_bio(GFP_NOIO, page, end_write_func);
   335  if (bio == NULL) {
   336  set_page_dirty(page);
   337  unlock_page(page);
   338  ret = -ENOMEM;
   339  goto out;
   340  }
   341  bio->bi_opf = REQ_OP_WRITE | REQ_SWAP | wbc_to_write_flags(wbc);
   342  if (page->mem_cgroup) {
   343  struct cgroup_subsys_state *blkcg_css;
   344  
   345  blkcg_css = 
cgroup_get_e_css(page->mem_cgroup->css.cgroup,
 > 346   _cgrp_subsys);
   347  bio_associate_blkcg(bio, blkcg_css);
   348   

[josef-btrfs:for-4.18/block 5/13] mm/page_io.c:346:12: error: 'io_cgrp_subsys' undeclared; did you mean 'cgroup_subsys'?

2018-05-24 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
for-4.18/block
head:   657e770d4d6e3b03c3d4b96e427b30d6f766e2e2
commit: 17842d132a0e6a079842f9843739aa6abec4e9ce [5/13] swap,blkcg: issue swap 
io with the appropriate context
config: x86_64-randconfig-x017-201820 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout 17842d132a0e6a079842f9843739aa6abec4e9ce
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from mm/page_io.c:19:0:
   include/linux/bio.h:556:55: warning: 'struct blkcg_gq' declared inside 
parameter list will not be visible outside of this definition or declaration
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
  ^~~~
   mm/page_io.c: In function '__swap_writepage':
   mm/page_io.c:342:10: error: 'struct page' has no member named 'mem_cgroup'
 if (page->mem_cgroup) {
 ^~
   mm/page_io.c:345:36: error: 'struct page' has no member named 'mem_cgroup'
  blkcg_css = cgroup_get_e_css(page->mem_cgroup->css.cgroup,
   ^~
>> mm/page_io.c:346:12: error: 'io_cgrp_subsys' undeclared (first use in this 
>> function); did you mean 'cgroup_subsys'?
  _cgrp_subsys);
   ^~
   cgroup_subsys
   mm/page_io.c:346:12: note: each undeclared identifier is reported only once 
for each function it appears in
   In file included from mm/page_io.c:19:0:
   At top level:
   include/linux/bio.h:556:12: warning: 'bio_associate_blkg' defined but not 
used [-Wunused-function]
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
   ^~

vim +346 mm/page_io.c

   277  
   278  int __swap_writepage(struct page *page, struct writeback_control *wbc,
   279  bio_end_io_t end_write_func)
   280  {
   281  struct bio *bio;
   282  int ret;
   283  struct swap_info_struct *sis = page_swap_info(page);
   284  
   285  VM_BUG_ON_PAGE(!PageSwapCache(page), page);
   286  if (sis->flags & SWP_FILE) {
   287  struct kiocb kiocb;
   288  struct file *swap_file = sis->swap_file;
   289  struct address_space *mapping = swap_file->f_mapping;
   290  struct bio_vec bv = {
   291  .bv_page = page,
   292  .bv_len  = PAGE_SIZE,
   293  .bv_offset = 0
   294  };
   295  struct iov_iter from;
   296  
   297  iov_iter_bvec(, ITER_BVEC | WRITE, , 1, 
PAGE_SIZE);
   298  init_sync_kiocb(, swap_file);
   299  kiocb.ki_pos = page_file_offset(page);
   300  
   301  set_page_writeback(page);
   302  unlock_page(page);
   303  ret = mapping->a_ops->direct_IO(, );
   304  if (ret == PAGE_SIZE) {
   305  count_vm_event(PSWPOUT);
   306  ret = 0;
   307  } else {
   308  /*
   309   * In the case of swap-over-nfs, this can be a
   310   * temporary failure if the system has limited
   311   * memory for allocating transmit buffers.
   312   * Mark the page dirty and avoid
   313   * rotate_reclaimable_page but rate-limit the
   314   * messages but do not flag PageError like
   315   * the normal direct-to-bio case as it could
   316   * be temporary.
   317   */
   318  set_page_dirty(page);
   319  ClearPageReclaim(page);
   320  pr_err_ratelimited("Write error on dio swapfile 
(%llu)\n",
   321 page_file_offset(page));
   322  }
   323  end_page_writeback(page);
   324  return ret;
   325  }
   326  
   327  ret = bdev_write_page(sis->bdev, swap_page_sector(page), page, 
wbc);
   328  if (!ret) {
   329  count_swpout_vm_event(page);
   330  return 0;
   331  }
   332  
   333  ret = 0;
   334  bio = get_swap_bio(GFP_NOIO, page, end_write_func);
   335  if (bio == NULL) {
   336  set_page_dirty(page);
   337  unlock_page(page);
   338  ret = -ENOMEM;
   339  goto out;
   340  }
   341  bio->bi_opf = REQ_OP_WRITE | REQ_SWAP | wbc_to_write_flags(wbc);
 > 342  if 

[josef-btrfs:blk-iolatency 8/13] mm/shmem.c:1222:10: error: implicit declaration of function 'mem_cgroup_try_charge_delay'; did you mean 'mem_cgroup_try_charge_swap'?

2018-05-24 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency
head:   657e770d4d6e3b03c3d4b96e427b30d6f766e2e2
commit: 7f1e4ea0a7071711f43deaed15b123bcf0a3ee8f [8/13] blk-stat: export 
helpers for modifying blk_rq_stat
config: x86_64-randconfig-x011-201820 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout 7f1e4ea0a7071711f43deaed15b123bcf0a3ee8f
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from include/linux/blkdev.h:21:0,
from include/linux/backing-dev.h:15,
from mm/shmem.c:57:
   include/linux/bio.h:556:55: warning: 'struct blkcg_gq' declared inside 
parameter list will not be visible outside of this definition or declaration
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
  ^~~~
   mm/shmem.c: In function 'shmem_unuse':
>> mm/shmem.c:1222:10: error: implicit declaration of function 
>> 'mem_cgroup_try_charge_delay'; did you mean 'mem_cgroup_try_charge_swap'? 
>> [-Werror=implicit-function-declaration]
 error = mem_cgroup_try_charge_delay(page, current->mm, GFP_KERNEL,
 ^~~
 mem_cgroup_try_charge_swap
   In file included from include/linux/backing-dev.h:17:0,
from mm/shmem.c:57:
   At top level:
   include/linux/blk-cgroup.h:832:13: warning: 'blkcg_schedule_throttle' 
defined but not used [-Wunused-function]
static void blkcg_schedule_throttle(struct request_queue *q, bool 
use_memdelay) { }
^~~
   include/linux/blk-cgroup.h:831:13: warning: 'blkcg_add_delay' defined but 
not used [-Wunused-function]
static void blkcg_add_delay(struct blkcg_gq *blkg, u64 now, u64 delta) { }
^~~
   In file included from include/linux/blkdev.h:21:0,
from include/linux/backing-dev.h:15,
from mm/shmem.c:57:
   include/linux/bio.h:556:12: warning: 'bio_associate_blkg' defined but not 
used [-Wunused-function]
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
   ^~
   cc1: some warnings being treated as errors
--
   mm/memory.c: In function 'wp_page_copy':
>> mm/memory.c:2497:6: error: implicit declaration of function 
>> 'mem_cgroup_try_charge_delay'; did you mean 'mem_cgroup_try_charge_swap'? 
>> [-Werror=implicit-function-declaration]
 if (mem_cgroup_try_charge_delay(new_page, mm, GFP_KERNEL, , false))
 ^~~
 mem_cgroup_try_charge_swap
   cc1: some warnings being treated as errors

vim +1222 mm/shmem.c

^1da177e Linus Torvalds 2005-04-16  1199  
^1da177e Linus Torvalds 2005-04-16  1200  /*
46f65ec1 Hugh Dickins   2011-08-03  1201   * Search through swapped inodes 
to find and replace swap by page.
^1da177e Linus Torvalds 2005-04-16  1202   */
41ffe5d5 Hugh Dickins   2011-08-03  1203  int shmem_unuse(swp_entry_t swap, 
struct page *page)
^1da177e Linus Torvalds 2005-04-16  1204  {
41ffe5d5 Hugh Dickins   2011-08-03  1205struct list_head *this, *next;
^1da177e Linus Torvalds 2005-04-16  1206struct shmem_inode_info *info;
00501b53 Johannes Weiner2014-08-08  1207struct mem_cgroup *memcg;
bde05d1c Hugh Dickins   2012-05-29  1208int error = 0;
bde05d1c Hugh Dickins   2012-05-29  1209  
bde05d1c Hugh Dickins   2012-05-29  1210/*
bde05d1c Hugh Dickins   2012-05-29  1211 * There's a faint possibility 
that swap page was replaced before
0142ef6c Hugh Dickins   2012-06-07  1212 * caller locked it: caller 
will come back later with the right page.
bde05d1c Hugh Dickins   2012-05-29  1213 */
0142ef6c Hugh Dickins   2012-06-07  1214if 
(unlikely(!PageSwapCache(page) || page_private(page) != swap.val))
bde05d1c Hugh Dickins   2012-05-29  1215goto out;
778dd893 Hugh Dickins   2011-05-11  1216  
778dd893 Hugh Dickins   2011-05-11  1217/*
778dd893 Hugh Dickins   2011-05-11  1218 * Charge page using GFP_KERNEL 
while we can wait, before taking
778dd893 Hugh Dickins   2011-05-11  1219 * the shmem_swaplist_mutex 
which might hold up shmem_writepage().
778dd893 Hugh Dickins   2011-05-11  1220 * Charged back to the user 
(not to caller) when swap account is used.
778dd893 Hugh Dickins   2011-05-11  1221 */
90f955bb Tejun Heo  2018-04-16 @1222error = 
mem_cgroup_try_charge_delay(page, current->mm, GFP_KERNEL,
90f955bb Tejun Heo  2018-04-16  1223
, false);
778dd893 Hugh Dickins   2011-05-11  1224if (error)
778dd893 Hugh Dickins   2011-05-11  1225goto out;
46f65ec1 Hugh Dickins   2011-08-03  1226/* No 

[josef-btrfs:blk-iolatency 1/13] include/linux/bio.h:556:55: warning: 'struct blkcg_gq' declared inside parameter list will not be visible outside of this definition or declaration

2018-05-24 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency
head:   657e770d4d6e3b03c3d4b96e427b30d6f766e2e2
commit: 03766852a022b0ff5f8c4b73f40ef205a36d095e [1/13] block: add bi_blkg to 
the bio for cgroups
config: x86_64-randconfig-x011-201820 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout 03766852a022b0ff5f8c4b73f40ef205a36d095e
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/blkdev.h:21:0,
from block//partitions/check.h:3,
from block//partitions/check.c:22:
>> include/linux/bio.h:556:55: warning: 'struct blkcg_gq' declared inside 
>> parameter list will not be visible outside of this definition or declaration
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
  ^~~~
   include/linux/bio.h:556:12: warning: 'bio_associate_blkg' defined but not 
used [-Wunused-function]
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
   ^~

vim +556 include/linux/bio.h

   544  
   545  #define bio_dev(bio) \
   546  disk_devt((bio)->bi_disk)
   547  
   548  #ifdef CONFIG_BLK_CGROUP
   549  int bio_associate_blkcg(struct bio *bio, struct cgroup_subsys_state 
*blkcg_css);
   550  int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg);
   551  void bio_disassociate_task(struct bio *bio);
   552  void bio_clone_blkcg_association(struct bio *dst, struct bio *src);
   553  #else   /* CONFIG_BLK_CGROUP */
   554  static inline int bio_associate_blkcg(struct bio *bio,
   555  struct cgroup_subsys_state *blkcg_css) { return 
0; }
 > 556  static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
 > return 0; }
   557  static inline void bio_disassociate_task(struct bio *bio) { }
   558  static inline void bio_clone_blkcg_association(struct bio *dst,
   559  struct bio *src) { }
   560  #endif  /* CONFIG_BLK_CGROUP */
   561  

---
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: fix BUG trying to resume balance without resume flag

2018-04-30 Thread kbuild test robot
Hi Anand,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on btrfs/next]
[also build test ERROR on v4.17-rc3 next-20180430]
[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/Anand-Jain/btrfs-fix-BUG-trying-to-resume-balance-without-resume-flag/20180430-192532
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git 
next
config: i386-randconfig-x000-201817 (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=i386 

All errors (new ones prefixed by >>):

   fs//btrfs/volumes.c: In function 'btrfs_resume_balance_async':
>> fs//btrfs/volumes.c:3971:24: error: 'struct btrfs_balance_control' has no 
>> member named 'b_flags'; did you mean 'flags'?
 fs_info->balance_ctl->b_flags |= BTRFS_BALANCE_RESUME;
   ^~~
   flags

vim +3971 fs//btrfs/volumes.c

  3954  
  3955  int btrfs_resume_balance_async(struct btrfs_fs_info *fs_info)
  3956  {
  3957  struct task_struct *tsk;
  3958  
  3959  spin_lock(_info->balance_lock);
  3960  if (!fs_info->balance_ctl) {
  3961  spin_unlock(_info->balance_lock);
  3962  return 0;
  3963  }
  3964  spin_unlock(_info->balance_lock);
  3965  
  3966  if (btrfs_test_opt(fs_info, SKIP_BALANCE)) {
  3967  btrfs_info(fs_info, "force skipping balance");
  3968  return 0;
  3969  }
  3970  
> 3971  fs_info->balance_ctl->b_flags |= BTRFS_BALANCE_RESUME;
  3972  
  3973  tsk = kthread_run(balance_kthread, fs_info, "btrfs-balance");
  3974  return PTR_ERR_OR_ZERO(tsk);
  3975  }
  3976  

---
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: fix BUG trying to resume balance without resume flag

2018-04-30 Thread kbuild test robot
Hi Anand,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on btrfs/next]
[also build test ERROR on v4.17-rc3 next-20180430]
[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/Anand-Jain/btrfs-fix-BUG-trying-to-resume-balance-without-resume-flag/20180430-192532
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git 
next
config: i386-randconfig-a1-201817 (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/volumes.c: In function 'btrfs_resume_balance_async':
>> fs/btrfs/volumes.c:3971:22: error: 'struct btrfs_balance_control' has no 
>> member named 'b_flags'
 fs_info->balance_ctl->b_flags |= BTRFS_BALANCE_RESUME;
 ^

vim +3971 fs/btrfs/volumes.c

  3954  
  3955  int btrfs_resume_balance_async(struct btrfs_fs_info *fs_info)
  3956  {
  3957  struct task_struct *tsk;
  3958  
  3959  spin_lock(_info->balance_lock);
  3960  if (!fs_info->balance_ctl) {
  3961  spin_unlock(_info->balance_lock);
  3962  return 0;
  3963  }
  3964  spin_unlock(_info->balance_lock);
  3965  
  3966  if (btrfs_test_opt(fs_info, SKIP_BALANCE)) {
  3967  btrfs_info(fs_info, "force skipping balance");
  3968  return 0;
  3969  }
  3970  
> 3971  fs_info->balance_ctl->b_flags |= BTRFS_BALANCE_RESUME;
  3972  
  3973  tsk = kthread_run(balance_kthread, fs_info, "btrfs-balance");
  3974  return PTR_ERR_OR_ZERO(tsk);
  3975  }
  3976  

---
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! 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] btrfs: Take trans lock before access running trans in check_delayed_ref

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

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on v4.17-rc2]
[also build test WARNING on next-20180426]
[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/ethanwu/btrfs-Take-trans-lock-before-access-running-trans-in-check_delayed_ref/20180428-223414
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/extent-tree.c:278:39: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:278:39: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:401:16: sparse: expression using sizeof(void)
>> fs/btrfs/extent-tree.c:3148:29: sparse: incorrect type in argument 1 
>> (different base types) @@expected struct atomic_t [usertype] *v @@
>> got ct atomic_t [usertype] *v @@
   fs/btrfs/extent-tree.c:3148:29:expected struct atomic_t [usertype] *v
   fs/btrfs/extent-tree.c:3148:29:got struct refcount_struct *
   fs/btrfs/extent-tree.c:4502:26: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:4850:31: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:4850:31: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5043:22: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5060:22: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5060:22: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5043:22: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5060:22: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5060:22: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5043:22: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5060:22: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5060:22: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5043:22: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5060:22: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5060:22: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5612:48: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5612:48: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5861:21: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5866:27: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5872:37: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:5872:37: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:6308:29: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:6308:29: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:6737:23: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:6737:23: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:6740:31: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:6740:31: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:6782:42: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:6782:42: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:7551:24: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:7551:24: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:7552:24: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:7552:24: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:7716:43: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:7716:43: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:8064:37: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:8064:37: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:8067:37: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:8067:37: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:8586:35: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:8589:35: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:8589:35: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:11035:25: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:11035:25: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:11036:23: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:11036:23: sparse: expression using sizeof(void)
   fs/btrfs/extent-tree.c:2558:20: sparse: context imbalance in 
'cleanup_extent_op' - unexpected unlock
   fs/btrfs/extent-tree.c:2590:28: sparse: context imbalance in 
'cleanup_ref_head' - unexpected unlock
   fs/btrfs/extent-tree.c:2702:26: sparse: context imbalance in 
'__btrfs_run_delayed_refs' - different lock contexts for basic block
   fs/btrfs/extent-tree.c:7418:39: sparse: context imbalance in 
'btrfs_lock_cluster' - wrong count at exit
   fs/btrfs/extent-tree.c:7695:44: sparse: context imbalance in 

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


Re: [PATCH] btrfs: Take trans lock before access running trans in check_delayed_ref

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

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on v4.17-rc2]
[also build test WARNING on next-20180426]
[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/ethanwu/btrfs-Take-trans-lock-before-access-running-trans-in-check_delayed_ref/20180428-223414
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 warnings (new ones prefixed by >>):

   fs/btrfs/extent-tree.c: In function 'check_delayed_ref':
>> fs/btrfs/extent-tree.c:3148:14: warning: passing argument 1 of 'atomic_inc' 
>> from incompatible pointer type
  atomic_inc(_trans->use_count);
 ^
   In file included from arch/x86/include/asm/atomic.h:283:0,
from include/linux/atomic.h:5,
from include/linux/rcupdate.h:38,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from fs/btrfs/extent-tree.c:6:
   include/asm-generic/atomic-instrumented.h:100:29: note: expected 'struct 
atomic_t *' but argument is of type 'struct refcount_t *'
static __always_inline void atomic_inc(atomic_t *v)
^

vim +/atomic_inc +3148 fs/btrfs/extent-tree.c

  3132  
  3133  static noinline int check_delayed_ref(struct btrfs_root *root,
  3134struct btrfs_path *path,
  3135u64 objectid, u64 offset, u64 
bytenr)
  3136  {
  3137  struct btrfs_delayed_ref_head *head;
  3138  struct btrfs_delayed_ref_node *ref;
  3139  struct btrfs_delayed_data_ref *data_ref;
  3140  struct btrfs_delayed_ref_root *delayed_refs;
  3141  struct btrfs_transaction *cur_trans;
  3142  struct rb_node *node;
  3143  int ret = 0;
  3144  
  3145  spin_lock(>fs_info->trans_lock);
  3146  cur_trans = root->fs_info->running_transaction;
  3147  if (cur_trans)
> 3148  atomic_inc(_trans->use_count);
  3149  spin_unlock(>fs_info->trans_lock);
  3150  if (!cur_trans)
  3151  return 0;
  3152  
  3153  delayed_refs = _trans->delayed_refs;
  3154  spin_lock(_refs->lock);
  3155  head = btrfs_find_delayed_ref_head(delayed_refs, bytenr);
  3156  if (!head) {
  3157  spin_unlock(_refs->lock);
  3158  btrfs_put_transaction(cur_trans);
  3159  return 0;
  3160  }
  3161  
  3162  if (!mutex_trylock(>mutex)) {
  3163  refcount_inc(>refs);
  3164  spin_unlock(_refs->lock);
  3165  
  3166  btrfs_release_path(path);
  3167  
  3168  /*
  3169   * Mutex was contended, block until it's released and 
let
  3170   * caller try again
  3171   */
  3172  mutex_lock(>mutex);
  3173  mutex_unlock(>mutex);
  3174  btrfs_put_delayed_ref_head(head);
  3175  btrfs_put_transaction(cur_trans);
  3176  return -EAGAIN;
  3177  }
  3178  spin_unlock(_refs->lock);
  3179  
  3180  spin_lock(>lock);
  3181  /*
  3182   * XXX: We should replace this with a proper search function in 
the
  3183   * future.
  3184   */
  3185  for (node = rb_first(>ref_tree); node; node = 
rb_next(node)) {
  3186  ref = rb_entry(node, struct btrfs_delayed_ref_node, 
ref_node);
  3187  /* If it's a shared ref we know a cross reference 
exists */
  3188  if (ref->type != BTRFS_EXTENT_DATA_REF_KEY) {
  3189  ret = 1;
  3190  break;
  3191  }
  3192  
  3193  data_ref = btrfs_delayed_node_to_data_ref(ref);
  3194  
  3195  /*
  3196   * If our ref doesn't match the one we're currently 
looking at
  3197   * then we have a cross reference.
  3198   */
  3199  if (data_ref->root != root->root_key.objectid ||
  3200  data_ref->objectid != objectid ||
  3201  data_ref->offset != offset) {
  3202  ret = 1;
  3203  break;
  3204  }
  3205  }
  3206  spin_unlock(>lock);
  3207  mutex_unlock(>mutex);
  3208  btrfs_put_transaction(cur_trans);
  3209  return ret;
  3210  }
  3211  

---
0-DAY kernel test infrastructureOpen Source Technology Center

Re: [PATCH] btrfs: Take trans lock before access running trans in check_delayed_ref

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

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v4.17-rc2]
[also build test ERROR on next-20180426]
[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/ethanwu/btrfs-Take-trans-lock-before-access-running-trans-in-check_delayed_ref/20180428-223414
config: i386-randconfig-x014-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=i386 

All errors (new ones prefixed by >>):

   fs/btrfs/extent-tree.c: In function 'check_delayed_ref':
>> fs/btrfs/extent-tree.c:3148:14: error: passing argument 1 of 'atomic_inc' 
>> from incompatible pointer type [-Werror=incompatible-pointer-types]
  atomic_inc(_trans->use_count);
 ^
   In file included from arch/x86/include/asm/atomic.h:283:0,
from include/linux/atomic.h:5,
from include/linux/rcupdate.h:38,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from fs/btrfs/extent-tree.c:6:
   include/asm-generic/atomic-instrumented.h:100:29: note: expected 'atomic_t * 
{aka struct  *}' but argument is of type 'refcount_t * {aka struct 
refcount_struct *}'
static __always_inline void atomic_inc(atomic_t *v)
^~
   cc1: some warnings being treated as errors

vim +/atomic_inc +3148 fs/btrfs/extent-tree.c

  3132  
  3133  static noinline int check_delayed_ref(struct btrfs_root *root,
  3134struct btrfs_path *path,
  3135u64 objectid, u64 offset, u64 
bytenr)
  3136  {
  3137  struct btrfs_delayed_ref_head *head;
  3138  struct btrfs_delayed_ref_node *ref;
  3139  struct btrfs_delayed_data_ref *data_ref;
  3140  struct btrfs_delayed_ref_root *delayed_refs;
  3141  struct btrfs_transaction *cur_trans;
  3142  struct rb_node *node;
  3143  int ret = 0;
  3144  
  3145  spin_lock(>fs_info->trans_lock);
  3146  cur_trans = root->fs_info->running_transaction;
  3147  if (cur_trans)
> 3148  atomic_inc(_trans->use_count);
  3149  spin_unlock(>fs_info->trans_lock);
  3150  if (!cur_trans)
  3151  return 0;
  3152  
  3153  delayed_refs = _trans->delayed_refs;
  3154  spin_lock(_refs->lock);
  3155  head = btrfs_find_delayed_ref_head(delayed_refs, bytenr);
  3156  if (!head) {
  3157  spin_unlock(_refs->lock);
  3158  btrfs_put_transaction(cur_trans);
  3159  return 0;
  3160  }
  3161  
  3162  if (!mutex_trylock(>mutex)) {
  3163  refcount_inc(>refs);
  3164  spin_unlock(_refs->lock);
  3165  
  3166  btrfs_release_path(path);
  3167  
  3168  /*
  3169   * Mutex was contended, block until it's released and 
let
  3170   * caller try again
  3171   */
  3172  mutex_lock(>mutex);
  3173  mutex_unlock(>mutex);
  3174  btrfs_put_delayed_ref_head(head);
  3175  btrfs_put_transaction(cur_trans);
  3176  return -EAGAIN;
  3177  }
  3178  spin_unlock(_refs->lock);
  3179  
  3180  spin_lock(>lock);
  3181  /*
  3182   * XXX: We should replace this with a proper search function in 
the
  3183   * future.
  3184   */
  3185  for (node = rb_first(>ref_tree); node; node = 
rb_next(node)) {
  3186  ref = rb_entry(node, struct btrfs_delayed_ref_node, 
ref_node);
  3187  /* If it's a shared ref we know a cross reference 
exists */
  3188  if (ref->type != BTRFS_EXTENT_DATA_REF_KEY) {
  3189  ret = 1;
  3190  break;
  3191  }
  3192  
  3193  data_ref = btrfs_delayed_node_to_data_ref(ref);
  3194  
  3195  /*
  3196   * If our ref doesn't match the one we're currently 
looking at
  3197   * then we have a cross reference.
  3198   */
  3199  if (data_ref->root != root->root_key.objectid ||
  3200  data_ref->objectid != objectid ||
  3201  data_ref->offset != offset) {
  3202  ret = 1;
  3203  break;
  3204  }
  3205  }
  3206  spin_unlock(>lock);
  3207  mutex_unlock(>mutex);
  3208  btrfs_put_transaction(cur_trans);
  3209  return ret;
  3210  }
  

Re: [PATCH] btrfs: Validate child tree block's level and first key

2018-03-20 Thread kbuild test robot
Hi Qu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on v4.16-rc4]
[also build test WARNING on next-20180319]
[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/Qu-Wenruo/btrfs-Validate-child-tree-block-s-level-and-first-key/20180320-054353
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/ref-verify.c:586:45: sparse: not enough arguments for function 
>> read_tree_block
   fs/btrfs/ref-verify.c:284:27: sparse: context imbalance in 'add_block_entry' 
- different lock contexts for basic block
   fs/btrfs/ref-verify.c:371:20: sparse: context imbalance in 'add_tree_block' 
- unexpected unlock
   fs/btrfs/ref-verify.c:396:28: sparse: context imbalance in 
'add_shared_data_ref' - unexpected unlock
   fs/btrfs/ref-verify.c:434:28: sparse: context imbalance in 
'add_extent_data_ref' - unexpected unlock
   fs/btrfs/ref-verify.c:892:20: sparse: context imbalance in 
'btrfs_ref_tree_mod' - unexpected unlock
   fs/btrfs/ref-verify.c: In function 'walk_down_tree':
   fs/btrfs/ref-verify.c:586:9: error: too few arguments to function 
'read_tree_block'
   eb = read_tree_block(fs_info, block_bytenr, gen);
^~~
   In file included from fs/btrfs/ref-verify.c:22:0:
   fs/btrfs/disk-io.h:55:23: note: declared here
struct extent_buffer *read_tree_block(struct btrfs_fs_info *fs_info, u64 
bytenr,
  ^~~

vim +586 fs/btrfs/ref-verify.c

fd708b81 Josef Bacik 2017-09-29  570  
fd708b81 Josef Bacik 2017-09-29  571  /* Walk down to the leaf from the given 
level */
fd708b81 Josef Bacik 2017-09-29  572  static int walk_down_tree(struct 
btrfs_root *root, struct btrfs_path *path,
fd708b81 Josef Bacik 2017-09-29  573  int level, u64 
*bytenr, u64 *num_bytes)
fd708b81 Josef Bacik 2017-09-29  574  {
fd708b81 Josef Bacik 2017-09-29  575struct btrfs_fs_info *fs_info = 
root->fs_info;
fd708b81 Josef Bacik 2017-09-29  576struct extent_buffer *eb;
fd708b81 Josef Bacik 2017-09-29  577u64 block_bytenr, gen;
fd708b81 Josef Bacik 2017-09-29  578int ret = 0;
fd708b81 Josef Bacik 2017-09-29  579  
fd708b81 Josef Bacik 2017-09-29  580while (level >= 0) {
fd708b81 Josef Bacik 2017-09-29  581if (level) {
fd708b81 Josef Bacik 2017-09-29  582block_bytenr = 
btrfs_node_blockptr(path->nodes[level],
fd708b81 Josef Bacik 2017-09-29  583
   path->slots[level]);
fd708b81 Josef Bacik 2017-09-29  584gen = 
btrfs_node_ptr_generation(path->nodes[level],
fd708b81 Josef Bacik 2017-09-29  585
path->slots[level]);
fd708b81 Josef Bacik 2017-09-29 @586eb = 
read_tree_block(fs_info, block_bytenr, gen);
fd708b81 Josef Bacik 2017-09-29  587if (IS_ERR(eb))
fd708b81 Josef Bacik 2017-09-29  588return 
PTR_ERR(eb);
fd708b81 Josef Bacik 2017-09-29  589if 
(!extent_buffer_uptodate(eb)) {
fd708b81 Josef Bacik 2017-09-29  590
free_extent_buffer(eb);
fd708b81 Josef Bacik 2017-09-29  591return -EIO;
fd708b81 Josef Bacik 2017-09-29  592}
fd708b81 Josef Bacik 2017-09-29  593
btrfs_tree_read_lock(eb);
fd708b81 Josef Bacik 2017-09-29  594
btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK);
fd708b81 Josef Bacik 2017-09-29  595path->nodes[level-1] = 
eb;
fd708b81 Josef Bacik 2017-09-29  596path->slots[level-1] = 
0;
fd708b81 Josef Bacik 2017-09-29  597path->locks[level-1] = 
BTRFS_READ_LOCK_BLOCKING;
fd708b81 Josef Bacik 2017-09-29  598} else {
fd708b81 Josef Bacik 2017-09-29  599ret = 
process_leaf(root, path, bytenr, num_bytes);
fd708b81 Josef Bacik 2017-09-29  600if (ret)
fd708b81 Josef Bacik 2017-09-29  601break;
fd708b81 Josef Bacik 2017-09-29  602}
fd708b81 Josef Bacik 2017-09-29  603level--;
fd708b81 Josef Bacik 2017-09-29  604}
fd708b81 Josef Bacik 2017-09-29  605return ret;
fd708b81 Josef Bacik 2017-09-29  606  }
fd708b81 Josef Bacik 2017-09-29  607  

:: The code at line 586 was first introduced by commit
:: fd708b81d972a0714b02a60eb4792fdbf15868c4 Btrfs: add a extent ref verify 
tool

:: TO: Josef Bacik 
:: CC: David Sterba 

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

Re: [PATCH] btrfs: Validate child tree block's level and first key

2018-03-19 Thread kbuild test robot
Hi Qu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v4.16-rc4]
[also build test ERROR on next-20180319]
[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/Qu-Wenruo/btrfs-Validate-child-tree-block-s-level-and-first-key/20180320-054353
config: i386-randconfig-x006-201811 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   fs//btrfs/ref-verify.c: In function 'walk_down_tree':
>> fs//btrfs/ref-verify.c:586:9: error: too few arguments to function 
>> 'read_tree_block'
   eb = read_tree_block(fs_info, block_bytenr, gen);
^~~
   In file included from fs//btrfs/ref-verify.c:22:0:
   fs//btrfs/disk-io.h:55:23: note: declared here
struct extent_buffer *read_tree_block(struct btrfs_fs_info *fs_info, u64 
bytenr,
  ^~~

vim +/read_tree_block +586 fs//btrfs/ref-verify.c

fd708b81 Josef Bacik 2017-09-29  570  
fd708b81 Josef Bacik 2017-09-29  571  /* Walk down to the leaf from the given 
level */
fd708b81 Josef Bacik 2017-09-29  572  static int walk_down_tree(struct 
btrfs_root *root, struct btrfs_path *path,
fd708b81 Josef Bacik 2017-09-29  573  int level, u64 
*bytenr, u64 *num_bytes)
fd708b81 Josef Bacik 2017-09-29  574  {
fd708b81 Josef Bacik 2017-09-29  575struct btrfs_fs_info *fs_info = 
root->fs_info;
fd708b81 Josef Bacik 2017-09-29  576struct extent_buffer *eb;
fd708b81 Josef Bacik 2017-09-29  577u64 block_bytenr, gen;
fd708b81 Josef Bacik 2017-09-29  578int ret = 0;
fd708b81 Josef Bacik 2017-09-29  579  
fd708b81 Josef Bacik 2017-09-29  580while (level >= 0) {
fd708b81 Josef Bacik 2017-09-29  581if (level) {
fd708b81 Josef Bacik 2017-09-29  582block_bytenr = 
btrfs_node_blockptr(path->nodes[level],
fd708b81 Josef Bacik 2017-09-29  583
   path->slots[level]);
fd708b81 Josef Bacik 2017-09-29  584gen = 
btrfs_node_ptr_generation(path->nodes[level],
fd708b81 Josef Bacik 2017-09-29  585
path->slots[level]);
fd708b81 Josef Bacik 2017-09-29 @586eb = 
read_tree_block(fs_info, block_bytenr, gen);
fd708b81 Josef Bacik 2017-09-29  587if (IS_ERR(eb))
fd708b81 Josef Bacik 2017-09-29  588return 
PTR_ERR(eb);
fd708b81 Josef Bacik 2017-09-29  589if 
(!extent_buffer_uptodate(eb)) {
fd708b81 Josef Bacik 2017-09-29  590
free_extent_buffer(eb);
fd708b81 Josef Bacik 2017-09-29  591return -EIO;
fd708b81 Josef Bacik 2017-09-29  592}
fd708b81 Josef Bacik 2017-09-29  593
btrfs_tree_read_lock(eb);
fd708b81 Josef Bacik 2017-09-29  594
btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK);
fd708b81 Josef Bacik 2017-09-29  595path->nodes[level-1] = 
eb;
fd708b81 Josef Bacik 2017-09-29  596path->slots[level-1] = 
0;
fd708b81 Josef Bacik 2017-09-29  597path->locks[level-1] = 
BTRFS_READ_LOCK_BLOCKING;
fd708b81 Josef Bacik 2017-09-29  598} else {
fd708b81 Josef Bacik 2017-09-29  599ret = 
process_leaf(root, path, bytenr, num_bytes);
fd708b81 Josef Bacik 2017-09-29  600if (ret)
fd708b81 Josef Bacik 2017-09-29  601break;
fd708b81 Josef Bacik 2017-09-29  602}
fd708b81 Josef Bacik 2017-09-29  603level--;
fd708b81 Josef Bacik 2017-09-29  604}
fd708b81 Josef Bacik 2017-09-29  605return ret;
fd708b81 Josef Bacik 2017-09-29  606  }
fd708b81 Josef Bacik 2017-09-29  607  

:: The code at line 586 was first introduced by commit
:: fd708b81d972a0714b02a60eb4792fdbf15868c4 Btrfs: add a extent ref verify 
tool

:: TO: Josef Bacik 
:: CC: David Sterba 

---
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 3/3] btrfs: Add unprivileged version of ino_lookup ioctl

2018-03-17 Thread kbuild test robot
Hi Tomohiro,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc5 next-20180316]
[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/Misono-Tomohiro/btrfs-Add-three-new-unprivileged-ioctls-to-allow-normal-users-to-call-sub-list-show-etc/20180318-101013
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/ioctl.c:1561:9: sparse: incompatible types in comparison expression 
(different address spaces)
>> fs/btrfs/ioctl.c:2414:17: sparse: restricted __le64 degrades to integer
   fs/btrfs/ioctl.c:2538:21: sparse: incorrect type in assignment (different 
address spaces) @@expected struct btrfs_ioctl_get_subvol_info_args 
[noderef] *subvol_info @@got sn:1>*subvol_info @@
   fs/btrfs/ioctl.c:2538:21:expected struct 
btrfs_ioctl_get_subvol_info_args [noderef] *subvol_info
   fs/btrfs/ioctl.c:2538:21:got void *
   fs/btrfs/ioctl.c:2575:9: sparse: incorrect type in argument 1 (different 
address spaces) @@expected void *to @@got unsigned char [noderef] 
*
   fs/btrfs/ioctl.c:2576:9: sparse: incorrect type in argument 1 (different 
address spaces) @@expected void *to @@got unsigned char [noderef] 
*
   fs/btrfs/ioctl.c:2578:9: sparse: incorrect type in argument 1 (different 
address spaces) @@expected void *to @@got unsigned char [noderef] 
*
   fs/btrfs/ioctl.c:2618:39: sparse: incorrect type in argument 2 (different 
address spaces) @@expected void *dst @@got char [noderef] *
   fs/btrfs/ioctl.c:2621:32: sparse: incorrect type in argument 2 (different 
address spaces) @@expected void const *from @@got struct 
btrfs_ioctl_get_subvol_info_args [nodervoid const *from @@
   fs/btrfs/ioctl.c:2621:32:expected void const *from
   fs/btrfs/ioctl.c:2621:32:got struct btrfs_ioctl_get_subvol_info_args 
[noderef] *subvol_info
   fs/btrfs/ioctl.c:2625:16: sparse: incorrect type in argument 1 (different 
address spaces) @@expected void const * @@got struct 
btrfs_ioctl_get_subvol_info_args [nodervoid const * @@
   fs/btrfs/ioctl.c:2625:16:expected void const *
   fs/btrfs/ioctl.c:2625:16:got struct btrfs_ioctl_get_subvol_info_args 
[noderef] *subvol_info
   fs/btrfs/ioctl.c:2653:18: sparse: incorrect type in assignment (different 
address spaces) @@expected struct btrfs_ioctl_get_subvol_rootref_args 
[noderef] *rootrefs @@got sn:1>*rootrefs @@
   fs/btrfs/ioctl.c:2653:18:expected struct 
btrfs_ioctl_get_subvol_rootref_args [noderef] *rootrefs
   fs/btrfs/ioctl.c:2653:18:got void *
   fs/btrfs/ioctl.c:2709:40: sparse: incorrect type in argument 2 (different 
address spaces) @@expected void const *from @@got struct 
btrfs_ioctl_get_subvol_rootref_args [nodervoid const *from @@
   fs/btrfs/ioctl.c:2709:40:expected void const *from
   fs/btrfs/ioctl.c:2709:40:got struct btrfs_ioctl_get_subvol_rootref_args 
[noderef] *rootrefs
   fs/btrfs/ioctl.c:2714:15: sparse: incorrect type in argument 1 (different 
address spaces) @@expected void const * @@got struct 
btrfs_ioctl_get_subvol_rootref_args [nodervoid const * @@
   fs/btrfs/ioctl.c:2714:15:expected void const *
   fs/btrfs/ioctl.c:2714:15:got struct btrfs_ioctl_get_subvol_rootref_args 
[noderef] *rootrefs
   fs/btrfs/ioctl.c:3208:24: sparse: incompatible types in comparison 
expression (different address spaces)
   fs/btrfs/ioctl.c:2570:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2572:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2573:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2581:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2582:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2583:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2585:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2586:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2587:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2589:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2590:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2591:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2593:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2594:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2595:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2607:29: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2609:17: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2612:17: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2665:22: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2690:33: 

Re: [PATCH v2 2/3] btrfs: Add unprivileged ioctl which returns subvolume's ROOT_REF

2018-03-17 Thread kbuild test robot
Hi Tomohiro,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc5 next-20180316]
[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/Misono-Tomohiro/btrfs-Add-three-new-unprivileged-ioctls-to-allow-normal-users-to-call-sub-list-show-etc/20180318-101013
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/ioctl.c:1561:9: sparse: incompatible types in comparison expression 
(different address spaces)
   fs/btrfs/ioctl.c:2336:21: sparse: incorrect type in assignment (different 
address spaces) @@expected struct btrfs_ioctl_get_subvol_info_args 
[noderef] *subvol_info @@got sn:1>*subvol_info @@
   fs/btrfs/ioctl.c:2336:21:expected struct 
btrfs_ioctl_get_subvol_info_args [noderef] *subvol_info
   fs/btrfs/ioctl.c:2336:21:got void *
   fs/btrfs/ioctl.c:2373:9: sparse: incorrect type in argument 1 (different 
address spaces) @@expected void *to @@got unsigned char [noderef] 
*
   fs/btrfs/ioctl.c:2374:9: sparse: incorrect type in argument 1 (different 
address spaces) @@expected void *to @@got unsigned char [noderef] 
*
   fs/btrfs/ioctl.c:2376:9: sparse: incorrect type in argument 1 (different 
address spaces) @@expected void *to @@got unsigned char [noderef] 
*
   fs/btrfs/ioctl.c:2416:39: sparse: incorrect type in argument 2 (different 
address spaces) @@expected void *dst @@got char [noderef] *
   fs/btrfs/ioctl.c:2419:32: sparse: incorrect type in argument 2 (different 
address spaces) @@expected void const *from @@got struct 
btrfs_ioctl_get_subvol_info_args [nodervoid const *from @@
   fs/btrfs/ioctl.c:2419:32:expected void const *from
   fs/btrfs/ioctl.c:2419:32:got struct btrfs_ioctl_get_subvol_info_args 
[noderef] *subvol_info
   fs/btrfs/ioctl.c:2423:16: sparse: incorrect type in argument 1 (different 
address spaces) @@expected void const * @@got struct 
btrfs_ioctl_get_subvol_info_args [nodervoid const * @@
   fs/btrfs/ioctl.c:2423:16:expected void const *
   fs/btrfs/ioctl.c:2423:16:got struct btrfs_ioctl_get_subvol_info_args 
[noderef] *subvol_info
>> fs/btrfs/ioctl.c:2451:18: sparse: incorrect type in assignment (different 
>> address spaces) @@expected struct btrfs_ioctl_get_subvol_rootref_args 
>> [noderef] *rootrefs @@got sn:1>*rootrefs @@
   fs/btrfs/ioctl.c:2451:18:expected struct 
btrfs_ioctl_get_subvol_rootref_args [noderef] *rootrefs
   fs/btrfs/ioctl.c:2451:18:got void *
>> fs/btrfs/ioctl.c:2507:40: sparse: incorrect type in argument 2 (different 
>> address spaces) @@expected void const *from @@got struct 
>> btrfs_ioctl_get_subvol_rootref_args [nodervoid const *from @@
   fs/btrfs/ioctl.c:2507:40:expected void const *from
   fs/btrfs/ioctl.c:2507:40:got struct btrfs_ioctl_get_subvol_rootref_args 
[noderef] *rootrefs
>> fs/btrfs/ioctl.c:2512:15: sparse: incorrect type in argument 1 (different 
>> address spaces) @@expected void const * @@got struct 
>> btrfs_ioctl_get_subvol_rootref_args [nodervoid const * @@
   fs/btrfs/ioctl.c:2512:15:expected void const *
   fs/btrfs/ioctl.c:2512:15:got struct btrfs_ioctl_get_subvol_rootref_args 
[noderef] *rootrefs
   fs/btrfs/ioctl.c:3006:24: sparse: incompatible types in comparison 
expression (different address spaces)
   fs/btrfs/ioctl.c:2368:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2370:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2371:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2379:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2380:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2381:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2383:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2384:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2385:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2387:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2388:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2389:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2391:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2392:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2393:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2405:29: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2407:17: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2410:17: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2463:22: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2488:33: sparse: dereference of noderef expression
   

Re: [PATCH v2 1/3] btrfs: Add unprivileged ioctl which returns subvolume information

2018-03-17 Thread kbuild test robot
Hi Tomohiro,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc5 next-20180316]
[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/Misono-Tomohiro/btrfs-Add-three-new-unprivileged-ioctls-to-allow-normal-users-to-call-sub-list-show-etc/20180318-101013
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/ioctl.c:1561:9: sparse: incompatible types in comparison expression 
(different address spaces)
>> fs/btrfs/ioctl.c:2336:21: sparse: incorrect type in assignment (different 
>> address spaces) @@expected struct btrfs_ioctl_get_subvol_info_args 
>> [noderef] *subvol_info @@got sn:1>*subvol_info @@
   fs/btrfs/ioctl.c:2336:21:expected struct 
btrfs_ioctl_get_subvol_info_args [noderef] *subvol_info
   fs/btrfs/ioctl.c:2336:21:got void *
>> fs/btrfs/ioctl.c:2373:9: sparse: incorrect type in argument 1 (different 
>> address spaces) @@expected void *to @@got unsigned char [noderef] 
>> *
   fs/btrfs/ioctl.c:2374:9: sparse: incorrect type in argument 1 (different 
address spaces) @@expected void *to @@got unsigned char [noderef] 
*
   fs/btrfs/ioctl.c:2376:9: sparse: incorrect type in argument 1 (different 
address spaces) @@expected void *to @@got unsigned char [noderef] 
*
>> fs/btrfs/ioctl.c:2416:39: sparse: incorrect type in argument 2 (different 
>> address spaces) @@expected void *dst @@got char [noderef] > *dst @@
   fs/btrfs/ioctl.c:2416:39:expected void *dst
   fs/btrfs/ioctl.c:2416:39:got char [noderef] *
>> fs/btrfs/ioctl.c:2419:32: sparse: incorrect type in argument 2 (different 
>> address spaces) @@expected void const *from @@got struct 
>> btrfs_ioctl_get_subvol_info_args [nodervoid const *from @@
   fs/btrfs/ioctl.c:2419:32:expected void const *from
   fs/btrfs/ioctl.c:2419:32:got struct btrfs_ioctl_get_subvol_info_args 
[noderef] *subvol_info
>> fs/btrfs/ioctl.c:2423:16: sparse: incorrect type in argument 1 (different 
>> address spaces) @@expected void const * @@got struct 
>> btrfs_ioctl_get_subvol_info_args [nodervoid const * @@
   fs/btrfs/ioctl.c:2423:16:expected void const *
   fs/btrfs/ioctl.c:2423:16:got struct btrfs_ioctl_get_subvol_info_args 
[noderef] *subvol_info
   fs/btrfs/ioctl.c:2917:24: sparse: incompatible types in comparison 
expression (different address spaces)
>> fs/btrfs/ioctl.c:2368:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2370:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2371:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2379:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2380:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2381:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2383:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2384:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2385:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2387:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2388:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2389:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2391:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2392:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2393:9: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2405:29: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2407:17: sparse: dereference of noderef expression
   fs/btrfs/ioctl.c:2410:17: sparse: dereference of noderef expression

vim +2336 fs/btrfs/ioctl.c

  2311  
  2312  /* Get the subvolume information in BTRFS_ROOT_ITEM and 
BTRFS_ROOT_BACKREF */
  2313  static noinline int btrfs_ioctl_get_subvol_info(struct file *file,
  2314 void __user *argp)
  2315  {
  2316  struct btrfs_ioctl_get_subvol_info_args __user *subvol_info;
  2317  struct btrfs_root *root;
  2318  struct btrfs_path *path;
  2319  struct btrfs_key key;
  2320  
  2321  struct btrfs_root_item root_item;
  2322  struct btrfs_root_ref *rref;
  2323  struct extent_buffer *l;
  2324  int slot;
  2325  
  2326  unsigned long item_off;
  2327  unsigned long item_len;
  2328  
  2329  struct inode *inode;
  2330  int ret;
  2331  
  2332  path = btrfs_alloc_path();
  2333  if (!path)
  2334  return -ENOMEM;
  2335  
> 2336  subvol_info = kzalloc(sizeof(*subvol_info), GFP_KERNEL);
  2337  if (!subvol_info) {
  2338  btrfs_free_path(path);
  2339 

Re: [PATCH] btrfs: rename btrfs_close_extra_device to btrfs_free_extra_devids

2018-02-28 Thread kbuild test robot
Hi Anand,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on btrfs/next]
[also build test ERROR on v4.16-rc3 next-20180228]
[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/Anand-Jain/btrfs-rename-btrfs_close_extra_device-to-btrfs_free_extra_devids/20180301-120850
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git 
next
config: x86_64-randconfig-x016-201808 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 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 'open_ctree':
>> fs/btrfs/disk-io.c:2783:2: error: implicit declaration of function 
>> 'btrfs_free_extra_devids'; did you mean 'btrfs_free_extra_devid'? 
>> [-Werror=implicit-function-declaration]
 btrfs_free_extra_devids(fs_devices, 0);
 ^~~
 btrfs_free_extra_devid
   cc1: some warnings being treated as errors

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

  2396  
  2397  int open_ctree(struct super_block *sb,
  2398 struct btrfs_fs_devices *fs_devices,
  2399 char *options)
  2400  {
  2401  u32 sectorsize;
  2402  u32 nodesize;
  2403  u32 stripesize;
  2404  u64 generation;
  2405  u64 features;
  2406  struct btrfs_key location;
  2407  struct buffer_head *bh;
  2408  struct btrfs_super_block *disk_super;
  2409  struct btrfs_fs_info *fs_info = btrfs_sb(sb);
  2410  struct btrfs_root *tree_root;
  2411  struct btrfs_root *chunk_root;
  2412  int ret;
  2413  int err = -EINVAL;
  2414  int num_backups_tried = 0;
  2415  int backup_index = 0;
  2416  int max_active;
  2417  int clear_free_space_tree = 0;
  2418  
  2419  tree_root = fs_info->tree_root = btrfs_alloc_root(fs_info, 
GFP_KERNEL);
  2420  chunk_root = fs_info->chunk_root = btrfs_alloc_root(fs_info, 
GFP_KERNEL);
  2421  if (!tree_root || !chunk_root) {
  2422  err = -ENOMEM;
  2423  goto fail;
  2424  }
  2425  
  2426  ret = init_srcu_struct(_info->subvol_srcu);
  2427  if (ret) {
  2428  err = ret;
  2429  goto fail;
  2430  }
  2431  
  2432  ret = percpu_counter_init(_info->dirty_metadata_bytes, 0, 
GFP_KERNEL);
  2433  if (ret) {
  2434  err = ret;
  2435  goto fail_srcu;
  2436  }
  2437  fs_info->dirty_metadata_batch = PAGE_SIZE *
  2438  (1 + ilog2(nr_cpu_ids));
  2439  
  2440  ret = percpu_counter_init(_info->delalloc_bytes, 0, 
GFP_KERNEL);
  2441  if (ret) {
  2442  err = ret;
  2443  goto fail_dirty_metadata_bytes;
  2444  }
  2445  
  2446  ret = percpu_counter_init(_info->bio_counter, 0, GFP_KERNEL);
  2447  if (ret) {
  2448  err = ret;
  2449  goto fail_delalloc_bytes;
  2450  }
  2451  
  2452  INIT_RADIX_TREE(_info->fs_roots_radix, GFP_ATOMIC);
  2453  INIT_RADIX_TREE(_info->buffer_radix, GFP_ATOMIC);
  2454  INIT_LIST_HEAD(_info->trans_list);
  2455  INIT_LIST_HEAD(_info->dead_roots);
  2456  INIT_LIST_HEAD(_info->delayed_iputs);
  2457  INIT_LIST_HEAD(_info->delalloc_roots);
  2458  INIT_LIST_HEAD(_info->caching_block_groups);
  2459  spin_lock_init(_info->delalloc_root_lock);
  2460  spin_lock_init(_info->trans_lock);
  2461  spin_lock_init(_info->fs_roots_radix_lock);
  2462  spin_lock_init(_info->delayed_iput_lock);
  2463  spin_lock_init(_info->defrag_inodes_lock);
  2464  spin_lock_init(_info->tree_mod_seq_lock);
  2465  spin_lock_init(_info->super_lock);
  2466  spin_lock_init(_info->qgroup_op_lock);
  2467  spin_lock_init(_info->buffer_lock);
  2468  spin_lock_init(_info->unused_bgs_lock);
  2469  rwlock_init(_info->tree_mod_log_lock);
  2470  mutex_init(_info->unused_bg_unpin_mutex);
  2471  mutex_init(_info->delete_unused_bgs_mutex);
  2472  mutex_init(_info->reloc_mutex);
  2473  mutex_init(_info->delalloc_root_mutex);
  2474  mutex_init(_info->cleaner_delayed_iput_mutex);
  2475  seqlock_init(_info->profiles_lock);
  2476  
  2477  INIT_LIST_HEAD(_info->dirty_cowonly_roots);
  2478  INIT_LIST_HEAD(_info->space_info);
  2479  INIT_LIST_HEAD(_info->tree_mod_seq_list);
  2480  INIT_LIST_HEAD(_info->unused_bgs);
  2481  btrfs_mapping_init(_info->mapping_tree);
  2482  btrfs_init_block_rsv(_info->global_block_rsv,
  2483

[RFC PATCH josef-btrfs] block: blkcg_qos_init() can be static

2018-02-15 Thread kbuild test robot

Fixes: 6389939532e7 ("block: introduce blkcg-qos io controller")
Signed-off-by: Fengguang Wu 
---
 blkcg-qos.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blkcg-qos.c b/block/blkcg-qos.c
index a28adcc..6588b1c 100644
--- a/block/blkcg-qos.c
+++ b/block/blkcg-qos.c
@@ -337,7 +337,7 @@ static struct rq_qos_ops blkcg_qos_ops = {
.done_bio = blkcg_qos_done_bio,
 };
 
-int blkcg_qos_init(struct request_queue *q)
+static int blkcg_qos_init(struct request_queue *q)
 {
struct blkcg_qos *blkqos;
struct rq_qos *rqos;
--
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


[josef-btrfs:blk-qos 13/13] block/blkcg-qos.c:340:5: sparse: symbol 'blkcg_qos_init' was not declared. Should it be static?

2018-02-15 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-qos
head:   6389939532e7f4a0d8f19f9efc8a4936f8368d29
commit: 6389939532e7f4a0d8f19f9efc8a4936f8368d29 [13/13] block: introduce 
blkcg-qos io controller
reproduce:
# apt-get install sparse
git checkout 6389939532e7f4a0d8f19f9efc8a4936f8368d29
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


Please review and possibly fold the followup patch.

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


[josef-btrfs:current-work 3/3] block/blk-wbt.c:1014:33: error: 'struct blkcg' has no member named 'css'

2018-02-15 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
current-work
head:   8e6eb5db8cf85a5af945098166954454c3169b29
commit: 8e6eb5db8cf85a5af945098166954454c3169b29 [3/3] current-work
config: x86_64-randconfig-s0-02160955 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
git checkout 8e6eb5db8cf85a5af945098166954454c3169b29
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from include/linux/blkdev.h:21:0,
from include/linux/backing-dev.h:15,
from block/blk-wbt.c:24:
   include/linux/bio.h:521:55: warning: 'struct blkcg_gq' declared inside 
parameter list will not be visible outside of this definition or declaration
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
  ^~~~
   block/blk-wbt.c: In function 'blkcg_qos_throttle':
>> block/blk-wbt.c:1014:33: error: 'struct blkcg' has no member named 'css'
 bio_associate_blkcg(bio, >css);
^~
>> block/blk-wbt.c:1019:10: error: implicit declaration of function 
>> 'blkg_lookup_create' [-Werror=implicit-function-declaration]
  blkg = blkg_lookup_create(blkcg, q);
 ^~
   block/blk-wbt.c:1019:8: warning: assignment makes pointer from integer 
without a cast [-Wint-conversion]
  blkg = blkg_lookup_create(blkcg, q);
   ^
>> block/blk-wbt.c:1028:26: error: passing argument 2 of 'bio_associate_blkg' 
>> from incompatible pointer type [-Werror=incompatible-pointer-types]
 bio_associate_blkg(bio, blkg);
 ^~~~
   In file included from include/linux/blkdev.h:21:0,
from include/linux/backing-dev.h:15,
from block/blk-wbt.c:24:
   include/linux/bio.h:521:12: note: expected 'struct blkcg_gq *' but argument 
is of type 'struct blkcg_gq *'
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
   ^~
>> block/blk-wbt.c:1039:26: error: 'struct bio' has no member named 
>> 'bi_issue_stat'
  blk_stat_set_issue(>bi_issue_stat, bio_sectors(bio));
 ^~
   block/blk-wbt.c: In function 'blkcg_qos_done_bio':
>> block/blk-wbt.c:1114:12: error: 'struct bio' has no member named 'bi_blkg'; 
>> did you mean 'bi_flags'?
 blkg = bio->bi_blkg;
   ^~
   block/blk-wbt.c:1124:26: error: 'struct bio' has no member named 
'bi_issue_stat'
 qos_record_time(qg, >bi_issue_stat, now);
 ^~
   block/blk-wbt.c: In function 'qos_set_min_lat_nsec':
>> block/blk-wbt.c:1180:13: error: 'struct blkcg_gq' has no member named 
>> 'parent'
 while (blkg->parent) {
^~
   block/blk-wbt.c:1181:44: error: 'struct blkcg_gq' has no member named 
'parent'
  struct qos_grp *this_qg = blkg_to_qg(blkg->parent);
   ^~
   block/blk-wbt.c:1183:14: error: 'struct blkcg_gq' has no member named 
'parent'
  blkg = blkg->parent;
 ^~
   block/blk-wbt.c: In function 'qos_set_limit':
>> block/blk-wbt.c:1195:24: error: implicit declaration of function 
>> 'css_to_blkcg' [-Werror=implicit-function-declaration]
 struct blkcg *blkcg = css_to_blkcg(of_css(of));
   ^~~~
   block/blk-wbt.c:1195:24: warning: initialization makes pointer from integer 
without a cast [-Wint-conversion]
>> block/blk-wbt.c:1199:23: error: storage size of 'ctx' isn't known
 struct blkg_conf_ctx ctx;
  ^~~
>> block/blk-wbt.c:1206:8: error: implicit declaration of function 
>> 'blkg_conf_prep' [-Werror=implicit-function-declaration]
 ret = blkg_conf_prep(blkcg, _policy_qos, buf, );
   ^~
>> block/blk-wbt.c:1230:2: error: implicit declaration of function 
>> 'blkg_for_each_descendant_pre' [-Werror=implicit-function-declaration]
 blkg_for_each_descendant_pre(blkg, pos_css, ctx.blkg)
 ^~~~
>> block/blk-wbt.c:1231:3: error: expected ';' before 'qos_set_min_lat_nsec'
  qos_set_min_lat_nsec(blkg, 1);
  ^~~~
>> block/blk-wbt.c:1234:2: error: implicit declaration of function 
>> 'blkg_conf_finish' [-Werror=implicit-function-declaration]
 blkg_conf_finish();
 ^~~~
   block/blk-wbt.c:1199:23: warning: unused variable 'ctx' [-Wunused-variable]
 struct blkg_conf_ctx ctx;
  ^~~
   block/blk-wbt.c: In function 'qg_prfill_limit':
>> block/blk-wbt.c:1242:22: error: implicit declaration of function 
>> 'blkg_dev_name' [-Werror=implicit-function-declaration]
 const char *dname = blkg_dev_name(pd->blkg);
 ^
>> block/blk-wbt.c:1242:38: error: 'struct blkg_policy_data' has no member 
>> named 'blkg'
 

[josef-btrfs:blk-qos 2/13] include/linux/bio.h:521:12: error: 'bio_associate_blkg' defined but not used

2018-02-15 Thread kbuild test robot
Hi Josef,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-qos
head:   6389939532e7f4a0d8f19f9efc8a4936f8368d29
commit: 4ece201cfafab298cd89083567403a53f0971635 [2/13] block: add bi_blkg to 
the bio for cgroups
config: sparc64-defconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 4ece201cfafab298cd89083567403a53f0971635
# save the attached .config to linux build tree
make.cross ARCH=sparc64 

All errors (new ones prefixed by >>):

   In file included from include/linux/blkdev.h:21:0,
from include/linux/backing-dev.h:15,
from include/linux/nfs_fs_sb.h:6,
from include/linux/nfs_fs.h:39,
from arch/sparc/kernel/sys_sparc32.c:25:
   include/linux/bio.h:521:55: error: 'struct blkcg_gq' declared inside 
parameter list will not be visible outside of this definition or declaration 
[-Werror]
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
  ^~~~
>> include/linux/bio.h:521:12: error: 'bio_associate_blkg' defined but not used 
>> [-Werror=unused-function]
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
   ^~
   cc1: all warnings being treated as errors

vim +/bio_associate_blkg +521 include/linux/bio.h

   506  
   507  #define bio_dev(bio) \
   508  disk_devt((bio)->bi_disk)
   509  
   510  #define bio_devname(bio, buf) \
   511  __bdevname(bio_dev(bio), (buf))
   512  
   513  #ifdef CONFIG_BLK_CGROUP
   514  int bio_associate_blkcg(struct bio *bio, struct cgroup_subsys_state 
*blkcg_css);
   515  int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg);
   516  void bio_disassociate_task(struct bio *bio);
   517  void bio_clone_blkcg_association(struct bio *dst, struct bio *src);
   518  #else   /* CONFIG_BLK_CGROUP */
   519  static inline int bio_associate_blkcg(struct bio *bio,
   520  struct cgroup_subsys_state *blkcg_css) { return 
0; }
 > 521  static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
 > return 0; }
   522  static inline void bio_disassociate_task(struct bio *bio) { }
   523  static inline void bio_clone_blkcg_association(struct bio *dst,
   524  struct bio *src) { }
   525  #endif  /* CONFIG_BLK_CGROUP */
   526  

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


.config.gz
Description: application/gzip


[josef-btrfs:current-work 3/3] block/bio.c:1801:2: error: implicit declaration of function 'rq_qos_done_bio'; did you mean 'rq_qos_id'?

2018-02-07 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
current-work
head:   71fe7e0ab249e42c17f387951aa09de7cb362d35
commit: 71fe7e0ab249e42c17f387951aa09de7cb362d35 [3/3] current-work
config: x86_64-randconfig-x008-201805 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout 71fe7e0ab249e42c17f387951aa09de7cb362d35
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from block/bio.c:20:0:
   include/linux/bio.h:521:55: warning: 'struct blkcg_gq' declared inside 
parameter list will not be visible outside of this definition or declaration
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
  ^~~~
   block/bio.c: In function 'bio_endio':
>> block/bio.c:1801:2: error: implicit declaration of function 
>> 'rq_qos_done_bio'; did you mean 'rq_qos_id'? 
>> [-Werror=implicit-function-declaration]
 rq_qos_done_bio(bio->bi_disk->queue, bio);
 ^~~
 rq_qos_id
   In file included from block/bio.c:20:0:
   At top level:
   include/linux/bio.h:521:12: warning: 'bio_associate_blkg' defined but not 
used [-Wunused-function]
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
   ^~
   cc1: some warnings being treated as errors
--
   In file included from include/linux/blkdev.h:21:0,
from include/linux/backing-dev.h:15,
from block/blk-core.c:16:
   include/linux/bio.h:521:55: warning: 'struct blkcg_gq' declared inside 
parameter list will not be visible outside of this definition or declaration
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
  ^~~~
   block/blk-core.c: In function 'blk_requeue_request':
>> block/blk-core.c:1545:2: error: implicit declaration of function 
>> 'rq_qos_requeue'; did you mean 'wbt_requeue'? 
>> [-Werror=implicit-function-declaration]
 rq_qos_requeue(q, >issue_stat);
 ^~
 wbt_requeue
   block/blk-core.c: In function '__blk_put_request':
>> block/blk-core.c:1651:2: error: implicit declaration of function 
>> 'rq_qos_done'; did you mean 'rq_qos_add'? 
>> [-Werror=implicit-function-declaration]
 rq_qos_done(q, >issue_stat);
 ^~~
 rq_qos_add
   block/blk-core.c: In function 'blk_queue_bio':
>> block/blk-core.c:1943:12: error: implicit declaration of function 
>> 'rq_qos_throttle' [-Werror=implicit-function-declaration]
 wb_acct = rq_qos_throttle(q, bio, q->queue_lock);
   ^~~
>> block/blk-core.c:1953:3: error: implicit declaration of function 
>> 'rq_qos_cleanup'; did you mean 'rq_qos_add'? 
>> [-Werror=implicit-function-declaration]
  rq_qos_cleanup(q, wb_acct);
  ^~
  rq_qos_add
   block/blk-core.c: In function 'blk_start_request':
>> block/blk-core.c:2841:3: error: implicit declaration of function 
>> 'rq_qos_issue'; did you mean 'rq_qos_id'? 
>> [-Werror=implicit-function-declaration]
  rq_qos_issue(req->q, >issue_stat);
  ^~~~
  rq_qos_id
   In file included from include/linux/blkdev.h:21:0,
from include/linux/backing-dev.h:15,
from block/blk-core.c:16:
   At top level:
   include/linux/bio.h:521:12: warning: 'bio_associate_blkg' defined but not 
used [-Wunused-function]
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
   ^~
   cc1: some warnings being treated as errors
--
   In file included from block/blk-sysfs.c:8:0:
   include/linux/bio.h:521:55: warning: 'struct blkcg_gq' declared inside 
parameter list will not be visible outside of this definition or declaration
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
  ^~~~
   block/blk-sysfs.c: In function 'queue_wb_lat_show':
>> block/blk-sysfs.c:432:41: error: implicit declaration of function 
>> 'wbt_get_min_lat'; did you mean 'bdi_set_min_ratio'? 
>> [-Werror=implicit-function-declaration]
 return sprintf(page, "%llu\n", div_u64(wbt_get_min_lat(q), 1000));
^~~
bdi_set_min_ratio
   block/blk-sysfs.c: In function 'queue_wb_lat_store':
>> block/blk-sysfs.c:460:2: error: implicit declaration of function 
>> 'wbt_set_min_lat'; did you mean 'bdi_set_min_ratio'? 
>> [-Werror=implicit-function-declaration]
 wbt_set_min_lat(q, val);
 ^~~
 bdi_set_min_ratio
>> block/blk-sysfs.c:462:20: error: passing argument 1 of 'wbt_update_limits' 
>> from incompatible pointer type [-Werror=incompatible-pointer-types]
 wbt_update_limits(q);
  

[josef-btrfs:current-work 3/3] block/blk-wbt.c:1005:33: error: 'struct blkcg' has no member named 'css'

2018-02-07 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
current-work
head:   71fe7e0ab249e42c17f387951aa09de7cb362d35
commit: 71fe7e0ab249e42c17f387951aa09de7cb362d35 [3/3] current-work
config: i386-randconfig-x010-201805 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout 71fe7e0ab249e42c17f387951aa09de7cb362d35
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from include/linux/blkdev.h:21:0,
from include/linux/backing-dev.h:15,
from block/blk-wbt.c:24:
   include/linux/bio.h:521:55: warning: 'struct blkcg_gq' declared inside 
parameter list will not be visible outside of this definition or declaration
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
  ^~~~
   block/blk-wbt.c: In function 'blkcg_qos_throttle':
>> block/blk-wbt.c:1005:33: error: 'struct blkcg' has no member named 'css'
 bio_associate_blkcg(bio, >css);
^~
   block/blk-wbt.c:1010:10: error: implicit declaration of function 
'blkg_lookup_create'; did you mean 'blk_lookup_devt'? 
[-Werror=implicit-function-declaration]
  blkg = blkg_lookup_create(blkcg, q);
 ^~
 blk_lookup_devt
   block/blk-wbt.c:1010:8: warning: assignment makes pointer from integer 
without a cast [-Wint-conversion]
  blkg = blkg_lookup_create(blkcg, q);
   ^
>> block/blk-wbt.c:1019:26: error: passing argument 2 of 'bio_associate_blkg' 
>> from incompatible pointer type [-Werror=incompatible-pointer-types]
 bio_associate_blkg(bio, blkg);
 ^~~~
   In file included from include/linux/blkdev.h:21:0,
from include/linux/backing-dev.h:15,
from block/blk-wbt.c:24:
   include/linux/bio.h:521:12: note: expected 'struct blkcg_gq *' but argument 
is of type 'struct blkcg_gq *'
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
   ^~
>> block/blk-wbt.c:1030:26: error: 'struct bio' has no member named 
>> 'bi_issue_stat'
  blk_stat_set_issue(>bi_issue_stat, bio_sectors(bio));
 ^~
   block/blk-wbt.c: In function 'blkcg_qos_done_bio':
>> block/blk-wbt.c:1105:14: error: 'struct bio' has no member named 'bi_blkg'; 
>> did you mean 'bi_flags'?
 blkg = bio->bi_blkg;
 ^~~
 bi_flags
   block/blk-wbt.c:1112:26: error: 'struct bio' has no member named 
'bi_issue_stat'
 qos_record_time(qg, >bi_issue_stat, now);
 ^~
   block/blk-wbt.c: In function 'qos_set_min_lat_nsec':
   block/blk-wbt.c:1167:13: error: 'struct blkcg_gq' has no member named 
'parent'
 while (blkg->parent) {
^~
   block/blk-wbt.c:1168:44: error: 'struct blkcg_gq' has no member named 
'parent'
  struct qos_grp *this_qg = blkg_to_qg(blkg->parent);
   ^~
   block/blk-wbt.c:1170:14: error: 'struct blkcg_gq' has no member named 
'parent'
  blkg = blkg->parent;
 ^~
   block/blk-wbt.c: In function 'qos_set_limit':
   block/blk-wbt.c:1182:24: error: implicit declaration of function 
'css_to_blkcg'; did you mean 'qg_to_blkg'? 
[-Werror=implicit-function-declaration]
 struct blkcg *blkcg = css_to_blkcg(of_css(of));
   ^~~~
   qg_to_blkg
   block/blk-wbt.c:1182:24: warning: initialization makes pointer from integer 
without a cast [-Wint-conversion]
   block/blk-wbt.c:1186:23: error: storage size of 'ctx' isn't known
 struct blkg_conf_ctx ctx;
  ^~~
   block/blk-wbt.c:1193:8: error: implicit declaration of function 
'blkg_conf_prep'; did you mean 'blkg_to_pd'? 
[-Werror=implicit-function-declaration]
 ret = blkg_conf_prep(blkcg, _policy_qos, buf, );
   ^~
   blkg_to_pd
   block/blk-wbt.c:1217:2: error: implicit declaration of function 
'blkg_for_each_descendant_pre'; did you mean 'css_for_each_descendant_pre'? 
[-Werror=implicit-function-declaration]
 blkg_for_each_descendant_pre(blkg, pos_css, ctx.blkg)
 ^~~~
 css_for_each_descendant_pre
>> block/blk-wbt.c:1218:3: error: expected ';' before 'qos_set_min_lat_nsec'
  qos_set_min_lat_nsec(blkg, 1);
  ^~~~
>> block/blk-wbt.c:1221:2: error: implicit declaration of function 
>> 'blkg_conf_finish'; did you mean 'blkcg_qos_init'? 
>> [-Werror=implicit-function-declaration]
 blkg_conf_finish();
 ^~~~
 blkcg_qos_init
   block/blk-wbt.c:1186:23: warning: unused variable 'ctx' [-Wunused-variable]
 struct blkg_conf_ctx ctx;
  ^~~
   block/blk-wbt.c: In function 

[josef-btrfs:current-work 3/3] block/blk-wbt.h:96:1: sparse: two or more data types in declaration specifiers

2018-02-02 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
current-work
head:   1ac686f6d1b04b480cd245fb927180e1238bd3ac
commit: 1ac686f6d1b04b480cd245fb927180e1238bd3ac [3/3] current-work
reproduce:
# apt-get install sparse
git checkout 1ac686f6d1b04b480cd245fb927180e1238bd3ac
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> block/blk-wbt.h:96:1: sparse: two or more data types in declaration 
>> specifiers
>> block/blk-wbt.h:96:1: sparse: Trying to use reserved word 'struct' as 
>> identifier
   block/blk-wbt.h:96:8: sparse: Expected ; at end of declaration
   block/blk-wbt.h:96:8: sparse: got rq_qos
   block/blk-wbt.h:100:1: sparse: Expected ; at the end of type declaration
   block/blk-wbt.h:100:1: sparse: got }
   In file included from block/elevator.c:44:0:
   block/blk-wbt.h:89:36: warning: 'struct rq_qos' declared inside parameter 
list will not be visible outside of this definition or declaration
enum wbt_flags rq_qos struct bio
^~
   block/blk-wbt.h:91:23: warning: 'struct rq_qos' declared inside parameter 
list will not be visible outside of this definition or declaration
void rq_qos struct blk_issue_stat
^~
   block/blk-wbt.h:92:25: warning: 'struct rq_qos' declared inside parameter 
list will not be visible outside of this definition or declaration
void rq_qos struct blk_issue_stat
^~
   block/blk-wbt.h:93:26: warning: 'struct rq_qos' declared inside parameter 
list will not be visible outside of this definition or declaration
void rq_qos struct blk_issue_stat
^~
   block/blk-wbt.h:96:1: error: expected ';', identifier or '(' before 'struct'
struct rq_qos {
^~
   block/blk-wbt.h:123:8: error: redefinition of 'struct rq_qos'
struct rq_qos {
^~
   block/blk-wbt.h:96:8: note: originally defined here
struct rq_qos {
^~
   block/blk-wbt.h: In function 'rq_qos_add':
   block/blk-wbt.h:169:16: error: 'struct request_queue' has no member named 
'rqos'
rqos->next = q->rqos;
^~
   block/blk-wbt.h:170:3: error: 'struct request_queue' has no member named 
'rqos'
q->rqos = rqos;
^~
--
>> block/blk-wbt.h:96:1: sparse: two or more data types in declaration 
>> specifiers
>> block/blk-wbt.h:96:1: sparse: Trying to use reserved word 'struct' as 
>> identifier
   block/blk-wbt.h:96:8: sparse: Expected ; at end of declaration
   block/blk-wbt.h:96:8: sparse: got rq_qos
   block/blk-wbt.h:100:1: sparse: Expected ; at the end of type declaration
   block/blk-wbt.h:100:1: sparse: got }
   block/blk-sysfs.c:432:56: sparse: no member 'min_lat_nsec' in struct rq_wb
   block/blk-sysfs.c:457:20: sparse: no member 'min_lat_nsec' in struct rq_wb
   block/blk-sysfs.c:459:20: sparse: no member 'min_lat_nsec' in struct rq_wb
   In file included from block/blk-sysfs.c:18:0:
   block/blk-wbt.h:89:36: warning: 'struct rq_qos' declared inside parameter 
list will not be visible outside of this definition or declaration
enum wbt_flags rq_qos struct bio
^~
   block/blk-wbt.h:91:23: warning: 'struct rq_qos' declared inside parameter 
list will not be visible outside of this definition or declaration
void rq_qos struct blk_issue_stat
^~
   block/blk-wbt.h:92:25: warning: 'struct rq_qos' declared inside parameter 
list will not be visible outside of this definition or declaration
void rq_qos struct blk_issue_stat
^~
   block/blk-wbt.h:93:26: warning: 'struct rq_qos' declared inside parameter 
list will not be visible outside of this definition or declaration
void rq_qos struct blk_issue_stat
^~
   block/blk-wbt.h:96:1: error: expected ';', identifier or '(' before 'struct'
struct rq_qos {
^~
   block/blk-wbt.h:123:8: error: redefinition of 'struct rq_qos'
struct rq_qos {
^~
   block/blk-wbt.h:96:8: note: originally defined here
struct rq_qos {
^~
   block/blk-wbt.h: In function 'rq_qos_add':
   block/blk-wbt.h:169:16: error: 'struct request_queue' has no member named 
'rqos'
rqos->next = q->rqos;
^~
   block/blk-wbt.h:170:3: error: 'struct request_queue' has no member named 
'rqos'
q->rqos = rqos;
^~
   block/blk-sysfs.c: In function 'queue_wb_lat_show':
   block/blk-sysfs.c:432:49: error: 'struct rq_wb' has no member named 
'min_lat_nsec'
return sprintf(page, "%llun", div_u64(q->rq_wb->min_lat_nsec, 1000));
^~
   block/blk-sysfs.c: In function 'queue_wb_lat_store':
   block/blk-sysfs.c:457:6: error: 'struct rq_wb' has no member named 
'min_lat_nsec'
rwb->min_lat_nsec = wbt_default_latency_nsec(q);
^~
   block/blk-sysfs.c:459:6: error: 'struct rq_wb' has no member named 
'min_lat_nsec'
rwb->min_lat_nsec = val COPYING CREDITS Documentation Kbuild Kconfig 
MAINTAINERS Makefile README arch block certs crypto drivers firmware fs include 
init ipc kernel lib mm net samples scripts security sound tools usr virt 

[josef-btrfs:current-work 3/3] block/blk-wbt.c:919:1-10: alloc with no test, possible model on line 924

2018-02-02 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
current-work
head:   1ac686f6d1b04b480cd245fb927180e1238bd3ac
commit: 1ac686f6d1b04b480cd245fb927180e1238bd3ac [3/3] current-work


coccinelle warnings: (new ones prefixed by >>)

>> block/blk-wbt.c:919:1-10: alloc with no test, possible model on line 924

vim +919 block/blk-wbt.c

   910  
   911  static int blkcg_qos_init(struct request_queue *q)
   912  {
   913  struct blkcg_qos *blkcg_qos;
   914  struct rq_qos *rqos;
   915  int i;
   916  
   917  BUILD_BUG_ON(WBT_NR_BITS > BLK_STAT_RES_BITS);
   918  
 > 919  blkcg_qos = kzalloc(sizeof(*blkcg_qos), GFP_KERNEL);
   920  if (!rwb)
   921  return -ENOMEM;
   922  
   923  rqos = _qos->rqos;
 > 924  rqos->cb = blk_stat_alloc_callback(qos_timer_fn, wbt_data_dir, 
 > 2,
   925 blkcg_qos);
   926  if (!rqos->cb) {
   927  kfree(blkcg_qos);
   928  return -ENOMEM;
   929  }
   930  
   931  rq_qos_add(q, rqos);
   932  blk_stat_add_callback(q, rqos->cb);
   933  atomic_set(_qos->scale_cookie, DEFAULT_SCALE_COOKIE);
   934  blkcg_qos->scale_lat = 0;
   935  #if 0
   936  for (i = 0; i < WBT_NUM_RWQ; i++) {
   937  atomic_set(>rq_wait[i].inflight, 0);
   938  init_waitqueue_head(>rq_wait[i].wait);
   939  }
   940  
   941  rwb->enable_state = WBT_STATE_ON_DEFAULT;
   942  wbt_update_limits(rwb);
   943  
   944  /*
   945   * Assign rwb and add the stats callback.
   946   */
   947  if (q->rq_wb)
   948  q->rq_wb->next = rwb;
   949  else (q->rq_wb)
   950  q->rq_wb = rwb;
   951  blk_stat_add_callback(q, rwb->cb);
   952  
   953  rwb->min_lat_nsec = wbt_default_latency_nsec(q);
   954  
   955  wbt_set_queue_depth(rwb, blk_queue_depth(q));
   956  wbt_set_write_cache(rwb, test_bit(QUEUE_FLAG_WC, 
>queue_flags));
   957  #endif
   958  return 0;
   959  }
   960  

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


[josef-btrfs:current-work 3/3] block/blk-wbt.c:866:32: error: 'struct rq_qos' has no member named 'q'

2018-02-02 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
current-work
head:   1ac686f6d1b04b480cd245fb927180e1238bd3ac
commit: 1ac686f6d1b04b480cd245fb927180e1238bd3ac [3/3] current-work
config: x86_64-randconfig-x008-201804 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
git checkout 1ac686f6d1b04b480cd245fb927180e1238bd3ac
# save the attached .config to linux build tree
make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from block/blk-wbt.c:23:
   block/blk-wbt.c:463:23: error: 'struct rq_wb' has no member named 'last_comp'
  time_before(now, rwb->last_comp + HZ / 10);
  ^
   include/linux/jiffies.h:105:18: note: in definition of macro 'time_after'
  ((long)((b) - (a)) < 0))
 ^
   block/blk-wbt.c:463:3: note: in expansion of macro 'time_before'
  time_before(now, rwb->last_comp + HZ / 10);
  ^~~
   block/blk-wbt.c: In function 'get_limit':
   block/blk-wbt.c:481:16: error: 'struct rq_wb' has no member named 'wb_max'; 
did you mean 'wb_normal'?
  limit = rwb->wb_max;
   ^~
   wb_normal
   block/blk-wbt.c: In function 'wbt_wait':
   block/blk-wbt.c:587:28: error: 'struct rq_wb' has no member named 
'last_issue'; did you mean 'sync_issue'?
   wb_timestamp(rwb, >last_issue);
   ^~
   sync_issue
   block/blk-wbt.c:593:29: error: 'struct rq_wb' has no member named 'cb'
 if (!blk_stat_is_active(rwb->cb))
^~
   block/blk-wbt.c: In function 'wbt_set_queue_depth':
   block/blk-wbt.c:634:8: error: 'struct rq_wb' has no member named 
'queue_depth'; did you mean 'rq_depth'?
  rwb->queue_depth = depth;
   ^~~
   rq_depth
   block/blk-wbt.c: In function 'wbt_set_write_cache':
   block/blk-wbt.c:642:6: error: 'struct rq_wb' has no member named 'wc'
  rwb->wc = write_cache_on;
 ^~
   block/blk-wbt.c: In function 'wbt_init':
   block/blk-wbt.c:704:5: error: 'struct rq_wb' has no member named 'cb'
 rwb->cb = blk_stat_alloc_callback(wb_timer_fn, wbt_data_dir, 2, rwb);
^~
   block/blk-wbt.c:705:10: error: 'struct rq_wb' has no member named 'cb'
 if (!rwb->cb) {
 ^~
   block/blk-wbt.c:713:5: error: 'struct rq_wb' has no member named 'last_comp'
 rwb->last_comp = rwb->last_issue = jiffies;
^~
   block/blk-wbt.c:713:24: error: 'struct rq_wb' has no member named 
'last_issue'; did you mean 'sync_issue'?
 rwb->last_comp = rwb->last_issue = jiffies;
   ^~
   sync_issue
   block/blk-wbt.c:715:5: error: 'struct rq_wb' has no member named 'win_nsec'
 rwb->win_nsec = RWB_WINDOW_NSEC;
^~
   block/blk-wbt.c:723:30: error: 'struct rq_wb' has no member named 'cb'
 blk_stat_add_callback(q, rwb->cb);
 ^~
   block/blk-wbt.c:725:5: error: 'struct rq_wb' has no member named 
'min_lat_nsec'
 rwb->min_lat_nsec = wbt_default_latency_nsec(q);
^~
   block/blk-wbt.c: In function 'blk_qos_exit':
   block/blk-wbt.c:743:12: error: 'struct request_queue' has no member named 
'rwb'; did you mean 'rq_wb'?
 while (q->rwb) {
   ^~~
   rq_wb
   block/blk-wbt.c:744:26: error: 'struct request_queue' has no member named 
'rq_rwb'; did you mean 'rq_wb'?
  struct rq_wb *rwb = q->rq_rwb;
 ^~
 rq_wb
   block/blk-wbt.c:745:17: error: 'struct rq_wb' has no member named 'next'
  q->rq_wb = rwb->next;
^~
   block/blk-wbt.c:746:34: error: 'struct rq_wb' has no member named 'cb'
  blk_stat_remove_callback(q, rwb->cb);
 ^~
   block/blk-wbt.c:747:29: error: 'struct rq_wb' has no member named 'cb'
  blk_stat_free_callback(rwb->cb);
^~
   block/blk-wbt.c: In function 'blkg_to_qg':
   block/blk-wbt.c:783:9: error: implicit declaration of function 'pd_to_tg'; 
did you mean 'pd_to_qg'? [-Werror=implicit-function-declaration]
 return pd_to_tg(blkg_to_pd(blkg, _policy_qos));
^~~~
pd_to_qg
   block/blk-wbt.c:783:9: warning: return makes pointer from integer without a 
cast [-Wint-conversion]
 return pd_to_tg(blkg_to_pd(blkg, _policy_qos));
^
   block/blk-wbt.c: In function 'check_scale_change':
   block/blk-wbt.c:853:14: error: passing argument 1 of 'scale_down' from 
incompatible pointer type [-Werror=incompatible-pointer-types]
  scale_down(>rq_wait, false);
 ^
   block/blk-wbt.c:334:13: note: expected 'struct rq_depth *' but argument is 
of type 'struct rq_wait *'
   

[josef-btrfs:current-work 2/3] include/linux/bio.h:521:55: warning: 'struct blkcg_gq' declared inside parameter list

2018-02-02 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
current-work
head:   1ac686f6d1b04b480cd245fb927180e1238bd3ac
commit: 4ece201cfafab298cd89083567403a53f0971635 [2/3] block: add bi_blkg to 
the bio for cgroups
config: i386-randconfig-a1-201804 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
git checkout 4ece201cfafab298cd89083567403a53f0971635
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/linux/blkdev.h:21:0,
from include/linux/backing-dev.h:15,
from fs/open.c:15:
>> include/linux/bio.h:521:55: warning: 'struct blkcg_gq' declared inside 
>> parameter list
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
  ^
>> include/linux/bio.h:521:55: warning: its scope is only this definition or 
>> declaration, which is probably not what you want
   include/linux/bio.h:521:12: warning: 'bio_associate_blkg' defined but not 
used [-Wunused-function]
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
   ^

vim +521 include/linux/bio.h

   506  
   507  #define bio_dev(bio) \
   508  disk_devt((bio)->bi_disk)
   509  
   510  #define bio_devname(bio, buf) \
   511  __bdevname(bio_dev(bio), (buf))
   512  
   513  #ifdef CONFIG_BLK_CGROUP
   514  int bio_associate_blkcg(struct bio *bio, struct cgroup_subsys_state 
*blkcg_css);
   515  int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg);
   516  void bio_disassociate_task(struct bio *bio);
   517  void bio_clone_blkcg_association(struct bio *dst, struct bio *src);
   518  #else   /* CONFIG_BLK_CGROUP */
   519  static inline int bio_associate_blkcg(struct bio *bio,
   520  struct cgroup_subsys_state *blkcg_css) { return 
0; }
 > 521  static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
 > return 0; }
   522  static inline void bio_disassociate_task(struct bio *bio) { }
   523  static inline void bio_clone_blkcg_association(struct bio *dst,
   524  struct bio *src) { }
   525  #endif  /* CONFIG_BLK_CGROUP */
   526  

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


.config.gz
Description: application/gzip


[josef-btrfs:current-work 3/3] block/blk-wbt.c:876:10: error: implicit declaration of function 'blkg_lookup_create'; did you mean 'blk_lookup_devt'?

2018-02-02 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
current-work
head:   1ac686f6d1b04b480cd245fb927180e1238bd3ac
commit: 1ac686f6d1b04b480cd245fb927180e1238bd3ac [3/3] current-work
config: x86_64-randconfig-x005-201804 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
git checkout 1ac686f6d1b04b480cd245fb927180e1238bd3ac
# save the attached .config to linux build tree
make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   include/linux/jiffies.h:105:18: note: in definition of macro 'time_after'
  ((long)((b) - (a)) < 0))
 ^
   block/blk-wbt.c:463:3: note: in expansion of macro 'time_before'
  time_before(now, rwb->last_comp + HZ / 10);
  ^~~
   block/blk-wbt.c: In function 'get_limit':
   block/blk-wbt.c:481:16: error: 'struct rq_wb' has no member named 'wb_max'; 
did you mean 'wb_normal'?
  limit = rwb->wb_max;
   ^~
   wb_normal
   block/blk-wbt.c: In function 'wbt_wait':
   block/blk-wbt.c:587:28: error: 'struct rq_wb' has no member named 
'last_issue'; did you mean 'sync_issue'?
   wb_timestamp(rwb, >last_issue);
   ^~
   sync_issue
   block/blk-wbt.c:593:29: error: 'struct rq_wb' has no member named 'cb'
 if (!blk_stat_is_active(rwb->cb))
^~
   block/blk-wbt.c: In function 'wbt_set_queue_depth':
   block/blk-wbt.c:634:8: error: 'struct rq_wb' has no member named 
'queue_depth'; did you mean 'rq_depth'?
  rwb->queue_depth = depth;
   ^~~
   rq_depth
   block/blk-wbt.c: In function 'wbt_set_write_cache':
   block/blk-wbt.c:642:6: error: 'struct rq_wb' has no member named 'wc'
  rwb->wc = write_cache_on;
 ^~
   block/blk-wbt.c: In function 'wbt_init':
   block/blk-wbt.c:704:5: error: 'struct rq_wb' has no member named 'cb'
 rwb->cb = blk_stat_alloc_callback(wb_timer_fn, wbt_data_dir, 2, rwb);
^~
   block/blk-wbt.c:705:10: error: 'struct rq_wb' has no member named 'cb'
 if (!rwb->cb) {
 ^~
   block/blk-wbt.c:713:5: error: 'struct rq_wb' has no member named 'last_comp'
 rwb->last_comp = rwb->last_issue = jiffies;
^~
   block/blk-wbt.c:713:24: error: 'struct rq_wb' has no member named 
'last_issue'; did you mean 'sync_issue'?
 rwb->last_comp = rwb->last_issue = jiffies;
   ^~
   sync_issue
   block/blk-wbt.c:715:5: error: 'struct rq_wb' has no member named 'win_nsec'
 rwb->win_nsec = RWB_WINDOW_NSEC;
^~
   block/blk-wbt.c:723:30: error: 'struct rq_wb' has no member named 'cb'
 blk_stat_add_callback(q, rwb->cb);
 ^~
   block/blk-wbt.c:725:5: error: 'struct rq_wb' has no member named 
'min_lat_nsec'
 rwb->min_lat_nsec = wbt_default_latency_nsec(q);
^~
   block/blk-wbt.c: In function 'blk_qos_exit':
   block/blk-wbt.c:743:12: error: 'struct request_queue' has no member named 
'rwb'; did you mean 'rq_wb'?
 while (q->rwb) {
   ^~~
   rq_wb
   block/blk-wbt.c:744:26: error: 'struct request_queue' has no member named 
'rq_rwb'; did you mean 'rq_wb'?
  struct rq_wb *rwb = q->rq_rwb;
 ^~
 rq_wb
   block/blk-wbt.c:745:17: error: 'struct rq_wb' has no member named 'next'
  q->rq_wb = rwb->next;
^~
   block/blk-wbt.c:746:34: error: 'struct rq_wb' has no member named 'cb'
  blk_stat_remove_callback(q, rwb->cb);
 ^~
   block/blk-wbt.c:747:29: error: 'struct rq_wb' has no member named 'cb'
  blk_stat_free_callback(rwb->cb);
^~
   block/blk-wbt.c: In function 'blkg_to_qg':
   block/blk-wbt.c:783:9: error: implicit declaration of function 'pd_to_tg'; 
did you mean 'pd_to_qg'? [-Werror=implicit-function-declaration]
 return pd_to_tg(blkg_to_pd(blkg, _policy_qos));
^~~~
pd_to_qg
   block/blk-wbt.c:783:9: warning: return makes pointer from integer without a 
cast [-Wint-conversion]
 return pd_to_tg(blkg_to_pd(blkg, _policy_qos));
^
   block/blk-wbt.c: In function 'check_scale_change':
   block/blk-wbt.c:853:14: error: passing argument 1 of 'scale_down' from 
incompatible pointer type [-Werror=incompatible-pointer-types]
  scale_down(>rq_wait, false);
 ^
   block/blk-wbt.c:334:13: note: expected 'struct rq_depth *' but argument is 
of type 'struct rq_wait *'
static void scale_down(struct rq_depth *rqd, bool hard_throttle)
^~
   block/blk-wbt.c:855:12: error: passing argument 1 of 'scale_up' from 
incompatible pointer type [-Werror=incompatible-pointer-types]
  scale_up(>rq_wait);
   ^
   block/blk-wbt.c:312:13: 

[josef-btrfs:current-work 2/3] include/linux/bio.h:521:55: warning: 'struct blkcg_gq' declared inside parameter list will not be visible outside of this definition or declaration

2018-02-02 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
current-work
head:   1ac686f6d1b04b480cd245fb927180e1238bd3ac
commit: 4ece201cfafab298cd89083567403a53f0971635 [2/3] block: add bi_blkg to 
the bio for cgroups
config: x86_64-randconfig-x018-201804 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
git checkout 4ece201cfafab298cd89083567403a53f0971635
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/blkdev.h:21:0,
from block//partitions/check.h:3,
from block//partitions/check.c:22:
>> include/linux/bio.h:521:55: warning: 'struct blkcg_gq' declared inside 
>> parameter list will not be visible outside of this definition or declaration
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
  ^~~~
   include/linux/bio.h:521:12: warning: 'bio_associate_blkg' defined but not 
used [-Wunused-function]
static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
return 0; }
   ^~

vim +521 include/linux/bio.h

   506  
   507  #define bio_dev(bio) \
   508  disk_devt((bio)->bi_disk)
   509  
   510  #define bio_devname(bio, buf) \
   511  __bdevname(bio_dev(bio), (buf))
   512  
   513  #ifdef CONFIG_BLK_CGROUP
   514  int bio_associate_blkcg(struct bio *bio, struct cgroup_subsys_state 
*blkcg_css);
   515  int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg);
   516  void bio_disassociate_task(struct bio *bio);
   517  void bio_clone_blkcg_association(struct bio *dst, struct bio *src);
   518  #else   /* CONFIG_BLK_CGROUP */
   519  static inline int bio_associate_blkcg(struct bio *bio,
   520  struct cgroup_subsys_state *blkcg_css) { return 
0; }
 > 521  static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { 
 > return 0; }
   522  static inline void bio_disassociate_task(struct bio *bio) { }
   523  static inline void bio_clone_blkcg_association(struct bio *dst,
   524  struct bio *src) { }
   525  #endif  /* CONFIG_BLK_CGROUP */
   526  

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


.config.gz
Description: application/gzip


[josef-btrfs:current-work 2/2] block/blk-wbt.h:113:8: error: redefinition of 'struct rq_qos'

2018-01-31 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
current-work
head:   055b23681aedfe6c6a9da010a57b3d6d9167f882
commit: 055b23681aedfe6c6a9da010a57b3d6d9167f882 [2/2] current-work
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 055b23681aedfe6c6a9da010a57b3d6d9167f882
# save the attached .config to linux build tree
make.cross ARCH=xtensa 

All error/warnings (new ones prefixed by >>):

   In file included from block/cfq-iosched.c:20:0:
>> block/blk-wbt.h:113:8: error: redefinition of 'struct rq_qos'
struct rq_qos {
   ^~
   block/blk-wbt.h:88:8: note: originally defined here
struct rq_qos {
   ^~
--
   In file included from block/blk-wbt.c:27:0:
>> block/blk-wbt.h:113:8: error: redefinition of 'struct rq_qos'
struct rq_qos {
   ^~
   block/blk-wbt.h:88:8: note: originally defined here
struct rq_qos {
   ^~
   block/blk-wbt.c: In function '__wbt_done':
>> block/blk-wbt.c:123:9: error: 'struct rq_wb' has no member named 'wc'
 if (rwb->wc && !wb_recent_wait(rwb))
^~
   block/blk-wbt.c: In function 'wbt_done':
>> block/blk-wbt.c:158:26: error: 'struct rq_wb' has no member named 'last_comp'
   wb_timestamp(rwb, >last_comp);
 ^~
   block/blk-wbt.c: In function 'calc_max_depth':
>> block/blk-wbt.c:181:6: error: 'rwb' undeclared (first use in this function); 
>> did you mean 'rmb'?
 if (rwb->queue_depth == 1) {
 ^~~
 rmb
   block/blk-wbt.c:181:6: note: each undeclared identifier is reported only 
once for each function it appears in
   block/blk-wbt.c: In function 'rwb_trace_step':
>> block/blk-wbt.c:308:32: error: 'struct rq_wb' has no member named 
>> 'scale_step'; did you mean 'enable_state'?
 trace_wbt_step(bdi, msg, rwb->scale_step, rwb->cur_win_nsec,
   ^~
   enable_state
>> block/blk-wbt.c:308:47: error: 'struct rq_wb' has no member named 
>> 'cur_win_nsec'
 trace_wbt_step(bdi, msg, rwb->scale_step, rwb->cur_win_nsec,
  ^~
>> block/blk-wbt.c:309:45: error: 'struct rq_wb' has no member named 'wb_max'; 
>> did you mean 'wb_normal'?
   rwb->wb_background, rwb->wb_normal, rwb->wb_max);
^~
wb_normal
   block/blk-wbt.c: In function 'scale_up':
>> block/blk-wbt.c:323:20: error: implicit declaration of function 
>> 'calc_wb_limits'; did you mean 'task_rlimit'? 
>> [-Werror=implicit-function-declaration]
 rqd->scaled_max = calc_wb_limits(rwb);
   ^~
   task_rlimit
   block/blk-wbt.c:323:35: error: 'rwb' undeclared (first use in this 
function); did you mean 'rmb'?
 rqd->scaled_max = calc_wb_limits(rwb);
  ^~~
  rmb
   block/blk-wbt.c: In function 'scale_down':
>> block/blk-wbt.c:352:2: error: implicit declaration of function 
>> 'rqd_trace_step'; did you mean 'rwb_trace_step'? 
>> [-Werror=implicit-function-declaration]
 rqd_trace_step(rqd, "step down");
 ^~
 rwb_trace_step
   block/blk-wbt.c: In function 'rwb_arm_timer':
   block/blk-wbt.c:357:11: error: 'struct rq_wb' has no member named 
'scale_step'; did you mean 'enable_state'?
 if (rwb->scale_step > 0) {
  ^~
  enable_state
   block/blk-wbt.c:364:6: error: 'struct rq_wb' has no member named 
'cur_win_nsec'
  rwb->cur_win_nsec = div_u64(rwb->win_nsec << 4,
 ^~
>> block/blk-wbt.c:364:34: error: 'struct rq_wb' has no member named 'win_nsec'
  rwb->cur_win_nsec = div_u64(rwb->win_nsec << 4,
 ^~
   block/blk-wbt.c:365:21: error: 'struct rq_wb' has no member named 
'scale_step'; did you mean 'enable_state'?
 int_sqrt((rwb->scale_step + 1) << 8));
^~
enable_state
   block/blk-wbt.c:371:6: error: 'struct rq_wb' has no member named 
'cur_win_nsec'
  rwb->cur_win_nsec = rwb->win_nsec;
 ^~
   block/blk-wbt.c:371:26: error: 'struct rq_wb' has no member named 'win_nsec'
  rwb->cur_win_nsec = rwb->win_nsec;
 ^~
>> block/blk-wbt.c:374:29: error: 'struct rq_wb' has no member named 'cb'
 blk_stat_activate_nsecs(rwb->cb, rwb->cur_win_nsec);
^~
   block/blk-wbt.c:374:38: error: 'struct rq_wb' has no member named 
'cur_win_nsec'
 blk_stat_activate_nsecs(rwb->cb, rwb->cur_win_nsec);
 ^~
   block/blk-wbt.c: In function 'wb_timer_fn':
   

[josef-btrfs:current-work 2/2] block/blk-wbt.c:323:20: error: implicit declaration of function 'calc_wb_limits'

2018-01-31 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
current-work
head:   055b23681aedfe6c6a9da010a57b3d6d9167f882
commit: 055b23681aedfe6c6a9da010a57b3d6d9167f882 [2/2] current-work
config: m68k-allyesconfig (attached as .config)
compiler: m68k-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 055b23681aedfe6c6a9da010a57b3d6d9167f882
# save the attached .config to linux build tree
make.cross ARCH=m68k 

All errors (new ones prefixed by >>):

   In file included from block/blk-wbt.c:27:0:
   block/blk-wbt.h:113:8: error: redefinition of 'struct rq_qos'
struct rq_qos {
   ^~
   block/blk-wbt.h:88:8: note: originally defined here
struct rq_qos {
   ^~
   block/blk-wbt.c: In function '__wbt_done':
   block/blk-wbt.c:123:9: error: 'struct rq_wb' has no member named 'wc'
 if (rwb->wc && !wb_recent_wait(rwb))
^~
   block/blk-wbt.c: In function 'wbt_done':
   block/blk-wbt.c:158:26: error: 'struct rq_wb' has no member named 'last_comp'
   wb_timestamp(rwb, >last_comp);
 ^~
   block/blk-wbt.c: In function 'calc_max_depth':
   block/blk-wbt.c:181:6: error: 'rwb' undeclared (first use in this function); 
did you mean 'rmb'?
 if (rwb->queue_depth == 1) {
 ^~~
 rmb
   block/blk-wbt.c:181:6: note: each undeclared identifier is reported only 
once for each function it appears in
   block/blk-wbt.c: In function 'rwb_trace_step':
   block/blk-wbt.c:308:32: error: 'struct rq_wb' has no member named 
'scale_step'; did you mean 'enable_state'?
 trace_wbt_step(bdi, msg, rwb->scale_step, rwb->cur_win_nsec,
   ^~
   enable_state
   block/blk-wbt.c:308:47: error: 'struct rq_wb' has no member named 
'cur_win_nsec'
 trace_wbt_step(bdi, msg, rwb->scale_step, rwb->cur_win_nsec,
  ^~
   block/blk-wbt.c:309:45: error: 'struct rq_wb' has no member named 'wb_max'; 
did you mean 'wb_normal'?
   rwb->wb_background, rwb->wb_normal, rwb->wb_max);
^~
wb_normal
   block/blk-wbt.c: In function 'scale_up':
>> block/blk-wbt.c:323:20: error: implicit declaration of function 
>> 'calc_wb_limits' [-Werror=implicit-function-declaration]
 rqd->scaled_max = calc_wb_limits(rwb);
   ^~
   block/blk-wbt.c:323:35: error: 'rwb' undeclared (first use in this 
function); did you mean 'rmb'?
 rqd->scaled_max = calc_wb_limits(rwb);
  ^~~
  rmb
   block/blk-wbt.c: In function 'scale_down':
   block/blk-wbt.c:352:2: error: implicit declaration of function 
'rqd_trace_step'; did you mean 'rwb_trace_step'? 
[-Werror=implicit-function-declaration]
 rqd_trace_step(rqd, "step down");
 ^~
 rwb_trace_step
   block/blk-wbt.c: In function 'rwb_arm_timer':
   block/blk-wbt.c:357:11: error: 'struct rq_wb' has no member named 
'scale_step'; did you mean 'enable_state'?
 if (rwb->scale_step > 0) {
  ^~
  enable_state
   block/blk-wbt.c:364:6: error: 'struct rq_wb' has no member named 
'cur_win_nsec'
  rwb->cur_win_nsec = div_u64(rwb->win_nsec << 4,
 ^~
   block/blk-wbt.c:364:34: error: 'struct rq_wb' has no member named 'win_nsec'
  rwb->cur_win_nsec = div_u64(rwb->win_nsec << 4,
 ^~
   block/blk-wbt.c:365:21: error: 'struct rq_wb' has no member named 
'scale_step'; did you mean 'enable_state'?
 int_sqrt((rwb->scale_step + 1) << 8));
^~
enable_state
   block/blk-wbt.c:371:6: error: 'struct rq_wb' has no member named 
'cur_win_nsec'
  rwb->cur_win_nsec = rwb->win_nsec;
 ^~
   block/blk-wbt.c:371:26: error: 'struct rq_wb' has no member named 'win_nsec'
  rwb->cur_win_nsec = rwb->win_nsec;
 ^~
   block/blk-wbt.c:374:29: error: 'struct rq_wb' has no member named 'cb'
 blk_stat_activate_nsecs(rwb->cb, rwb->cur_win_nsec);
^~
   block/blk-wbt.c:374:38: error: 'struct rq_wb' has no member named 
'cur_win_nsec'
 blk_stat_activate_nsecs(rwb->cb, rwb->cur_win_nsec);
 ^~
   block/blk-wbt.c: In function 'wb_timer_fn':
   block/blk-wbt.c:386:61: error: 'struct rq_wb' has no member named 
'scale_step'; did you mean 'enable_state'?
 trace_wbt_timer(rwb->queue->backing_dev_info, status, rwb->scale_step,
^~
enable_state
   

[PATCH] btrfs: fix err_cast.cocci warnings

2018-01-28 Thread kbuild test robot
From: Fengguang Wu 

fs/btrfs/volumes.c:742:10-17: WARNING: ERR_CAST can be used with fs_devices


 Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

Generated by: scripts/coccinelle/api/err_cast.cocci

Fixes: bf155c98d312 ("btrfs: get device pointer from device_list_add()")
CC: Anand Jain 
Signed-off-by: Fengguang Wu 
---

 volumes.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -739,7 +739,7 @@ static noinline struct btrfs_device *dev
if (!fs_devices) {
fs_devices = alloc_fs_devices(disk_super->fsid);
if (IS_ERR(fs_devices))
-   return ERR_PTR(PTR_ERR(fs_devices));
+   return ERR_CAST(fs_devices);
 
list_add(_devices->list, _uuids);
 
--
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


[josef-btrfs:kill-btree-inode 30/32] fs/btrfs/disk-io.c:1059:13: sparse: incorrect type in assignment (different base types)

2018-01-02 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
kill-btree-inode
head:   225f09a5848138ede157eff4aa27bfa70d354fcb
commit: fb6cad3454e3172599129cff50d5234a7abc551c [30/32] Btrfs: kill the 
btree_inode
reproduce:
# apt-get install sparse
git checkout fb6cad3454e3172599129cff50d5234a7abc551c
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)


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

  1047  
  1048  static blk_status_t __btree_submit_bio_done(void *private_data, struct 
bio *bio,
  1049  int mirror_num, unsigned 
long bio_flags,
  1050  u64 bio_offset)
  1051  {
  1052  struct btrfs_eb_info *eb_info = private_data;
  1053  int ret;
  1054  
  1055  /*
  1056   * when we're called for a write, we're already in the async
  1057   * submission context.  Just jump into btrfs_map_bio
  1058   */
> 1059  ret = btrfs_map_bio(eb_info->fs_info, bio, mirror_num, 1);
  1060  if (ret) {
> 1061  bio->bi_status = ret;
  1062  bio_endio(bio);
  1063  }
> 1064  return ret;
  1065  }
  1066  

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


[RFC PATCH btrfs] buffer_head: create_bh_bio() can be static

2017-12-18 Thread kbuild test robot

Fixes: 61b4603b8338 ("buffer_head: separate out create_bh_bio() from 
submit_bh_wbc()")
Signed-off-by: Fengguang Wu 
---
 buffer.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index eb15599..b793f6d 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -3055,8 +3055,8 @@ void guard_bio_eod(int op, struct bio *bio)
}
 }
 
-struct bio *create_bh_bio(int op, int op_flags, struct buffer_head *bh,
-  enum rw_hint write_hint)
+static struct bio *create_bh_bio(int op, int op_flags, struct buffer_head *bh,
+enum rw_hint write_hint)
 {
struct bio *bio;
 
--
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


[btrfs:cgroup-btrfs 3/5] fs/buffer.c:3058:12: sparse: symbol 'create_bh_bio' was not declared. Should it be static?

2017-12-18 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git 
cgroup-btrfs
head:   2e032c72c43e8008be45f23376d9e24d75c3d85f
commit: 61b4603b83389326984a47e702a319a40d006f77 [3/5] buffer_head: separate 
out create_bh_bio() from submit_bh_wbc()
reproduce:
# apt-get install sparse
git checkout 61b4603b83389326984a47e702a319a40d006f77
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)


Please review and possibly fold the followup patch.

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


[josef-btrfs:kill-btree-inode 33/33] fs/btrfs/extent_io.c:4806:9: warning: overflow in implicit constant conversion

2017-11-22 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
kill-btree-inode
head:   6dbc29989846e20ef73ae6b9abedad570706c019
commit: 6dbc29989846e20ef73ae6b9abedad570706c019 [33/33] btrfs: add 
NR_METADATA_BYTES accounting
config: x86_64-randconfig-x000-201747 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
git checkout 6dbc29989846e20ef73ae6b9abedad570706c019
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   fs/btrfs/extent_io.c: In function 'btrfs_release_extent_buffer_page':
   fs/btrfs/extent_io.c:4805:34: error: 'p' undeclared (first use in this 
function)
  mod_node_page_state(page_pgdat(p), NR_METADATA_BYTES,
 ^
   fs/btrfs/extent_io.c:4805:34: note: each undeclared identifier is reported 
only once for each function it appears in
>> fs/btrfs/extent_io.c:4806:9: warning: overflow in implicit constant 
>> conversion [-Woverflow]
-PAGE_SIZE);
^
   In file included from arch/x86/include/asm/bitops.h:15:0,
from include/linux/bitops.h:37,
from fs/btrfs/extent_io.c:1:
   fs/btrfs/extent_io.c: At top level:
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'strcpy' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:421:2: note: in expansion of macro 'if'
 if (p_size == (size_t)-1 && q_size == (size_t)-1)
 ^~
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'kmemdup' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:411:2: note: in expansion of macro 'if'
 if (p_size < size)
 ^~
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'kmemdup' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:409:2: note: in expansion of macro 'if'
 if (__builtin_constant_p(size) && p_size < size)
 ^~
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'memchr_inv' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:400:2: note: in expansion of macro 'if'
 if (p_size < size)
 ^~
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'memchr_inv' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:398:2: note: in expansion of macro 'if'
 if (__builtin_constant_p(size) && p_size < size)
 ^~
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'memchr' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:389:2: note: in expansion of macro 'if'
 if (p_size < size)
 ^~
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'memchr' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:387:2: note: in expansion of macro 'if'
 if (__builtin_constant_p(size) && p_size < size)
 ^~
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'memcmp' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:379:2: note: in expansion of macro 'if'
 if (p_size < size || q_size < size)
 ^~
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 

[josef-btrfs:bpf-override-return 1/4] kernel/kprobes.c:2345:2: error: implicit declaration of function 'populate_kernel_kprobe_ei_list'; did you mean 'module_unload_kprobe_ei_list'?

2017-11-20 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
bpf-override-return
head:   9d789a052c0b5d31c2c3c0614b1450051508836c
commit: effbb385b04345a1bf39542cebf435bc770c1776 [1/4] add infrastructure for 
tagging functions as error injectable
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout effbb385b04345a1bf39542cebf435bc770c1776
# save the attached .config to linux build tree
make.cross ARCH=sparc64 

All errors (new ones prefixed by >>):

   kernel/kprobes.c: In function 'init_kprobes':
>> kernel/kprobes.c:2345:2: error: implicit declaration of function 
>> 'populate_kernel_kprobe_ei_list'; did you mean 
>> 'module_unload_kprobe_ei_list'? [-Werror=implicit-function-declaration]
 populate_kernel_kprobe_ei_list();
 ^~
 module_unload_kprobe_ei_list
   cc1: some warnings being treated as errors

vim +2345 kernel/kprobes.c

  2325  
  2326  static int __init init_kprobes(void)
  2327  {
  2328  int i, err = 0;
  2329  
  2330  /* FIXME allocate the probe table, currently defined statically 
*/
  2331  /* initialize all list heads */
  2332  for (i = 0; i < KPROBE_TABLE_SIZE; i++) {
  2333  INIT_HLIST_HEAD(_table[i]);
  2334  INIT_HLIST_HEAD(_inst_table[i]);
  2335  raw_spin_lock_init(&(kretprobe_table_locks[i].lock));
  2336  }
  2337  
  2338  err = populate_kprobe_blacklist(__start_kprobe_blacklist,
  2339  __stop_kprobe_blacklist);
  2340  if (err) {
  2341  pr_err("kprobes: failed to populate blacklist: %d\n", 
err);
  2342  pr_err("Please take care of using kprobes.\n");
  2343  }
  2344  
> 2345  populate_kernel_kprobe_ei_list();
  2346  
  2347  if (kretprobe_blacklist_size) {
  2348  /* lookup the function address from its name */
  2349  for (i = 0; kretprobe_blacklist[i].name != NULL; i++) {
  2350  kretprobe_blacklist[i].addr =
  2351  
kprobe_lookup_name(kretprobe_blacklist[i].name, 0);
  2352  if (!kretprobe_blacklist[i].addr)
  2353  printk("kretprobe: lookup failed: %s\n",
  2354 kretprobe_blacklist[i].name);
  2355  }
  2356  }
  2357  

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


.config.gz
Description: application/gzip


[josef-btrfs:bpf-override-return 1/4] kernel/kprobes.c:2345:2: error: implicit declaration of function 'populate_kernel_kprobe_ei_list'

2017-11-20 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
bpf-override-return
head:   9d789a052c0b5d31c2c3c0614b1450051508836c
commit: effbb385b04345a1bf39542cebf435bc770c1776 [1/4] add infrastructure for 
tagging functions as error injectable
config: tile-allyesconfig (attached as .config)
compiler: tilegx-linux-gcc (GCC) 4.6.2
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout effbb385b04345a1bf39542cebf435bc770c1776
# save the attached .config to linux build tree
make.cross ARCH=tile 

All errors (new ones prefixed by >>):

   kernel/kprobes.c: In function 'init_kprobes':
>> kernel/kprobes.c:2345:2: error: implicit declaration of function 
>> 'populate_kernel_kprobe_ei_list'
   cc1: some warnings being treated as errors

vim +/populate_kernel_kprobe_ei_list +2345 kernel/kprobes.c

  2325  
  2326  static int __init init_kprobes(void)
  2327  {
  2328  int i, err = 0;
  2329  
  2330  /* FIXME allocate the probe table, currently defined statically 
*/
  2331  /* initialize all list heads */
  2332  for (i = 0; i < KPROBE_TABLE_SIZE; i++) {
  2333  INIT_HLIST_HEAD(_table[i]);
  2334  INIT_HLIST_HEAD(_inst_table[i]);
  2335  raw_spin_lock_init(&(kretprobe_table_locks[i].lock));
  2336  }
  2337  
  2338  err = populate_kprobe_blacklist(__start_kprobe_blacklist,
  2339  __stop_kprobe_blacklist);
  2340  if (err) {
  2341  pr_err("kprobes: failed to populate blacklist: %d\n", 
err);
  2342  pr_err("Please take care of using kprobes.\n");
  2343  }
  2344  
> 2345  populate_kernel_kprobe_ei_list();
  2346  
  2347  if (kretprobe_blacklist_size) {
  2348  /* lookup the function address from its name */
  2349  for (i = 0; kretprobe_blacklist[i].name != NULL; i++) {
  2350  kretprobe_blacklist[i].addr =
  2351  
kprobe_lookup_name(kretprobe_blacklist[i].name, 0);
  2352  if (!kretprobe_blacklist[i].addr)
  2353  printk("kretprobe: lookup failed: %s\n",
  2354 kretprobe_blacklist[i].name);
  2355  }
  2356  }
  2357  

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


.config.gz
Description: application/gzip


[josef-btrfs:slab-priority 1/1] mm/vmscan.c:336:2: error: 'deleta' undeclared

2017-11-16 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
slab-priority
head:   c5c56bb8db68a328b5e55cab87b5e6306177e9b2
commit: c5c56bb8db68a328b5e55cab87b5e6306177e9b2 [1/1] mm: use sc->priority for 
slab shrink targets
config: i386-randconfig-x001-201746 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
git checkout c5c56bb8db68a328b5e55cab87b5e6306177e9b2
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   mm/vmscan.c: In function 'do_shrink_slab':
>> mm/vmscan.c:336:2: error: 'deleta' undeclared (first use in this function)
 deleta *= 4;
 ^~
   mm/vmscan.c:336:2: note: each undeclared identifier is reported only once 
for each function it appears in

vim +/deleta +336 mm/vmscan.c

   308  
   309  static unsigned long do_shrink_slab(struct shrink_control *shrinkctl,
   310  struct shrinker *shrinker, int 
priority)
   311  {
   312  unsigned long freed = 0;
   313  unsigned long long delta;
   314  long total_scan;
   315  long freeable;
   316  long nr;
   317  long new_nr;
   318  int nid = shrinkctl->nid;
   319  long batch_size = shrinker->batch ? shrinker->batch
   320: SHRINK_BATCH;
   321  long scanned = 0, next_deferred;
   322  
   323  freeable = shrinker->count_objects(shrinker, shrinkctl);
   324  if (freeable == 0)
   325  return 0;
   326  
   327  /*
   328   * copy the current shrinker scan count into a local variable
   329   * and zero it so that other concurrent shrinker invocations
   330   * don't also do this scanning work.
   331   */
   332  nr = atomic_long_xchg(>nr_deferred[nid], 0);
   333  
   334  total_scan = nr;
   335  delta = freeable >> priority;
 > 336  deleta *= 4;
   337  do_div(delta, shrinker->seeks);
   338  total_scan += delta;
   339  if (total_scan < 0) {
   340  pr_err("shrink_slab: %pF negative objects to delete 
nr=%ld\n",
   341 shrinker->scan_objects, total_scan);
   342  total_scan = freeable;
   343  next_deferred = nr;
   344  } else
   345  next_deferred = total_scan;
   346  
   347  /*
   348   * We need to avoid excessive windup on filesystem shrinkers
   349   * due to large numbers of GFP_NOFS allocations causing the
   350   * shrinkers to return -1 all the time. This results in a large
   351   * nr being built up so when a shrink that can do some work
   352   * comes along it empties the entire cache due to nr >>>
   353   * freeable. This is bad for sustaining a working set in
   354   * memory.
   355   *
   356   * Hence only allow the shrinker to scan the entire cache when
   357   * a large delta change is calculated directly.
   358   */
   359  if (delta < freeable / 4)
   360  total_scan = min(total_scan, freeable / 2);
   361  
   362  /*
   363   * Avoid risking looping forever due to too large nr value:
   364   * never try to free more than twice the estimate number of
   365   * freeable entries.
   366   */
   367  if (total_scan > freeable * 2)
   368  total_scan = freeable * 2;
   369  
   370  trace_mm_shrink_slab_start(shrinker, shrinkctl, nr,
   371 freeable, delta, total_scan, 
priority);
   372  
   373  /*
   374   * Normally, we should not scan less than batch_size objects in 
one
   375   * pass to avoid too frequent shrinker calls, but if the slab 
has less
   376   * than batch_size objects in total and we are really tight on 
memory,
   377   * we will try to reclaim all available objects, otherwise we 
can end
   378   * up failing allocations although there are plenty of 
reclaimable
   379   * objects spread over several slabs with usage less than the
   380   * batch_size.
   381   *
   382   * We detect the "tight on memory" situations by looking at the 
total
   383   * number of objects we want to scan (total_scan). If it is 
greater
   384   * than the total number of objects on slab (freeable), we must 
be
   385   * scanning at high prio and therefore should try to reclaim as 
much as
   386   * possible.
   387   */
   388  while (total_scan >= batch_size ||
   389 total_scan >= freeable) {
   390  unsigned long ret;
   391  unsigned long nr_to_scan = min(batch_size, total_scan);
   392  
   393 

[josef-btrfs:slab-priority 1/1] vmscan.c:undefined reference to `__udivdi3'

2017-11-16 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
slab-priority
head:   bd319083ec02fd19b9f3522935d3c6c0528e1864
commit: bd319083ec02fd19b9f3522935d3c6c0528e1864 [1/1] mm: use sc->priority for 
slab shrink targets
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
git checkout bd319083ec02fd19b9f3522935d3c6c0528e1864
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   mm/vmscan.o: In function `shrink_slab.part.77.constprop.101':
>> vmscan.c:(.text+0x378): undefined reference to `__udivdi3'

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


.config.gz
Description: application/gzip


[josef-btrfs:slab-priority 1/1] mm/vmscan.c:336: undefined reference to `__udivdi3'

2017-11-15 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
slab-priority
head:   bd319083ec02fd19b9f3522935d3c6c0528e1864
commit: bd319083ec02fd19b9f3522935d3c6c0528e1864 [1/1] mm: use sc->priority for 
slab shrink targets
config: i386-randconfig-n0-201746 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
git checkout bd319083ec02fd19b9f3522935d3c6c0528e1864
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   mm/vmscan.o: In function `do_shrink_slab':
>> mm/vmscan.c:336: undefined reference to `__udivdi3'

vim +336 mm/vmscan.c

   308  
   309  static unsigned long do_shrink_slab(struct shrink_control *shrinkctl,
   310  struct shrinker *shrinker, int 
priority)
   311  {
   312  unsigned long freed = 0;
   313  unsigned long long delta;
   314  long total_scan;
   315  long freeable;
   316  long nr;
   317  long new_nr;
   318  int nid = shrinkctl->nid;
   319  long batch_size = shrinker->batch ? shrinker->batch
   320: SHRINK_BATCH;
   321  long scanned = 0, next_deferred;
   322  
   323  freeable = shrinker->count_objects(shrinker, shrinkctl);
   324  if (freeable == 0)
   325  return 0;
   326  
   327  /*
   328   * copy the current shrinker scan count into a local variable
   329   * and zero it so that other concurrent shrinker invocations
   330   * don't also do this scanning work.
   331   */
   332  nr = atomic_long_xchg(>nr_deferred[nid], 0);
   333  
   334  total_scan = nr;
   335  delta = freeable >> priority;
 > 336  delta = (4 * delta) / shrinker->seeks;
   337  total_scan += delta;
   338  if (total_scan < 0) {
   339  pr_err("shrink_slab: %pF negative objects to delete 
nr=%ld\n",
   340 shrinker->scan_objects, total_scan);
   341  total_scan = freeable;
   342  next_deferred = nr;
   343  } else
   344  next_deferred = total_scan;
   345  
   346  /*
   347   * We need to avoid excessive windup on filesystem shrinkers
   348   * due to large numbers of GFP_NOFS allocations causing the
   349   * shrinkers to return -1 all the time. This results in a large
   350   * nr being built up so when a shrink that can do some work
   351   * comes along it empties the entire cache due to nr >>>
   352   * freeable. This is bad for sustaining a working set in
   353   * memory.
   354   *
   355   * Hence only allow the shrinker to scan the entire cache when
   356   * a large delta change is calculated directly.
   357   */
   358  if (delta < freeable / 4)
   359  total_scan = min(total_scan, freeable / 2);
   360  
   361  /*
   362   * Avoid risking looping forever due to too large nr value:
   363   * never try to free more than twice the estimate number of
   364   * freeable entries.
   365   */
   366  if (total_scan > freeable * 2)
   367  total_scan = freeable * 2;
   368  
   369  trace_mm_shrink_slab_start(shrinker, shrinkctl, nr,
   370 freeable, delta, total_scan, 
priority);
   371  
   372  /*
   373   * Normally, we should not scan less than batch_size objects in 
one
   374   * pass to avoid too frequent shrinker calls, but if the slab 
has less
   375   * than batch_size objects in total and we are really tight on 
memory,
   376   * we will try to reclaim all available objects, otherwise we 
can end
   377   * up failing allocations although there are plenty of 
reclaimable
   378   * objects spread over several slabs with usage less than the
   379   * batch_size.
   380   *
   381   * We detect the "tight on memory" situations by looking at the 
total
   382   * number of objects we want to scan (total_scan). If it is 
greater
   383   * than the total number of objects on slab (freeable), we must 
be
   384   * scanning at high prio and therefore should try to reclaim as 
much as
   385   * possible.
   386   */
   387  while (total_scan >= batch_size ||
   388 total_scan >= freeable) {
   389  unsigned long ret;
   390  unsigned long nr_to_scan = min(batch_size, total_scan);
   391  
   392  shrinkctl->nr_to_scan = nr_to_scan;
   393  shrinkctl->nr_scanned = nr_to_scan;
   394  ret = shrinker->scan_objects(shrinker, shrinkctl);
   395  

Re: [PATCH] btrfs: handle dynamically reappearing missing device

2017-11-14 Thread kbuild test robot
Hi Anand,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on btrfs/next]
[also build test ERROR on v4.14 next-20171114]
[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/Anand-Jain/btrfs-handle-dynamically-reappearing-missing-device/20171115-143047
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git 
next
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sparc64 

All errors (new ones prefixed by >>):

   fs/btrfs/volumes.c: In function 'device_list_add':
>> fs/btrfs/volumes.c:732:10: error: implicit declaration of function 
>> 'btrfs_open_one_device'; did you mean 'btrfs_scan_one_device'? 
>> [-Werror=implicit-function-declaration]
   ret = btrfs_open_one_device(fs_devices, device, fmode,
 ^
 btrfs_scan_one_device
   cc1: some warnings being treated as errors

vim +732 fs/btrfs/volumes.c

   610  
   611  /*
   612   * Add new device to list of registered devices
   613   *
   614   * Returns:
   615   * 1   - first time device is seen
   616   * 0   - device already known
   617   * < 0 - error
   618   */
   619  static noinline int device_list_add(const char *path,
   620 struct btrfs_super_block *disk_super,
   621 u64 devid, struct btrfs_fs_devices 
**fs_devices_ret)
   622  {
   623  struct btrfs_device *device;
   624  struct btrfs_fs_devices *fs_devices;
   625  struct rcu_string *name;
   626  int ret = 0;
   627  u64 found_transid = btrfs_super_generation(disk_super);
   628  
   629  fs_devices = find_fsid(disk_super->fsid);
   630  if (!fs_devices) {
   631  fs_devices = alloc_fs_devices(disk_super->fsid);
   632  if (IS_ERR(fs_devices))
   633  return PTR_ERR(fs_devices);
   634  
   635  list_add(_devices->list, _uuids);
   636  
   637  device = NULL;
   638  } else {
   639  device = __find_device(_devices->devices, devid,
   640 disk_super->dev_item.uuid);
   641  }
   642  
   643  if (!device) {
   644  if (fs_devices->opened)
   645  return -EBUSY;
   646  
   647  device = btrfs_alloc_device(NULL, ,
   648  disk_super->dev_item.uuid);
   649  if (IS_ERR(device)) {
   650  /* we can safely leave the fs_devices entry 
around */
   651  return PTR_ERR(device);
   652  }
   653  
   654  name = rcu_string_strdup(path, GFP_NOFS);
   655  if (!name) {
   656  kfree(device);
   657  return -ENOMEM;
   658  }
   659  rcu_assign_pointer(device->name, name);
   660  
   661  mutex_lock(_devices->device_list_mutex);
   662  list_add_rcu(>dev_list, _devices->devices);
   663  fs_devices->num_devices++;
   664  mutex_unlock(_devices->device_list_mutex);
   665  
   666  ret = 1;
   667  device->fs_devices = fs_devices;
   668  } else if (!device->name || strcmp(device->name->str, path)) {
   669  /*
   670   * When FS is already mounted.
   671   * 1. If you are here and if the device->name is NULL 
that
   672   *means this device was missing at time of FS mount.
   673   * 2. If you are here and if the device->name is 
different
   674   *from 'path' that means either
   675   *  a. The same device disappeared and reappeared 
with
   676   * different name. or
   677   *  b. The missing-disk-which-was-replaced, has
   678   * reappeared now.
   679   *
   680   * We must allow 1 and 2a above. But 2b would be a 
spurious
   681   * and unintentional.
   682   *
   683   * Further in case of 1 and 2a above, the disk at 'path'
   684   * would have missed some transaction when it was away 
and
   685   * in case of 2a the stale bdev has to be updated as 
well.
   686   * 2b must not be allowed at all time.
   687   */
   

[josef-btrfs:new-kill-btree-inode 25/28] fs/super.c:450:3: note: in expansion of macro 'if'

2017-11-09 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
new-kill-btree-inode
head:   246e803530bee11804fa19b24ce467d2a2c9cb5d
commit: 406cde4fc84d7943fa7d69642cc7fd563301f5e6 [25/28] writeback: introduce 
super_operations->write_metadata
config: x86_64-randconfig-x015-201745 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
git checkout 406cde4fc84d7943fa7d69642cc7fd563301f5e6
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:4:0,
from arch/x86/include/asm/bug.h:81,
from include/linux/bug.h:4,
from include/linux/mmdebug.h:4,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from fs/super.c:24:
   fs/super.c: In function 'generic_shutdown_super':
   fs/super.c:450:19: error: incompatible type for argument 1 of 'list_empty'
  if (!list_empty(sb->s_bdi_list)) {
  ^
   include/linux/compiler.h:156:30: note: in definition of macro '__trace_if'
 if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
 ^~~~
>> fs/super.c:450:3: note: in expansion of macro 'if'
  if (!list_empty(sb->s_bdi_list)) {
  ^~
   In file included from include/linux/preempt.h:10:0,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:5,
from include/linux/slab.h:14,
from fs/super.c:24:
   include/linux/list.h:200:19: note: expected 'const struct list_head *' but 
argument is of type 'struct list_head'
static inline int list_empty(const struct list_head *head)
  ^~
   In file included from include/asm-generic/bug.h:4:0,
from arch/x86/include/asm/bug.h:81,
from include/linux/bug.h:4,
from include/linux/mmdebug.h:4,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from fs/super.c:24:
   fs/super.c:450:19: error: incompatible type for argument 1 of 'list_empty'
  if (!list_empty(sb->s_bdi_list)) {
  ^
   include/linux/compiler.h:156:42: note: in definition of macro '__trace_if'
 if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
 ^~~~
>> fs/super.c:450:3: note: in expansion of macro 'if'
  if (!list_empty(sb->s_bdi_list)) {
  ^~
   In file included from include/linux/preempt.h:10:0,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:5,
from include/linux/slab.h:14,
from fs/super.c:24:
   include/linux/list.h:200:19: note: expected 'const struct list_head *' but 
argument is of type 'struct list_head'
static inline int list_empty(const struct list_head *head)
  ^~
   In file included from include/asm-generic/bug.h:4:0,
from arch/x86/include/asm/bug.h:81,
from include/linux/bug.h:4,
from include/linux/mmdebug.h:4,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from fs/super.c:24:
   fs/super.c:450:19: error: incompatible type for argument 1 of 'list_empty'
  if (!list_empty(sb->s_bdi_list)) {
  ^
   include/linux/compiler.h:167:16: note: in definition of macro '__trace_if'
  __r = !!(cond); \
   ^~~~
>> fs/super.c:450:3: note: in expansion of macro 'if'
  if (!list_empty(sb->s_bdi_list)) {
  ^~
   In file included from include/linux/preempt.h:10:0,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:5,
from include/linux/slab.h:14,
from fs/super.c:24:
   include/linux/list.h:200:19: note: expected 'const struct list_head *' but 
argument is of type 'struct list_head'
static inline int list_empty(const struct list_head *head)
  ^~
   In file included from include/asm-generic/bug.h:4:0,
from arch/x86/include/asm/bug.h:81,
from include/linux/bug.h:4,
from include/linux/mmdebug.h:4,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from fs/super.c:24:
   fs/super.c: At top level:
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'strcpy' which is not static
   __f = { \
   ^
   

[josef-btrfs:new-kill-btree-inode 25/28] fs/super.c:450:19: error: incompatible type for argument 1 of 'list_empty'

2017-11-09 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
new-kill-btree-inode
head:   246e803530bee11804fa19b24ce467d2a2c9cb5d
commit: 406cde4fc84d7943fa7d69642cc7fd563301f5e6 [25/28] writeback: introduce 
super_operations->write_metadata
config: x86_64-randconfig-x018-201745 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
git checkout 406cde4fc84d7943fa7d69642cc7fd563301f5e6
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   fs/super.c: In function 'generic_shutdown_super':
>> fs/super.c:450:19: error: incompatible type for argument 1 of 'list_empty'
  if (!list_empty(sb->s_bdi_list)) {
  ^~
   In file included from include/linux/preempt.h:10:0,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:5,
from include/linux/slab.h:14,
from fs/super.c:24:
   include/linux/list.h:200:19: note: expected 'const struct list_head *' but 
argument is of type 'struct list_head'
static inline int list_empty(const struct list_head *head)
  ^~

vim +/list_empty +450 fs/super.c

   401  
   402  /**
   403   *  generic_shutdown_super  -   common helper for ->kill_sb()
   404   *  @sb: superblock to kill
   405   *
   406   *  generic_shutdown_super() does all fs-independent work on 
superblock
   407   *  shutdown.  Typical ->kill_sb() should pick all fs-specific 
objects
   408   *  that need destruction out of superblock, call 
generic_shutdown_super()
   409   *  and release aforementioned objects.  Note: dentries and inodes 
_are_
   410   *  taken care of and do not need specific handling.
   411   *
   412   *  Upon calling this function, the filesystem may no longer alter 
or
   413   *  rearrange the set of dentries belonging to this super_block, 
nor may it
   414   *  change the attachments of dentries to inodes.
   415   */
   416  void generic_shutdown_super(struct super_block *sb)
   417  {
   418  const struct super_operations *sop = sb->s_op;
   419  
   420  if (sb->s_root) {
   421  shrink_dcache_for_umount(sb);
   422  sync_filesystem(sb);
   423  sb->s_flags &= ~SB_ACTIVE;
   424  
   425  fsnotify_unmount_inodes(sb);
   426  cgroup_writeback_umount();
   427  
   428  evict_inodes(sb);
   429  
   430  if (sb->s_dio_done_wq) {
   431  destroy_workqueue(sb->s_dio_done_wq);
   432  sb->s_dio_done_wq = NULL;
   433  }
   434  
   435  if (sop->put_super)
   436  sop->put_super(sb);
   437  
   438  if (!list_empty(>s_inodes)) {
   439  printk("VFS: Busy inodes after unmount of %s. "
   440 "Self-destruct in 5 seconds.  Have a nice 
day...\n",
   441 sb->s_id);
   442  }
   443  }
   444  spin_lock(_lock);
   445  /* should be initialized for __put_super_and_need_restart() */
   446  hlist_del_init(>s_instances);
   447  spin_unlock(_lock);
   448  up_write(>s_umount);
   449  if (sb->s_bdi != _backing_dev_info) {
 > 450  if (!list_empty(sb->s_bdi_list)) {
   451  spin_lock(>s_bdi->sb_list_lock);
   452  list_del_init(>s_bdi_list);
   453  spin_unlock(>s_bdi->sb_list_lock);
   454  }
   455  bdi_put(sb->s_bdi);
   456  sb->s_bdi = _backing_dev_info;
   457  }
   458  }
   459  

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


.config.gz
Description: application/gzip


[josef-btrfs:bpf-override-return 1/2] bpf_trace.c:undefined reference to `trace_kprobe_ftrace'

2017-11-01 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
bpf-override-return
head:   4c8ff03808e83b25a9771d1171741d550072ba36
commit: 4608d4f4e271703f1609a78c9c0ac2f5d1fb59a2 [1/2] bpf: add a 
bpf_override_function helper
config: i386-randconfig-x0-11020159 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
git checkout 4608d4f4e271703f1609a78c9c0ac2f5d1fb59a2
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   kernel/trace/bpf_trace.o: In function `perf_event_attach_bpf_prog':
>> bpf_trace.c:(.text+0xe43): undefined reference to `trace_kprobe_ftrace'

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


.config.gz
Description: application/gzip


[josef-btrfs:new-kill-btree-inode 22/22] fs//btrfs/send.c:6425:22: warning: assignment makes pointer from integer without a cast

2017-09-26 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
new-kill-btree-inode
head:   f2213041f761c4972696a8dabfad3c8bac9ffde2
commit: f2213041f761c4972696a8dabfad3c8bac9ffde2 [22/22] btrfs: fix send ioctl 
on 32bit with 64bit kernel
config: x86_64-randconfig-x018-201739 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
git checkout f2213041f761c4972696a8dabfad3c8bac9ffde2
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   fs//btrfs/send.c: In function 'btrfs_ioctl_send':
   fs//btrfs/send.c:6425:24: error: implicit declaration of function 
'compat_ptr' [-Werror=implicit-function-declaration]
  arg->clone_sources = compat_ptr(args32.clone_sources);
   ^~
>> fs//btrfs/send.c:6425:22: warning: assignment makes pointer from integer 
>> without a cast [-Wint-conversion]
  arg->clone_sources = compat_ptr(args32.clone_sources);
 ^
   cc1: some warnings being treated as errors

vim +6425 fs//btrfs/send.c

  6368  
  6369  long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_, bool 
compat)
  6370  {
  6371  int ret = 0;
  6372  struct btrfs_root *send_root = 
BTRFS_I(file_inode(mnt_file))->root;
  6373  struct btrfs_fs_info *fs_info = send_root->fs_info;
  6374  struct btrfs_root *clone_root;
  6375  struct btrfs_ioctl_send_args *arg = NULL;
  6376  struct btrfs_key key;
  6377  struct send_ctx *sctx = NULL;
  6378  u32 i;
  6379  u64 *clone_sources_tmp = NULL;
  6380  int clone_sources_to_rollback = 0;
  6381  unsigned alloc_size;
  6382  int sort_clone_roots = 0;
  6383  int index;
  6384  
  6385  if (!capable(CAP_SYS_ADMIN))
  6386  return -EPERM;
  6387  
  6388  /*
  6389   * The subvolume must remain read-only during send, protect 
against
  6390   * making it RW. This also protects against deletion.
  6391   */
  6392  spin_lock(_root->root_item_lock);
  6393  send_root->send_in_progress++;
  6394  spin_unlock(_root->root_item_lock);
  6395  
  6396  /*
  6397   * This is done when we lookup the root, it should already be 
complete
  6398   * by the time we get here.
  6399   */
  6400  WARN_ON(send_root->orphan_cleanup_state != ORPHAN_CLEANUP_DONE);
  6401  
  6402  /*
  6403   * Userspace tools do the checks and warn the user if it's
  6404   * not RO.
  6405   */
  6406  if (!btrfs_root_readonly(send_root)) {
  6407  ret = -EPERM;
  6408  goto out;
  6409  }
  6410  
  6411  if (compat) {
  6412  struct btrfs_ioctl_send_args_32 args32;
  6413  ret = copy_from_user(, arg_, sizeof(args32));
  6414  if (ret) {
  6415  btrfs_err(fs_info, "args32 copy failed\n");
  6416  goto out;
  6417  }
  6418  arg = kzalloc(sizeof(*arg), GFP_KERNEL);
  6419  if (!arg) {
  6420  ret = -ENOMEM;
  6421  goto out;
  6422  }
  6423  arg->send_fd = args32.send_fd;
  6424  arg->clone_sources_count = args32.clone_sources_count;
> 6425  arg->clone_sources = compat_ptr(args32.clone_sources);

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


.config.gz
Description: application/gzip


[josef-btrfs:new-kill-btree-inode 22/22] fs/btrfs/send.c:6412:35: error: storage size of 'args32' isn't known

2017-09-26 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
new-kill-btree-inode
head:   f2213041f761c4972696a8dabfad3c8bac9ffde2
commit: f2213041f761c4972696a8dabfad3c8bac9ffde2 [22/22] btrfs: fix send ioctl 
on 32bit with 64bit kernel
config: i386-randconfig-x000-201739 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
git checkout f2213041f761c4972696a8dabfad3c8bac9ffde2
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   fs/btrfs/send.c: In function 'btrfs_ioctl_send':
>> fs/btrfs/send.c:6412:35: error: storage size of 'args32' isn't known
  struct btrfs_ioctl_send_args_32 args32;
  ^~
>> fs/btrfs/send.c:6425:24: error: implicit declaration of function 
>> 'compat_ptr' [-Werror=implicit-function-declaration]
  arg->clone_sources = compat_ptr(args32.clone_sources);
   ^~
   fs/btrfs/send.c:6412:35: warning: unused variable 'args32' 
[-Wunused-variable]
  struct btrfs_ioctl_send_args_32 args32;
  ^~
   cc1: some warnings being treated as errors

vim +6412 fs/btrfs/send.c

  6368  
  6369  long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_, bool 
compat)
  6370  {
  6371  int ret = 0;
  6372  struct btrfs_root *send_root = 
BTRFS_I(file_inode(mnt_file))->root;
  6373  struct btrfs_fs_info *fs_info = send_root->fs_info;
  6374  struct btrfs_root *clone_root;
  6375  struct btrfs_ioctl_send_args *arg = NULL;
  6376  struct btrfs_key key;
  6377  struct send_ctx *sctx = NULL;
  6378  u32 i;
  6379  u64 *clone_sources_tmp = NULL;
  6380  int clone_sources_to_rollback = 0;
  6381  unsigned alloc_size;
  6382  int sort_clone_roots = 0;
  6383  int index;
  6384  
  6385  if (!capable(CAP_SYS_ADMIN))
  6386  return -EPERM;
  6387  
  6388  /*
  6389   * The subvolume must remain read-only during send, protect 
against
  6390   * making it RW. This also protects against deletion.
  6391   */
  6392  spin_lock(_root->root_item_lock);
  6393  send_root->send_in_progress++;
  6394  spin_unlock(_root->root_item_lock);
  6395  
  6396  /*
  6397   * This is done when we lookup the root, it should already be 
complete
  6398   * by the time we get here.
  6399   */
  6400  WARN_ON(send_root->orphan_cleanup_state != ORPHAN_CLEANUP_DONE);
  6401  
  6402  /*
  6403   * Userspace tools do the checks and warn the user if it's
  6404   * not RO.
  6405   */
  6406  if (!btrfs_root_readonly(send_root)) {
  6407  ret = -EPERM;
  6408  goto out;
  6409  }
  6410  
  6411  if (compat) {
> 6412  struct btrfs_ioctl_send_args_32 args32;
  6413  ret = copy_from_user(, arg_, sizeof(args32));
  6414  if (ret) {
  6415  btrfs_err(fs_info, "args32 copy failed\n");
  6416  goto out;
  6417  }
  6418  arg = kzalloc(sizeof(*arg), GFP_KERNEL);
  6419  if (!arg) {
  6420  ret = -ENOMEM;
  6421  goto out;
  6422  }
  6423  arg->send_fd = args32.send_fd;
  6424  arg->clone_sources_count = args32.clone_sources_count;
> 6425  arg->clone_sources = compat_ptr(args32.clone_sources);

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


.config.gz
Description: application/gzip


[josef-btrfs:new-kill-btree-inode 20/20] ERROR: "radix_tree_iter_tag_set" [fs/btrfs/btrfs.ko] undefined!

2017-09-22 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
new-kill-btree-inode
head:   3264d40ac916ca952f0b85e39304b9199ff36d8b
commit: 3264d40ac916ca952f0b85e39304b9199ff36d8b [20/20] Btrfs: kill the 
btree_inode
config: x86_64-randconfig-i0-201738 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
git checkout 3264d40ac916ca952f0b85e39304b9199ff36d8b
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> ERROR: "radix_tree_iter_tag_set" [fs/btrfs/btrfs.ko] undefined!

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


.config.gz
Description: application/gzip


[josef-btrfs:new-kill-btree-inode 17/20] fs/ntfs/attrib.c:2549:35: error: implicit declaration of function 'inode_to_bdi'

2017-09-22 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
new-kill-btree-inode
head:   3264d40ac916ca952f0b85e39304b9199ff36d8b
commit: a03edce0823e97312869c60933b37157c3b8866a [17/20] remove mapping from 
balance_dirty_pages*()
config: x86_64-randconfig-x007-201738 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
git checkout a03edce0823e97312869c60933b37157c3b8866a
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   fs/ntfs/attrib.c: In function 'ntfs_attr_set':
>> fs/ntfs/attrib.c:2549:35: error: implicit declaration of function 
>> 'inode_to_bdi' [-Werror=implicit-function-declaration]
  balance_dirty_pages_ratelimited(inode_to_bdi(inode),
  ^~~~
   fs/ntfs/attrib.c:2549:35: warning: passing argument 1 of 
'balance_dirty_pages_ratelimited' makes pointer from integer without a cast 
[-Wint-conversion]
   In file included from include/linux/memcontrol.h:31:0,
from include/linux/swap.h:8,
from fs/ntfs/attrib.c:26:
   include/linux/writeback.h:380:6: note: expected 'struct backing_dev_info *' 
but argument is of type 'int'
void balance_dirty_pages_ratelimited(struct backing_dev_info *bdi,
 ^~~
   fs/ntfs/attrib.c:2591:35: warning: passing argument 1 of 
'balance_dirty_pages_ratelimited' makes pointer from integer without a cast 
[-Wint-conversion]
  balance_dirty_pages_ratelimited(inode_to_bdi(inode),
  ^~~~
   In file included from include/linux/memcontrol.h:31:0,
from include/linux/swap.h:8,
from fs/ntfs/attrib.c:26:
   include/linux/writeback.h:380:6: note: expected 'struct backing_dev_info *' 
but argument is of type 'int'
void balance_dirty_pages_ratelimited(struct backing_dev_info *bdi,
 ^~~
   fs/ntfs/attrib.c:2609:35: warning: passing argument 1 of 
'balance_dirty_pages_ratelimited' makes pointer from integer without a cast 
[-Wint-conversion]
  balance_dirty_pages_ratelimited(inode_to_bdi(inode),
  ^~~~
   In file included from include/linux/memcontrol.h:31:0,
from include/linux/swap.h:8,
from fs/ntfs/attrib.c:26:
   include/linux/writeback.h:380:6: note: expected 'struct backing_dev_info *' 
but argument is of type 'int'
void balance_dirty_pages_ratelimited(struct backing_dev_info *bdi,
 ^~~
   cc1: some warnings being treated as errors

vim +/inode_to_bdi +2549 fs/ntfs/attrib.c

  2472  
  2473  /**
  2474   * ntfs_attr_set - fill (a part of) an attribute with a byte
  2475   * @ni: ntfs inode describing the attribute to fill
  2476   * @ofs:offset inside the attribute at which to start to fill
  2477   * @cnt:number of bytes to fill
  2478   * @val:the unsigned 8-bit value with which to fill the 
attribute
  2479   *
  2480   * Fill @cnt bytes of the attribute described by the ntfs inode @ni 
starting at
  2481   * byte offset @ofs inside the attribute with the constant byte @val.
  2482   *
  2483   * This function is effectively like memset() applied to an ntfs 
attribute.
  2484   * Note thie function actually only operates on the page cache pages 
belonging
  2485   * to the ntfs attribute and it marks them dirty after doing the 
memset().
  2486   * Thus it relies on the vm dirty page write code paths to cause the 
modified
  2487   * pages to be written to the mft record/disk.
  2488   *
  2489   * Return 0 on success and -errno on error.  An error code of -ESPIPE 
means
  2490   * that @ofs + @cnt were outside the end of the attribute and no write 
was
  2491   * performed.
  2492   */
  2493  int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const 
u8 val)
  2494  {
  2495  ntfs_volume *vol = ni->vol;
  2496  struct inode *inode = VFS_I(ni);
  2497  struct address_space *mapping;
  2498  struct page *page;
  2499  u8 *kaddr;
  2500  pgoff_t idx, end;
  2501  unsigned start_ofs, end_ofs, size;
  2502  
  2503  ntfs_debug("Entering for ofs 0x%llx, cnt 0x%llx, val 0x%hx.",
  2504  (long long)ofs, (long long)cnt, val);
  2505  BUG_ON(ofs < 0);
  2506  BUG_ON(cnt < 0);
  2507  if (!cnt)
  2508  goto done;
  2509  /*
  2510   * FIXME: Compressed and encrypted attributes are not supported 
when
  2511   * writing and we should never have gotten here for them.
  2512   */
  2513  BUG_ON(NInoCompressed(ni));
  2514  BUG_ON(NInoEncrypted(ni));
  2515  mapping = VFS_I(ni)->i_mapping;
  2516  /* Work out the starting index and page offset. */
  2517 

[josef-btrfs:btrfs-readdir 4/4] fs//btrfs/ref-verify.c:231:21: error: storage size of 'stack_trace' isn't known

2017-08-31 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
btrfs-readdir
head:   fcde4ff2122bcd230de62daec6d466631666d284
commit: fcde4ff2122bcd230de62daec6d466631666d284 [4/4] Btrfs: add a extent ref 
verify tool
config: alpha-allmodconfig (attached as .config)
compiler: alpha-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout fcde4ff2122bcd230de62daec6d466631666d284
# save the attached .config to linux build tree
make.cross ARCH=alpha 

All errors (new ones prefixed by >>):

   fs//btrfs/ref-verify.c: In function '__save_stack_trace':
>> fs//btrfs/ref-verify.c:231:21: error: storage size of 'stack_trace' isn't 
>> known
 struct stack_trace stack_trace;
^~~
   fs//btrfs/ref-verify.c:231:21: warning: unused variable 'stack_trace' 
[-Wunused-variable]
   fs//btrfs/ref-verify.c: In function 'build_ref_tree_for_root':
   fs//btrfs/ref-verify.c:583:7: error: implicit declaration of function 
'btrfs_read_lock_root_node' [-Werror=implicit-function-declaration]
 eb = btrfs_read_lock_root_node(root);
  ^
   fs//btrfs/ref-verify.c:583:5: warning: assignment makes pointer from integer 
without a cast [-Wint-conversion]
 eb = btrfs_read_lock_root_node(root);
^
   fs//btrfs/ref-verify.c: In function 'dump_ref_action':
>> fs//btrfs/ref-verify.c:616:21: error: storage size of 'trace' isn't known
 struct stack_trace trace;
^
   fs//btrfs/ref-verify.c:616:21: warning: unused variable 'trace' 
[-Wunused-variable]
   cc1: some warnings being treated as errors

vim +231 fs//btrfs/ref-verify.c

   228  
   229  static void __save_stack_trace(struct ref_action *ra)
   230  {
 > 231  struct stack_trace stack_trace;
   232  
   233  stack_trace.max_entries = MAX_TRACE;
   234  stack_trace.nr_entries = 0;
   235  stack_trace.entries = ra->trace;
   236  stack_trace.skip = 2;
   237  save_stack_trace(_trace);
   238  ra->trace_len = stack_trace.nr_entries;
   239  }
   240  

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


.config.gz
Description: application/gzip


[josef-btrfs:btrfs-readdir 4/4] fs//btrfs/ref-verify.c:583:2: error: implicit declaration of function 'btrfs_read_lock_root_node'

2017-08-31 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
btrfs-readdir
head:   fcde4ff2122bcd230de62daec6d466631666d284
commit: fcde4ff2122bcd230de62daec6d466631666d284 [4/4] Btrfs: add a extent ref 
verify tool
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout fcde4ff2122bcd230de62daec6d466631666d284
# save the attached .config to linux build tree
make.cross ARCH=xtensa 

All error/warnings (new ones prefixed by >>):

   fs//btrfs/ref-verify.c: In function 'build_ref_tree_for_root':
>> fs//btrfs/ref-verify.c:583:2: error: implicit declaration of function 
>> 'btrfs_read_lock_root_node' [-Werror=implicit-function-declaration]
 eb = btrfs_read_lock_root_node(root);
 ^
>> fs//btrfs/ref-verify.c:583:5: warning: assignment makes pointer from integer 
>> without a cast
 eb = btrfs_read_lock_root_node(root);
^
   cc1: some warnings being treated as errors

vim +/btrfs_read_lock_root_node +583 fs//btrfs/ref-verify.c

   571  
   572  static int build_ref_tree_for_root(struct btrfs_root *root)
   573  {
   574  struct btrfs_path *path;
   575  struct extent_buffer *eb;
   576  int level;
   577  int ret = 0;
   578  
   579  path = btrfs_alloc_path();
   580  if (!path)
   581  return -ENOMEM;
   582  
 > 583  eb = btrfs_read_lock_root_node(root);
   584  btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK);
   585  level = btrfs_header_level(eb);
   586  path->nodes[level] = eb;
   587  path->slots[level] = 0;
   588  path->locks[level] = BTRFS_READ_LOCK_BLOCKING;
   589  
   590  ret = add_tree_block(root, 0, eb->start, level);
   591  if (ret) {
   592  btrfs_free_path(path);
   593  return ret;
   594  }
   595  
   596  while (1) {
   597  ret = walk_down_tree(root, path, level);
   598  if (ret)
   599  break;
   600  ret = walk_up_tree(root, path, );
   601  if (ret < 0)
   602  break;
   603  if (ret > 0) {
   604  ret = 0;
   605  break;
   606  }
   607  }
   608  if (ret)
   609  btrfs_free_ref_cache(root->fs_info);
   610  btrfs_free_path(path);
   611  return ret;
   612  }
   613  

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


.config.gz
Description: application/gzip


[josef-btrfs:slab-priority 4/6] fs//ntfs/attrib.c:2549:35: error: implicit declaration of function 'inode_to_bdi'

2017-08-22 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
slab-priority
head:   a1be3b41415243d20c90e9e92e82808fe1ff91a0
commit: fe049b0156a10dd0bb3fbf3d4dad3ca943874f10 [4/6] remove mapping from 
balance_dirty_pages*()
config: i386-randconfig-a1-201734 (attached as .config)
compiler: gcc-5 (Debian 5.4.1-2) 5.4.1 20160904
reproduce:
git checkout fe049b0156a10dd0bb3fbf3d4dad3ca943874f10
# save the attached .config to linux build tree
make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   fs//ntfs/attrib.c: In function 'ntfs_attr_set':
>> fs//ntfs/attrib.c:2549:35: error: implicit declaration of function 
>> 'inode_to_bdi' [-Werror=implicit-function-declaration]
  balance_dirty_pages_ratelimited(inode_to_bdi(inode),
  ^
>> fs//ntfs/attrib.c:2549:35: warning: passing argument 1 of 
>> 'balance_dirty_pages_ratelimited' makes pointer from integer without a cast 
>> [-Wint-conversion]
   In file included from include/linux/memcontrol.h:31:0,
from include/linux/swap.h:8,
from fs//ntfs/attrib.c:26:
   include/linux/writeback.h:380:6: note: expected 'struct backing_dev_info *' 
but argument is of type 'int'
void balance_dirty_pages_ratelimited(struct backing_dev_info *bdi,
 ^
   fs//ntfs/attrib.c:2591:35: warning: passing argument 1 of 
'balance_dirty_pages_ratelimited' makes pointer from integer without a cast 
[-Wint-conversion]
  balance_dirty_pages_ratelimited(inode_to_bdi(inode),
  ^
   In file included from include/linux/memcontrol.h:31:0,
from include/linux/swap.h:8,
from fs//ntfs/attrib.c:26:
   include/linux/writeback.h:380:6: note: expected 'struct backing_dev_info *' 
but argument is of type 'int'
void balance_dirty_pages_ratelimited(struct backing_dev_info *bdi,
 ^
   fs//ntfs/attrib.c:2609:35: warning: passing argument 1 of 
'balance_dirty_pages_ratelimited' makes pointer from integer without a cast 
[-Wint-conversion]
  balance_dirty_pages_ratelimited(inode_to_bdi(inode),
  ^
   In file included from include/linux/memcontrol.h:31:0,
from include/linux/swap.h:8,
from fs//ntfs/attrib.c:26:
   include/linux/writeback.h:380:6: note: expected 'struct backing_dev_info *' 
but argument is of type 'int'
void balance_dirty_pages_ratelimited(struct backing_dev_info *bdi,
 ^
   cc1: some warnings being treated as errors

vim +/inode_to_bdi +2549 fs//ntfs/attrib.c

  2472  
  2473  /**
  2474   * ntfs_attr_set - fill (a part of) an attribute with a byte
  2475   * @ni: ntfs inode describing the attribute to fill
  2476   * @ofs:offset inside the attribute at which to start to fill
  2477   * @cnt:number of bytes to fill
  2478   * @val:the unsigned 8-bit value with which to fill the 
attribute
  2479   *
  2480   * Fill @cnt bytes of the attribute described by the ntfs inode @ni 
starting at
  2481   * byte offset @ofs inside the attribute with the constant byte @val.
  2482   *
  2483   * This function is effectively like memset() applied to an ntfs 
attribute.
  2484   * Note thie function actually only operates on the page cache pages 
belonging
  2485   * to the ntfs attribute and it marks them dirty after doing the 
memset().
  2486   * Thus it relies on the vm dirty page write code paths to cause the 
modified
  2487   * pages to be written to the mft record/disk.
  2488   *
  2489   * Return 0 on success and -errno on error.  An error code of -ESPIPE 
means
  2490   * that @ofs + @cnt were outside the end of the attribute and no write 
was
  2491   * performed.
  2492   */
  2493  int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const 
u8 val)
  2494  {
  2495  ntfs_volume *vol = ni->vol;
  2496  struct inode *inode = VFS_I(ni);
  2497  struct address_space *mapping;
  2498  struct page *page;
  2499  u8 *kaddr;
  2500  pgoff_t idx, end;
  2501  unsigned start_ofs, end_ofs, size;
  2502  
  2503  ntfs_debug("Entering for ofs 0x%llx, cnt 0x%llx, val 0x%hx.",
  2504  (long long)ofs, (long long)cnt, val);
  2505  BUG_ON(ofs < 0);
  2506  BUG_ON(cnt < 0);
  2507  if (!cnt)
  2508  goto done;
  2509  /*
  2510   * FIXME: Compressed and encrypted attributes are not supported 
when
  2511   * writing and we should never have gotten here for them.
  2512   */
  2513  BUG_ON(NInoCompressed(ni));
  2514  BUG_ON(NInoEncrypted(ni));
  2515  mapping = VFS_I(ni)->i_mapping;
  2516  /* Work out the starting index and page offset. */
  2517  idx = ofs >> PAGE_SHIFT;
  2518  start_ofs = ofs & ~PAGE_MASK;
  2519  /* Work out the ending 

Re: [PATCH 4/4 v3] btrfs: add compression trace points

2017-08-15 Thread kbuild test robot
Hi Anand,

[auto build test WARNING on tip/perf/core]
[also build test WARNING on v4.13-rc5]
[cannot apply to btrfs/next next-20170815]
[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/Anand-Jain/misc-compression-tracing-related-patches/20170816-043401
config: s390-allmodconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=s390 

All warnings (new ones prefixed by >>):

   In file included from include/trace/define_trace.h:95:0,
from include/trace/events/btrfs.h:1674,
from fs/btrfs/super.c:65:
   include/trace/events/btrfs.h: In function 'trace_raw_output_btrfs_compress':
>> include/trace/events/btrfs.h:91:12: warning: format '%lu' expects argument 
>> of type 'long unsigned int', but argument 6 has type 'ino_t {aka unsigned 
>> int}' [-Wformat=]
 TP_printk("%pU: " fmt, __entry->fsid, args)
   ^
   include/trace/trace_events.h:359:22: note: in definition of macro 
'DECLARE_EVENT_CLASS'
 trace_seq_printf(s, print); \
 ^
   include/trace/trace_events.h:78:9: note: in expansion of macro 'PARAMS'
PARAMS(print)); \
^~
>> include/trace/events/btrfs.h:1632:1: note: in expansion of macro 
>> 'TRACE_EVENT'
TRACE_EVENT(btrfs_compress,
^~~
>> include/trace/events/btrfs.h:91:2: note: in expansion of macro 'TP_printk'
 TP_printk("%pU: " fmt, __entry->fsid, args)
 ^
>> include/trace/events/btrfs.h:1664:2: note: in expansion of macro 
>> 'TP_printk_btrfs'
 TP_printk_btrfs("%s %s ino=%lu type=%s len_before=%lu len_after=%lu 
start=%lu ret=%d",
 ^~~

vim +91 include/trace/events/btrfs.h

bc074524 Jeff Mahoney 2016-06-09  78  
bc074524 Jeff Mahoney 2016-06-09  79  #define TP_fast_assign_fsid(fs_info)  
\
bc074524 Jeff Mahoney 2016-06-09  80memcpy(__entry->fsid, fs_info->fsid, 
BTRFS_UUID_SIZE)
bc074524 Jeff Mahoney 2016-06-09  81  
bc074524 Jeff Mahoney 2016-06-09  82  #define TP_STRUCT__entry_btrfs(args...)   
\
bc074524 Jeff Mahoney 2016-06-09  83TP_STRUCT__entry(   
\
bc074524 Jeff Mahoney 2016-06-09  84TP_STRUCT__entry_fsid   
\
bc074524 Jeff Mahoney 2016-06-09  85args)
bc074524 Jeff Mahoney 2016-06-09  86  #define TP_fast_assign_btrfs(fs_info, 
args...)\
bc074524 Jeff Mahoney 2016-06-09  87TP_fast_assign( 
\
bc074524 Jeff Mahoney 2016-06-09  88TP_fast_assign_fsid(fs_info);   
\
bc074524 Jeff Mahoney 2016-06-09  89args)
bc074524 Jeff Mahoney 2016-06-09  90  #define TP_printk_btrfs(fmt, args...) \
bc074524 Jeff Mahoney 2016-06-09 @91TP_printk("%pU: " fmt, __entry->fsid, 
args)
8c2a3ca2 Josef Bacik  2012-01-10  92  

:: The code at line 91 was first introduced by commit
:: bc074524e123ded281cde25ebc5661910f9679e3 btrfs: prefix fsid to all trace 
events

:: TO: Jeff Mahoney 
:: CC: David Sterba 

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


.config.gz
Description: application/gzip


Re: [PATCH] Btrfs: fix out of bounds array access while reading extent buffer

2017-08-11 Thread kbuild test robot
Hi Liu,

[auto build test WARNING on v4.13-rc4]
[also build test WARNING on next-20170811]
[cannot apply to btrfs/next]
[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/Liu-Bo/Btrfs-fix-out-of-bounds-array-access-while-reading-extent-buffer/20170810-235607
config: x86_64-randconfig-a0-08120433 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   fs//btrfs/extent_io.c: In function 'read_extent_buffer':
>> fs//btrfs/extent_io.c:5419: warning: unused variable 'num_pages'

vim +/num_pages +5419 fs//btrfs/extent_io.c

  5407  
  5408  void read_extent_buffer(struct extent_buffer *eb, void *dstv,
  5409  unsigned long start,
  5410  unsigned long len)
  5411  {
  5412  size_t cur;
  5413  size_t offset;
  5414  struct page *page;
  5415  char *kaddr;
  5416  char *dst = (char *)dstv;
  5417  size_t start_offset = eb->start & ((u64)PAGE_SIZE - 1);
  5418  unsigned long i = (start_offset + start) >> PAGE_SHIFT;
> 5419  unsigned long num_pages = num_extent_pages(eb->start, eb->len);
  5420  
  5421  if (start + len > eb->len) {
  5422  WARN(1, KERN_ERR "btrfs bad mapping eb start %llu len 
%lu, wanted %lu %lu\n",
  5423   eb->start, eb->len, start, len);
  5424  memset(dst, 0, len);
  5425  return;
  5426  }
  5427  
  5428  offset = (start_offset + start) & (PAGE_SIZE - 1);
  5429  
  5430  while (len > 0) {
  5431  ASSERT(i < num_pages);
  5432  page = eb->pages[i];
  5433  
  5434  cur = min(len, (PAGE_SIZE - offset));
  5435  kaddr = page_address(page);
  5436  memcpy(dst, kaddr + offset, cur);
  5437  
  5438  dst += cur;
  5439  len -= cur;
  5440  offset = 0;
  5441  i++;
  5442  }
  5443  }
  5444  

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


.config.gz
Description: application/gzip


Re: [PATCH v3 46/49] fs/btrfs: convert to bio_for_each_segment_all_sp()

2017-08-11 Thread kbuild test robot
Hi Ming,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.13-rc4 next-20170810]
[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/Ming-Lei/block-support-multipage-bvec/20170810-110521
config: x86_64-randconfig-b0-08112217 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   fs/btrfs/raid56.c: In function 'find_logical_bio_stripe':
>> fs/btrfs/raid56.c:1368: warning: unused variable 'bia'

vim +/bia +1368 fs/btrfs/raid56.c

  1356  
  1357  /*
  1358   * helper to find the stripe number for a given
  1359   * bio (before mapping).  Used to figure out which stripe has
  1360   * failed.  This looks up based on logical block numbers.
  1361   */
  1362  static int find_logical_bio_stripe(struct btrfs_raid_bio *rbio,
  1363 struct bio *bio)
  1364  {
  1365  u64 logical = bio->bi_iter.bi_sector;
  1366  u64 stripe_start;
  1367  int i;
> 1368  struct bvec_iter_all bia;
  1369  
  1370  logical <<= 9;
  1371  
  1372  for (i = 0; i < rbio->nr_data; i++) {
  1373  stripe_start = rbio->bbio->raid_map[i];
  1374  if (logical >= stripe_start &&
  1375  logical < stripe_start + rbio->stripe_len) {
  1376  return i;
  1377  }
  1378  }
  1379  return -1;
  1380  }
  1381  

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


.config.gz
Description: application/gzip


Re: [PATCH] Btrfs: search parity device wisely

2017-08-03 Thread kbuild test robot
Hi Liu,

[auto build test ERROR on v4.13-rc3]
[also build test ERROR on next-20170803]
[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/Liu-Bo/Btrfs-search-parity-device-wisely/20170803-193103
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=xtensa 

All errors (new ones prefixed by >>):

   fs/btrfs/raid56.c: In function 'raid56_parity_alloc_scrub_rbio':
>> fs/btrfs/raid56.c:2232:15: error: 'struct btrfs_raid_bio' has no member 
>> named 'data_stripes'
 for (i = rbio->data_stripes; i < rbio->real_stripes; i++) {
  ^

vim +2232 fs/btrfs/raid56.c

  2201  
  2202  /*
  2203   * The following code is used to scrub/replace the parity stripe
  2204   *
  2205   * Caller must have already increased bio_counter for getting @bbio.
  2206   *
  2207   * Note: We need make sure all the pages that add into the scrub/replace
  2208   * raid bio are correct and not be changed during the scrub/replace. 
That
  2209   * is those pages just hold metadata or file data with checksum.
  2210   */
  2211  
  2212  struct btrfs_raid_bio *
  2213  raid56_parity_alloc_scrub_rbio(struct btrfs_fs_info *fs_info, struct 
bio *bio,
  2214 struct btrfs_bio *bbio, u64 stripe_len,
  2215 struct btrfs_device *scrub_dev,
  2216 unsigned long *dbitmap, int 
stripe_nsectors)
  2217  {
  2218  struct btrfs_raid_bio *rbio;
  2219  int i;
  2220  
  2221  rbio = alloc_rbio(fs_info, bbio, stripe_len);
    if (IS_ERR(rbio))
  2223  return NULL;
  2224  bio_list_add(>bio_list, bio);
  2225  /*
  2226   * This is a special bio which is used to hold the completion 
handler
  2227   * and make the scrub rbio is similar to the other types
  2228   */
  2229  ASSERT(!bio->bi_iter.bi_size);
  2230  rbio->operation = BTRFS_RBIO_PARITY_SCRUB;
  2231  
> 2232  for (i = rbio->data_stripes; i < rbio->real_stripes; i++) {
  2233  if (bbio->stripes[i].dev == scrub_dev) {
  2234  rbio->scrubp = i;
  2235  break;
  2236  }
  2237  }
  2238  ASSERT(i < rbio->real_stripes);
  2239  
  2240  /* Now we just support the sectorsize equals to page size */
  2241  ASSERT(fs_info->sectorsize == PAGE_SIZE);
  2242  ASSERT(rbio->stripe_npages == stripe_nsectors);
  2243  bitmap_copy(rbio->dbitmap, dbitmap, stripe_nsectors);
  2244  
  2245  /*
  2246   * We have already increased bio_counter when getting bbio, 
record it
  2247   * so we can free it at rbio_orig_end_io().
  2248   */
  2249  rbio->generic_bio_cnt = 1;
  2250  
  2251  return rbio;
  2252  }
  2253  

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


.config.gz
Description: application/gzip


Re: [PATCH] Btrfs: search parity device wisely

2017-08-03 Thread kbuild test robot
Hi Liu,

[auto build test ERROR on v4.13-rc3]
[also build test ERROR on next-20170803]
[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/Liu-Bo/Btrfs-search-parity-device-wisely/20170803-193103
config: x86_64-randconfig-x007-201731 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   fs/btrfs/raid56.c: In function 'raid56_parity_alloc_scrub_rbio':
>> fs/btrfs/raid56.c:2232:15: error: 'struct btrfs_raid_bio' has no member 
>> named 'data_stripes'; did you mean 'real_stripes'?
 for (i = rbio->data_stripes; i < rbio->real_stripes; i++) {
  ^~

vim +2232 fs/btrfs/raid56.c

  2201  
  2202  /*
  2203   * The following code is used to scrub/replace the parity stripe
  2204   *
  2205   * Caller must have already increased bio_counter for getting @bbio.
  2206   *
  2207   * Note: We need make sure all the pages that add into the scrub/replace
  2208   * raid bio are correct and not be changed during the scrub/replace. 
That
  2209   * is those pages just hold metadata or file data with checksum.
  2210   */
  2211  
  2212  struct btrfs_raid_bio *
  2213  raid56_parity_alloc_scrub_rbio(struct btrfs_fs_info *fs_info, struct 
bio *bio,
  2214 struct btrfs_bio *bbio, u64 stripe_len,
  2215 struct btrfs_device *scrub_dev,
  2216 unsigned long *dbitmap, int 
stripe_nsectors)
  2217  {
  2218  struct btrfs_raid_bio *rbio;
  2219  int i;
  2220  
  2221  rbio = alloc_rbio(fs_info, bbio, stripe_len);
    if (IS_ERR(rbio))
  2223  return NULL;
  2224  bio_list_add(>bio_list, bio);
  2225  /*
  2226   * This is a special bio which is used to hold the completion 
handler
  2227   * and make the scrub rbio is similar to the other types
  2228   */
  2229  ASSERT(!bio->bi_iter.bi_size);
  2230  rbio->operation = BTRFS_RBIO_PARITY_SCRUB;
  2231  
> 2232  for (i = rbio->data_stripes; i < rbio->real_stripes; i++) {
  2233  if (bbio->stripes[i].dev == scrub_dev) {
  2234  rbio->scrubp = i;
  2235  break;
  2236  }
  2237  }
  2238  ASSERT(i < rbio->real_stripes);
  2239  
  2240  /* Now we just support the sectorsize equals to page size */
  2241  ASSERT(fs_info->sectorsize == PAGE_SIZE);
  2242  ASSERT(rbio->stripe_npages == stripe_nsectors);
  2243  bitmap_copy(rbio->dbitmap, dbitmap, stripe_nsectors);
  2244  
  2245  /*
  2246   * We have already increased bio_counter when getting bbio, 
record it
  2247   * so we can free it at rbio_orig_end_io().
  2248   */
  2249  rbio->generic_bio_cnt = 1;
  2250  
  2251  return rbio;
  2252  }
  2253  

---
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 3/3] Btrfs: heuristic add byte core set calculation

2017-07-29 Thread kbuild test robot
Hi Timofey,

[auto build test ERROR on next-20170724]
[cannot apply to btrfs/next v4.13-rc2 v4.13-rc1 v4.12 v4.13-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/Timofey-Titovets/Btrfs-populate-heuristic-with-detection-logic/20170729-061208
config: arm-arm5 (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm 

All errors (new ones prefixed by >>):

>> ERROR: "__aeabi_uldivmod" [fs/btrfs/btrfs.ko] undefined!

---
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 3/3] Btrfs: heuristic add byte core set calculation

2017-07-28 Thread kbuild test robot
Hi Timofey,

[auto build test ERROR on next-20170724]
[cannot apply to btrfs/next v4.13-rc2 v4.13-rc1 v4.12 v4.13-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/Timofey-Titovets/Btrfs-populate-heuristic-with-detection-logic/20170729-061208
config: i386-randconfig-n0-201730 (attached as .config)
compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   fs/btrfs/compression.o: In function `btrfs_compress_heuristic':
>> compression.c:(.text+0x2208): undefined reference to `__udivdi3'

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


.config.gz
Description: application/gzip


Re: [PATCH v3 3/4] btrfs: Add zstd support

2017-07-24 Thread kbuild test robot
Hi Nick,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.13-rc2 next-20170724]
[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/Nick-Terrell/Add-xxhash-and-zstd-modules/20170723-092845
config: x86_64-randconfig-a0-07242221 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   lib/zstd/decompress.c: In function 'ZSTD_decodeSequence':
>> lib/zstd/decompress.c:1001: warning: 'seq.match' is used uninitialized in 
>> this function

vim +1001 lib/zstd/decompress.c

dc22844b Nick Terrell 2017-07-20   930  
dc22844b Nick Terrell 2017-07-20   931  static seq_t 
ZSTD_decodeSequence(seqState_t *seqState)
dc22844b Nick Terrell 2017-07-20   932  {
dc22844b Nick Terrell 2017-07-20   933  seq_t seq;
dc22844b Nick Terrell 2017-07-20   934  
dc22844b Nick Terrell 2017-07-20   935  U32 const llCode = 
FSE_peekSymbol(>stateLL);
dc22844b Nick Terrell 2017-07-20   936  U32 const mlCode = 
FSE_peekSymbol(>stateML);
dc22844b Nick Terrell 2017-07-20   937  U32 const ofCode = 
FSE_peekSymbol(>stateOffb); /* <= maxOff, by table construction */
dc22844b Nick Terrell 2017-07-20   938  
dc22844b Nick Terrell 2017-07-20   939  U32 const llBits = 
LL_bits[llCode];
dc22844b Nick Terrell 2017-07-20   940  U32 const mlBits = 
ML_bits[mlCode];
dc22844b Nick Terrell 2017-07-20   941  U32 const ofBits = ofCode;
dc22844b Nick Terrell 2017-07-20   942  U32 const totalBits = llBits + 
mlBits + ofBits;
dc22844b Nick Terrell 2017-07-20   943  
dc22844b Nick Terrell 2017-07-20   944  static const U32 LL_base[MaxLL 
+ 1] = {0,  1,  2,  3,  4,  5,  6,  7,  8,9, 10,11,12,13,   
  14, 15, 16, 18,
dc22844b Nick Terrell 2017-07-20   945  
   20, 22, 24, 28, 32, 40, 48, 64, 0x80, 0x100, 0x200, 0x400, 0x800, 
0x1000, 0x2000, 0x4000, 0x8000, 0x1};
dc22844b Nick Terrell 2017-07-20   946  
dc22844b Nick Terrell 2017-07-20   947  static const U32 ML_base[MaxML 
+ 1] = {3,  4,  5,  6,  7,  8,  9,  10,   11,12,13,14,15, 
16, 17, 18, 19, 20,
dc22844b Nick Terrell 2017-07-20   948  
   21, 22, 23, 24, 25, 26, 27, 28,   29,30,31,32,33, 
34, 35, 37, 39, 41,
dc22844b Nick Terrell 2017-07-20   949  
   43, 47, 51, 59, 67, 83, 99, 0x83, 0x103, 0x203, 0x403, 0x803, 0x1003, 
0x2003, 0x4003, 0x8003, 0x10003};
dc22844b Nick Terrell 2017-07-20   950  
dc22844b Nick Terrell 2017-07-20   951  static const U32 OF_base[MaxOff 
+ 1] = {0,   1, 1,  5,  0xD,  0x1D,  0x3D,  0x7D,   
   0xFD, 0x1FD,
dc22844b Nick Terrell 2017-07-20   952  
0x3FD,   0x7FD,0xFFD,0x1FFD,   0x3FFD,   0x7FFD,0xFFFD,
0x1FFFD,   0x3FFFD,  0x7FFFD,
dc22844b Nick Terrell 2017-07-20   953  
0xD, 0x1D, 0x3D, 0x7D, 0xFD, 0x1FD, 0x3FD, 
0x7FD, 0xFFD};
dc22844b Nick Terrell 2017-07-20   954  
dc22844b Nick Terrell 2017-07-20   955  /* sequence */
dc22844b Nick Terrell 2017-07-20   956  {
dc22844b Nick Terrell 2017-07-20   957  size_t offset;
dc22844b Nick Terrell 2017-07-20   958  if (!ofCode)
dc22844b Nick Terrell 2017-07-20   959  offset = 0;
dc22844b Nick Terrell 2017-07-20   960  else {
dc22844b Nick Terrell 2017-07-20   961  offset = 
OF_base[ofCode] + BIT_readBitsFast(>DStream, ofBits); /* <=  
(ZSTD_WINDOWLOG_MAX-1) bits */
dc22844b Nick Terrell 2017-07-20   962  if 
(ZSTD_32bits())
dc22844b Nick Terrell 2017-07-20   963  
BIT_reloadDStream(>DStream);
dc22844b Nick Terrell 2017-07-20   964  }
dc22844b Nick Terrell 2017-07-20   965  
dc22844b Nick Terrell 2017-07-20   966  if (ofCode <= 1) {
dc22844b Nick Terrell 2017-07-20   967  offset += 
(llCode == 0);
dc22844b Nick Terrell 2017-07-20   968  if (offset) {
dc22844b Nick Terrell 2017-07-20   969  size_t 
temp = (offset == 3) ? seqState->prevOffset[0] - 1 : 
seqState->prevOffset[offset];
dc22844b Nick Terrell 2017-07-20   970  temp += 
!temp; /* 0 is not valid; input is corrupted; force offset to 1 */
dc22844b Nick Terrell 2017-07-20   971  if 
(offset != 1)
dc22844b Nick Terrell 2017-07-20   972  

Re: [PATCH v3 3/4] btrfs: Add zstd support

2017-07-23 Thread kbuild test robot
Hi Nick,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.13-rc1 next-20170721]
[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/Nick-Terrell/Add-xxhash-and-zstd-modules/20170723-092845
config: parisc-allyesconfig (attached as .config)
compiler: hppa-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=parisc 

All warnings (new ones prefixed by >>):

   lib/xxhash.c: In function 'xxh64':
>> lib/xxhash.c:236:1: warning: the frame size of 1688 bytes is larger than 
>> 1024 bytes [-Wframe-larger-than=]
}
^
   lib/xxhash.c: In function 'xxh64_update':
   lib/xxhash.c:441:1: warning: the frame size of 1072 bytes is larger than 
1024 bytes [-Wframe-larger-than=]
}
^

vim +236 lib/xxhash.c

09c83807 Nick Terrell 2017-07-20  171  
09c83807 Nick Terrell 2017-07-20  172  uint64_t xxh64(const void *input, const 
size_t len, const uint64_t seed)
09c83807 Nick Terrell 2017-07-20  173  {
09c83807 Nick Terrell 2017-07-20  174   const uint8_t *p = (const uint8_t 
*)input;
09c83807 Nick Terrell 2017-07-20  175   const uint8_t *const b_end = p + len;
09c83807 Nick Terrell 2017-07-20  176   uint64_t h64;
09c83807 Nick Terrell 2017-07-20  177  
09c83807 Nick Terrell 2017-07-20  178   if (len >= 32) {
09c83807 Nick Terrell 2017-07-20  179   const uint8_t *const limit = 
b_end - 32;
09c83807 Nick Terrell 2017-07-20  180   uint64_t v1 = seed + PRIME64_1 
+ PRIME64_2;
09c83807 Nick Terrell 2017-07-20  181   uint64_t v2 = seed + PRIME64_2;
09c83807 Nick Terrell 2017-07-20  182   uint64_t v3 = seed + 0;
09c83807 Nick Terrell 2017-07-20  183   uint64_t v4 = seed - PRIME64_1;
09c83807 Nick Terrell 2017-07-20  184  
09c83807 Nick Terrell 2017-07-20  185   do {
09c83807 Nick Terrell 2017-07-20  186   v1 = xxh64_round(v1, 
get_unaligned_le64(p));
09c83807 Nick Terrell 2017-07-20  187   p += 8;
09c83807 Nick Terrell 2017-07-20  188   v2 = xxh64_round(v2, 
get_unaligned_le64(p));
09c83807 Nick Terrell 2017-07-20  189   p += 8;
09c83807 Nick Terrell 2017-07-20  190   v3 = xxh64_round(v3, 
get_unaligned_le64(p));
09c83807 Nick Terrell 2017-07-20  191   p += 8;
09c83807 Nick Terrell 2017-07-20  192   v4 = xxh64_round(v4, 
get_unaligned_le64(p));
09c83807 Nick Terrell 2017-07-20  193   p += 8;
09c83807 Nick Terrell 2017-07-20  194   } while (p <= limit);
09c83807 Nick Terrell 2017-07-20  195  
09c83807 Nick Terrell 2017-07-20  196   h64 = xxh_rotl64(v1, 1) + 
xxh_rotl64(v2, 7) +
09c83807 Nick Terrell 2017-07-20  197   xxh_rotl64(v3, 12) + 
xxh_rotl64(v4, 18);
09c83807 Nick Terrell 2017-07-20  198   h64 = xxh64_merge_round(h64, 
v1);
09c83807 Nick Terrell 2017-07-20  199   h64 = xxh64_merge_round(h64, 
v2);
09c83807 Nick Terrell 2017-07-20  200   h64 = xxh64_merge_round(h64, 
v3);
09c83807 Nick Terrell 2017-07-20  201   h64 = xxh64_merge_round(h64, 
v4);
09c83807 Nick Terrell 2017-07-20  202  
09c83807 Nick Terrell 2017-07-20  203   } else {
09c83807 Nick Terrell 2017-07-20  204   h64  = seed + PRIME64_5;
09c83807 Nick Terrell 2017-07-20  205   }
09c83807 Nick Terrell 2017-07-20  206  
09c83807 Nick Terrell 2017-07-20  207   h64 += (uint64_t)len;
09c83807 Nick Terrell 2017-07-20  208  
09c83807 Nick Terrell 2017-07-20  209   while (p + 8 <= b_end) {
09c83807 Nick Terrell 2017-07-20  210   const uint64_t k1 = 
xxh64_round(0, get_unaligned_le64(p));
09c83807 Nick Terrell 2017-07-20  211  
09c83807 Nick Terrell 2017-07-20  212   h64 ^= k1;
09c83807 Nick Terrell 2017-07-20  213   h64 = xxh_rotl64(h64, 27) * 
PRIME64_1 + PRIME64_4;
09c83807 Nick Terrell 2017-07-20  214   p += 8;
09c83807 Nick Terrell 2017-07-20  215   }
09c83807 Nick Terrell 2017-07-20  216  
09c83807 Nick Terrell 2017-07-20  217   if (p + 4 <= b_end) {
09c83807 Nick Terrell 2017-07-20  218   h64 ^= 
(uint64_t)(get_unaligned_le32(p)) * PRIME64_1;
09c83807 Nick Terrell 2017-07-20  219   h64 = xxh_rotl64(h64, 23) * 
PRIME64_2 + PRIME64_3;
09c83807 Nick Terrell 2017-07-20  220   p += 4;
09c83807 Nick Terrell 2017-07-20  221   }
09c83807 Nick Terrell 2017-07-20  222  
09c83807 Nick Terrell 2017-07-20  223   while (p < b_end) {
09c83807 Nick Terrell 2017-07-20  224   h64 ^= (*p) * PRIME64_5;
09c83807 Nick Terrell 2017-07-20  225   h64 = xxh_rotl64(h64, 11) * 
PRIME64_1;
09c83807 Nick Terrell 2017-07-20  226   p++;
09c83807 Nick Terrell 2017-07-20  227   }
09c83807 Nick Terrell 2017-07-20  228  

Re: [PATCH v3 2/2] btrfs: Add new ioctl uapis for qgroup creation / removal

2017-07-17 Thread kbuild test robot
Hi Sargun,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.13-rc1 next-20170717]
[cannot apply to btrfs/next]
[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/Sargun-Dhillon/New-qgroup-creation-removal-ioctls/20170715-195435
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   include/linux/compiler.h:260:8: sparse: attribute 'no_sanitize_address': 
unknown attribute
>> fs/btrfs/tests/qgroup-tests.c:232:34: sparse: not enough arguments for 
>> function btrfs_create_qgroup
   fs/btrfs/tests/qgroup-tests.c:334:34: sparse: not enough arguments for 
function btrfs_create_qgroup
   fs/btrfs/tests/qgroup-tests.c: In function 'test_no_shared_qgroup':
   fs/btrfs/tests/qgroup-tests.c:232:8: error: too few arguments to function 
'btrfs_create_qgroup'
 ret = btrfs_create_qgroup(NULL, fs_info, BTRFS_FS_TREE_OBJECTID);
   ^~~
   In file included from fs/btrfs/tests/qgroup-tests.c:24:0:
   fs/btrfs/tests/../qgroup.h:127:5: note: declared here
int btrfs_create_qgroup(struct btrfs_trans_handle *trans,
^~~
   fs/btrfs/tests/qgroup-tests.c: In function 'test_multiple_refs':
   fs/btrfs/tests/qgroup-tests.c:334:8: error: too few arguments to function 
'btrfs_create_qgroup'
 ret = btrfs_create_qgroup(NULL, fs_info, BTRFS_FIRST_FREE_OBJECTID);
   ^~~
   In file included from fs/btrfs/tests/qgroup-tests.c:24:0:
   fs/btrfs/tests/../qgroup.h:127:5: note: declared here
int btrfs_create_qgroup(struct btrfs_trans_handle *trans,
^~~

vim +232 fs/btrfs/tests/qgroup-tests.c

faa2dbf0 Josef Bacik2014-05-07  219  
b9ef22de Feifei Xu  2016-06-01  220  static int 
test_no_shared_qgroup(struct btrfs_root *root,
b9ef22de Feifei Xu  2016-06-01  221 u32 sectorsize, u32 
nodesize)
faa2dbf0 Josef Bacik2014-05-07  222  {
faa2dbf0 Josef Bacik2014-05-07  223 struct btrfs_trans_handle trans;
faa2dbf0 Josef Bacik2014-05-07  224 struct btrfs_fs_info *fs_info = 
root->fs_info;
442244c9 Qu Wenruo  2015-04-16  225 struct ulist *old_roots = NULL;
442244c9 Qu Wenruo  2015-04-16  226 struct ulist *new_roots = NULL;
faa2dbf0 Josef Bacik2014-05-07  227 int ret;
faa2dbf0 Josef Bacik2014-05-07  228  
7c55ee0c Omar Sandoval  2015-09-29  229 btrfs_init_dummy_trans();
faa2dbf0 Josef Bacik2014-05-07  230  
faa2dbf0 Josef Bacik2014-05-07  231 test_msg("Qgroup basic add\n");
ef9f2db3 Feifei Xu  2016-06-01 @232 ret = btrfs_create_qgroup(NULL, 
fs_info, BTRFS_FS_TREE_OBJECTID);
faa2dbf0 Josef Bacik2014-05-07  233 if (ret) {
faa2dbf0 Josef Bacik2014-05-07  234 test_msg("Couldn't 
create a qgroup %d\n", ret);
faa2dbf0 Josef Bacik2014-05-07  235 return ret;
faa2dbf0 Josef Bacik2014-05-07  236 }
faa2dbf0 Josef Bacik2014-05-07  237  
442244c9 Qu Wenruo  2015-04-16  238 /*
01327610 Nicholas D Steeves 2016-05-19  239  * Since the test trans doesn't 
have the complicated delayed refs,
442244c9 Qu Wenruo  2015-04-16  240  * we can only call 
btrfs_qgroup_account_extent() directly to test
442244c9 Qu Wenruo  2015-04-16  241  * quota.
442244c9 Qu Wenruo  2015-04-16  242  */
b9ef22de Feifei Xu  2016-06-01  243 ret = 
btrfs_find_all_roots(, fs_info, nodesize, 0, _roots);
faa2dbf0 Josef Bacik2014-05-07  244 if (ret) {
442244c9 Qu Wenruo  2015-04-16  245 ulist_free(old_roots);
442244c9 Qu Wenruo  2015-04-16  246 test_msg("Couldn't find 
old roots: %d\n", ret);
faa2dbf0 Josef Bacik2014-05-07  247 return ret;
faa2dbf0 Josef Bacik2014-05-07  248 }
faa2dbf0 Josef Bacik2014-05-07  249  
ef9f2db3 Feifei Xu  2016-06-01  250 ret = 
insert_normal_tree_ref(root, nodesize, nodesize, 0,
ef9f2db3 Feifei Xu  2016-06-01  251 
BTRFS_FS_TREE_OBJECTID);
faa2dbf0 Josef Bacik2014-05-07  252 if (ret)
faa2dbf0 Josef Bacik2014-05-07  253 return ret;
faa2dbf0 Josef Bacik2014-05-07  254  
b9ef22de Feifei Xu  2016-06-01  255 ret = 
btrfs_find_all_roots(, fs_info, nodesize, 0, _roots);
442244c9 Qu Wenruo  2015-04-16  256 if (ret) {
442244c9 Qu Wenruo  2015-04-16  257 ulist_free(old_roots);
442244c9 Qu Wenruo  2015-04-16  258 ulist_free(new_roots);
442244c9 Qu Wenruo  2015-04-16  259 test_msg("Couldn't find 
old roots: %d\n", ret);
442244c9 Qu Wenruo  2015-04-16  260 return ret;
442244c9 Qu Wenruo 

Re: [PATCH v3 2/2] btrfs: Add new ioctl uapis for qgroup creation / removal

2017-07-15 Thread kbuild test robot
Hi Sargun,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.12 next-20170714]
[cannot apply to btrfs/next]
[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/Sargun-Dhillon/New-qgroup-creation-removal-ioctls/20170715-195435
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=xtensa 

All errors (new ones prefixed by >>):

   fs/btrfs/tests/qgroup-tests.c: In function 'test_no_shared_qgroup':
>> fs/btrfs/tests/qgroup-tests.c:232:8: error: too few arguments to function 
>> 'btrfs_create_qgroup'
 ret = btrfs_create_qgroup(NULL, fs_info, BTRFS_FS_TREE_OBJECTID);
   ^
   In file included from fs/btrfs/tests/qgroup-tests.c:24:0:
   fs/btrfs/tests/../qgroup.h:127:5: note: declared here
int btrfs_create_qgroup(struct btrfs_trans_handle *trans,
^
   fs/btrfs/tests/qgroup-tests.c: In function 'test_multiple_refs':
   fs/btrfs/tests/qgroup-tests.c:334:8: error: too few arguments to function 
'btrfs_create_qgroup'
 ret = btrfs_create_qgroup(NULL, fs_info, BTRFS_FIRST_FREE_OBJECTID);
   ^
   In file included from fs/btrfs/tests/qgroup-tests.c:24:0:
   fs/btrfs/tests/../qgroup.h:127:5: note: declared here
int btrfs_create_qgroup(struct btrfs_trans_handle *trans,
^

vim +/btrfs_create_qgroup +232 fs/btrfs/tests/qgroup-tests.c

faa2dbf0 Josef Bacik2014-05-07  219  
b9ef22de Feifei Xu  2016-06-01  220  static int 
test_no_shared_qgroup(struct btrfs_root *root,
b9ef22de Feifei Xu  2016-06-01  221 u32 sectorsize, u32 
nodesize)
faa2dbf0 Josef Bacik2014-05-07  222  {
faa2dbf0 Josef Bacik2014-05-07  223 struct btrfs_trans_handle trans;
faa2dbf0 Josef Bacik2014-05-07  224 struct btrfs_fs_info *fs_info = 
root->fs_info;
442244c9 Qu Wenruo  2015-04-16  225 struct ulist *old_roots = NULL;
442244c9 Qu Wenruo  2015-04-16  226 struct ulist *new_roots = NULL;
faa2dbf0 Josef Bacik2014-05-07  227 int ret;
faa2dbf0 Josef Bacik2014-05-07  228  
7c55ee0c Omar Sandoval  2015-09-29  229 btrfs_init_dummy_trans();
faa2dbf0 Josef Bacik2014-05-07  230  
faa2dbf0 Josef Bacik2014-05-07  231 test_msg("Qgroup basic add\n");
ef9f2db3 Feifei Xu  2016-06-01 @232 ret = btrfs_create_qgroup(NULL, 
fs_info, BTRFS_FS_TREE_OBJECTID);
faa2dbf0 Josef Bacik2014-05-07  233 if (ret) {
faa2dbf0 Josef Bacik2014-05-07  234 test_msg("Couldn't 
create a qgroup %d\n", ret);
faa2dbf0 Josef Bacik2014-05-07  235 return ret;
faa2dbf0 Josef Bacik2014-05-07  236 }
faa2dbf0 Josef Bacik2014-05-07  237  
442244c9 Qu Wenruo  2015-04-16  238 /*
01327610 Nicholas D Steeves 2016-05-19  239  * Since the test trans doesn't 
have the complicated delayed refs,
442244c9 Qu Wenruo  2015-04-16  240  * we can only call 
btrfs_qgroup_account_extent() directly to test
442244c9 Qu Wenruo  2015-04-16  241  * quota.
442244c9 Qu Wenruo  2015-04-16  242  */
b9ef22de Feifei Xu  2016-06-01  243 ret = 
btrfs_find_all_roots(, fs_info, nodesize, 0, _roots);
faa2dbf0 Josef Bacik2014-05-07  244 if (ret) {
442244c9 Qu Wenruo  2015-04-16  245 ulist_free(old_roots);
442244c9 Qu Wenruo  2015-04-16  246 test_msg("Couldn't find 
old roots: %d\n", ret);
faa2dbf0 Josef Bacik2014-05-07  247 return ret;
faa2dbf0 Josef Bacik2014-05-07  248 }
faa2dbf0 Josef Bacik2014-05-07  249  
ef9f2db3 Feifei Xu  2016-06-01  250 ret = 
insert_normal_tree_ref(root, nodesize, nodesize, 0,
ef9f2db3 Feifei Xu  2016-06-01  251 
BTRFS_FS_TREE_OBJECTID);
faa2dbf0 Josef Bacik2014-05-07  252 if (ret)
faa2dbf0 Josef Bacik2014-05-07  253 return ret;
faa2dbf0 Josef Bacik2014-05-07  254  
b9ef22de Feifei Xu  2016-06-01  255 ret = 
btrfs_find_all_roots(, fs_info, nodesize, 0, _roots);
442244c9 Qu Wenruo  2015-04-16  256 if (ret) {
442244c9 Qu Wenruo  2015-04-16  257 ulist_free(old_roots);
442244c9 Qu Wenruo  2015-04-16  258 ulist_free(new_roots);
442244c9 Qu Wenruo  2015-04-16  259 test_msg("Couldn't find 
old roots: %d\n", ret);
442244c9 Qu Wenruo  2015-04-16  260 return ret;
442244c9 Qu Wenruo  2015-04-16  261 }
442244c9 Qu Wenruo  2015-04-16  262  
b9ef22de Feifei Xu  2016-06-01  263 ret = 

Re: [PATCH] btrfs: Add qgroup_auto_cleanup mount flag to automatically cleanup qgroups

2017-06-30 Thread kbuild test robot
Hi Sargun,

[auto build test ERROR on v4.12-rc7]
[also build test ERROR on next-20170630]
[cannot apply to btrfs/next]
[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/Sargun-Dhillon/btrfs-Add-qgroup_auto_cleanup-mount-flag-to-automatically-cleanup-qgroups/20170701-102114
config: x86_64-randconfig-x015-201726 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   fs//btrfs/ioctl.c: In function 'btrfs_ioctl_snap_destroy':
>> fs//btrfs/ioctl.c:2555:9: error: too many arguments to function 
>> 'btrfs_remove_qgroup'
  ret = btrfs_remove_qgroup(trans, fs_info,
^~~
   In file included from fs//btrfs/ioctl.c:60:0:
   fs//btrfs/qgroup.h:129:5: note: declared here
int btrfs_remove_qgroup(struct btrfs_trans_handle *trans,
^~~

vim +/btrfs_remove_qgroup +2555 fs//btrfs/ioctl.c

  2549   * is the same as the subvolume id.
  2550   *
  2551   * This can fail non-fatally for level 0 qgroups, therefore we 
do
  2552   * not abort the transaction if this fails, nor return an error.
  2553   */
  2554  if (btrfs_test_opt(fs_info, QGROUP_AUTO_CLEANUP)) {
> 2555  ret = btrfs_remove_qgroup(trans, fs_info,
  2556dest->root_key.objectid, 0);
  2557  if (ret && ret != -ENOENT)
  2558  btrfs_warn(fs_info,

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


.config.gz
Description: application/gzip


Re: [PATCH 1/2] btrfs: remove unused sectorsize member

2017-06-27 Thread kbuild test robot
Hi Nikolay,

[auto build test ERROR on v4.12-rc6]
[also build test ERROR on next-20170627]
[cannot apply to btrfs/next]
[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-remove-unused-sectorsize-member/20170627-183835
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=xtensa 

All errors (new ones prefixed by >>):

   fs/btrfs/tests/btrfs-tests.c: In function 'btrfs_alloc_dummy_block_group':
>> fs/btrfs/tests/btrfs-tests.c:214:7: error: 'struct btrfs_block_group_cache' 
>> has no member named 'sectorsize'
 cache->sectorsize = fs_info->sectorsize;
  ^
--
   fs/btrfs/tests/free-space-tree-tests.c: In function 
'__check_free_space_extents':
>> fs/btrfs/tests/free-space-tree-tests.c:84:20: error: 'struct 
>> btrfs_block_group_cache' has no member named 'sectorsize'
offset += cache->sectorsize;
   ^

vim +214 fs/btrfs/tests/btrfs-tests.c

7c55ee0c Omar Sandoval 2015-09-29  208  return NULL;
7c55ee0c Omar Sandoval 2015-09-29  209  }
7c55ee0c Omar Sandoval 2015-09-29  210  
7c55ee0c Omar Sandoval 2015-09-29  211  cache->key.objectid = 0;
7c55ee0c Omar Sandoval 2015-09-29  212  cache->key.offset = length;
7c55ee0c Omar Sandoval 2015-09-29  213  cache->key.type = 
BTRFS_BLOCK_GROUP_ITEM_KEY;
da17066c Jeff Mahoney  2016-06-15 @214  cache->sectorsize = 
fs_info->sectorsize;
da17066c Jeff Mahoney  2016-06-15  215  cache->full_stripe_len = 
fs_info->sectorsize;
da17066c Jeff Mahoney  2016-06-15  216  cache->fs_info = fs_info;
7c55ee0c Omar Sandoval 2015-09-29  217  

:: The code at line 214 was first introduced by commit
:: da17066c40472c2d6a1aab7bb0090c3d285531c9 btrfs: pull node/sector/stripe 
sizes out of root and into fs_info

:: TO: Jeff Mahoney 
:: CC: David Sterba 

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


.config.gz
Description: application/gzip


Re: [PATCH 3/4] btrfs: Add zstd support

2017-06-25 Thread kbuild test robot
Hi Nick,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.12-rc6]
[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/Nick-Terrell/lib-Add-xxhash-module/20170625-214344
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

>> ERROR: "__udivdi3" [lib/zstd/zstd_compress.ko] undefined!
   ERROR: "__udivdi3" [fs/ufs/ufs.ko] undefined!

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


.config.gz
Description: application/gzip


Re: [PATCH 3/4] btrfs: Add zstd support

2017-06-25 Thread kbuild test robot
Hi Nick,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.12-rc6 next-20170623]
[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/Nick-Terrell/lib-Add-xxhash-module/20170625-214344
config: blackfin-allyesconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=blackfin 

All error/warnings (new ones prefixed by >>):

   lib//zstd/fse_compress.c: In function 'FSE_buildCTable_wksp':
>> lib//zstd/fse_compress.c:181:1: warning: the frame size of 1036 bytes is 
>> larger than 1024 bytes [-Wframe-larger-than=]
}
^
   lib//zstd/fse_compress.c: In function 'FSE_compress_wksp':
   lib//zstd/fse_compress.c:857:1: warning: the frame size of 1552 bytes is 
larger than 1024 bytes [-Wframe-larger-than=]
}
^
--
   lib//zstd/compress.c: In function 'ZSTD_compressBlock_lazy':
>> lib//zstd/compress.c:2036:1: error: unable to find a register to spill in 
>> class 'CCREGS'
static void ZSTD_compressBlock_lazy(ZSTD_CCtx *ctx, const void *src, size_t 
srcSize) { ZSTD_compressBlock_lazy_generic(ctx, src, srcSize, 0, 1); }
^~
>> lib//zstd/compress.c:2036:1: error: this is the insn:
   (insn 213 11 1172 9 (set (reg:BI 1429)
   (eq:BI (reg/v:SI 62 [ mls ])
   (const_int 5 [0x5]))) lib//zstd/compress.c:1855 118 {compare_eq}
(nil))
   lib//zstd/compress.c:2036: confused by earlier errors, bailing out
--
   lib//zstd/huf_decompress.c: In function 'HUF_readDTableX4':
>> lib//zstd/huf_decompress.c:556:1: warning: the frame size of 1636 bytes is 
>> larger than 1024 bytes [-Wframe-larger-than=]
}
^

vim +/CCREGS +2036 lib//zstd/compress.c

87a5643e Nick Terrell 2017-06-22  2020  /* Save reps for next block */
87a5643e Nick Terrell 2017-06-22  2021  ctx->repToConfirm[0] = offset_1 
? offset_1 : savedOffset;
87a5643e Nick Terrell 2017-06-22  2022  ctx->repToConfirm[1] = offset_2 
? offset_2 : savedOffset;
87a5643e Nick Terrell 2017-06-22  2023  
87a5643e Nick Terrell 2017-06-22  2024  /* Last Literals */
87a5643e Nick Terrell 2017-06-22  2025  {
87a5643e Nick Terrell 2017-06-22  2026  size_t const lastLLSize 
= iend - anchor;
87a5643e Nick Terrell 2017-06-22  2027  
memcpy(seqStorePtr->lit, anchor, lastLLSize);
87a5643e Nick Terrell 2017-06-22  2028  seqStorePtr->lit += 
lastLLSize;
87a5643e Nick Terrell 2017-06-22  2029  }
87a5643e Nick Terrell 2017-06-22  2030  }
87a5643e Nick Terrell 2017-06-22  2031  
87a5643e Nick Terrell 2017-06-22  2032  static void 
ZSTD_compressBlock_btlazy2(ZSTD_CCtx *ctx, const void *src, size_t srcSize) { 
ZSTD_compressBlock_lazy_generic(ctx, src, srcSize, 1, 2); }
87a5643e Nick Terrell 2017-06-22  2033  
87a5643e Nick Terrell 2017-06-22  2034  static void 
ZSTD_compressBlock_lazy2(ZSTD_CCtx *ctx, const void *src, size_t srcSize) { 
ZSTD_compressBlock_lazy_generic(ctx, src, srcSize, 0, 2); }
87a5643e Nick Terrell 2017-06-22  2035  
87a5643e Nick Terrell 2017-06-22 @2036  static void 
ZSTD_compressBlock_lazy(ZSTD_CCtx *ctx, const void *src, size_t srcSize) { 
ZSTD_compressBlock_lazy_generic(ctx, src, srcSize, 0, 1); }
87a5643e Nick Terrell 2017-06-22  2037  
87a5643e Nick Terrell 2017-06-22  2038  static void 
ZSTD_compressBlock_greedy(ZSTD_CCtx *ctx, const void *src, size_t srcSize) { 
ZSTD_compressBlock_lazy_generic(ctx, src, srcSize, 0, 0); }
87a5643e Nick Terrell 2017-06-22  2039  
87a5643e Nick Terrell 2017-06-22  2040  FORCE_INLINE
87a5643e Nick Terrell 2017-06-22  2041  void 
ZSTD_compressBlock_lazy_extDict_generic(ZSTD_CCtx *ctx, const void *src, size_t 
srcSize, const U32 searchMethod, const U32 depth)
87a5643e Nick Terrell 2017-06-22  2042  {
87a5643e Nick Terrell 2017-06-22  2043  seqStore_t *seqStorePtr = 
&(ctx->seqStore);
87a5643e Nick Terrell 2017-06-22  2044  const BYTE *const istart = 
(const BYTE *)src;

:: The code at line 2036 was first introduced by commit
:: 87a5643e3b02e4cb9fb83bf8f6da13be18677883 lib: Add zstd modules

:: TO: Nick Terrell 
:: CC: 0day robot 

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


.config.gz
Description: application/gzip


  1   2   >