Hi Chandan,

[auto build test ERROR on tip/perf/core]
[also build test ERROR on v4.6-rc3 next-20160414]
[cannot apply to btrfs/next]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improving the system]

url:    
https://github.com/0day-ci/linux/commits/Chandan-Rajendra/Allow-I-O-on-blocks-whose-size-is-less-than-page-size/20160414-214339
config: arm-allyesconfig (attached as .config)
reproduce:
        wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

Note: the 
linux-review/Chandan-Rajendra/Allow-I-O-on-blocks-whose-size-is-less-than-page-size/20160414-214339
 HEAD cb75f40d8b4d47c9133c24f3cc01b3eef831bf19 builds fine.
      It only hurts bisectibility.

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

   fs/btrfs/file.c: In function 'btrfs_punch_hole':
>> fs/btrfs/file.c:2435:29: error: 'PAGE_CACHE_SHIFT' undeclared (first use in 
>> this function)
     start_index = lockstart >> PAGE_CACHE_SHIFT;
                                ^
   fs/btrfs/file.c:2435:29: note: each undeclared identifier is reported only 
once for each function it appears in
>> fs/btrfs/file.c:2449:20: error: 'PAGE_CACHE_SIZE' undeclared (first use in 
>> this function)
      if (lockstart & (PAGE_CACHE_SIZE - 1)) {
                       ^
>> fs/btrfs/file.c:2464:6: error: implicit declaration of function 
>> 'page_cache_release' [-Werror=implicit-function-declaration]
         page_cache_release(start_page);
         ^
   In file included from include/linux/list.h:8:0,
                    from include/linux/wait.h:6,
                    from include/linux/fs.h:5,
                    from fs/btrfs/file.c:19:
   include/linux/kernel.h:735:17: warning: comparison of distinct pointer types 
lacks a cast
     (void) (&_min1 == &_min2);  \
                    ^
>> fs/btrfs/file.c:2491:5: note: in expansion of macro 'min'
        min(lockstart + PAGE_CACHE_SIZE - 1, lockend), 0)) &&
        ^
   cc1: some warnings being treated as errors

vim +/PAGE_CACHE_SHIFT +2435 fs/btrfs/file.c

  2429  
  2430          if (lockend < lockstart) {
  2431                  ret = 0;
  2432                  goto out_only_mutex;
  2433          }
  2434  
> 2435          start_index = lockstart >> PAGE_CACHE_SHIFT;
  2436          end_index = lockend >> PAGE_CACHE_SHIFT;
  2437  
  2438          same_page = lockstart >> PAGE_CACHE_SHIFT
  2439                  == lockend >> PAGE_CACHE_SHIFT;
  2440  
  2441          while (1) {
  2442                  struct btrfs_ordered_extent *ordered;
  2443                  struct page *start_page = NULL;
  2444                  struct page *end_page = NULL;
  2445                  u64 nr_pages;
  2446  
  2447                  truncate_pagecache_range(inode, lockstart, lockend);
  2448  
> 2449                  if (lockstart & (PAGE_CACHE_SIZE - 1)) {
  2450                          start_page = find_or_create_page(mapping, 
start_index,
  2451                                                          GFP_NOFS);
  2452                          if (!start_page) {
  2453                                  mutex_unlock(&inode->i_mutex);
  2454                                  return -ENOMEM;
  2455                          }
  2456                  }
  2457  
  2458                  if (!same_page && ((lockend + 1) & (PAGE_CACHE_SIZE - 
1))) {
  2459                          end_page = find_or_create_page(mapping, 
end_index,
  2460                                                  GFP_NOFS);
  2461                          if (!end_page) {
  2462                                  if (start_page) {
  2463                                          unlock_page(start_page);
> 2464                                          page_cache_release(start_page);
  2465                                  }
  2466                                  mutex_unlock(&inode->i_mutex);
  2467                                  return -ENOMEM;
  2468                          }
  2469                  }
  2470  
  2471  
  2472                  lock_extent_bits(&BTRFS_I(inode)->io_tree, lockstart, 
lockend,
  2473                                   &cached_state);
  2474                  ordered = btrfs_lookup_first_ordered_extent(inode, 
lockend);
  2475  
  2476                  /*
  2477                   * We need to make sure we have no ordered extents in 
this range
  2478                   * and nobody raced in and read a page in this range, 
if we did
  2479                   * we need to try again.
  2480                   */
  2481                  nr_pages = round_up(lockend, PAGE_CACHE_SIZE)
  2482                          - round_down(lockstart, PAGE_CACHE_SIZE);
  2483                  nr_pages >>= PAGE_CACHE_SHIFT;
  2484  
  2485                  if ((!ordered ||
  2486                      (ordered->file_offset + ordered->len <= lockstart ||
  2487                       ordered->file_offset > lockend)) &&
  2488                       (!(start_page && PagePrivate(start_page) &&
  2489                          test_page_blks_state(start_page, 1 << 
BLK_STATE_UPTODATE,
  2490                           lockstart,
> 2491                           min(lockstart + PAGE_CACHE_SIZE - 1, lockend), 
> 0)) &&
  2492                        !(end_page && PagePrivate(end_page) &&
  2493                          test_page_blks_state(end_page, 1 << 
BLK_STATE_UPTODATE,
  2494                           page_offset(end_page), lockend, 0)) &&

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

Attachment: .config.gz
Description: Binary data

Reply via email to