Re: [PATCH V2] block: clarify that bio_add_page() and related helpers can add multi pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ming,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on block/for-next]
[also build test ERROR on next-20190418]
[cannot apply to v5.1-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/Ming-Lei/block-clarify-that-bio_add_page-and-related-helpers-can-add-multi-pages/20190423-010505
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: x86_64-randconfig-x015-201916 (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 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>


All errors (new ones prefixed by >>):

   In file included from arch/x86/include/asm/bug.h:83:0,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/mm.h:9,
                    from block/bio.c:18:
   block/bio.c: In function 'can_add_page_to_seg':
>> block/bio.c:691:15: error: 'same_page' undeclared (first use in this function); did you mean 'shake_page'?
     WARN_ON_ONCE(same_page && (len + off) > PAGE_SIZE);
                  ^
   include/asm-generic/bug.h:69:25: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_on = !!(condition);   \
                            ^~~~~~~~~
   block/bio.c:691:15: note: each undeclared identifier is reported only once for each function it appears in
     WARN_ON_ONCE(same_page && (len + off) > PAGE_SIZE);
                  ^
   include/asm-generic/bug.h:69:25: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_on = !!(condition);   \
                            ^~~~~~~~~
>> block/bio.c:691:35: error: 'off' undeclared (first use in this function)
     WARN_ON_ONCE(same_page && (len + off) > PAGE_SIZE);
                                      ^
   include/asm-generic/bug.h:69:25: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_on = !!(condition);   \
                            ^~~~~~~~~

vim +691 block/bio.c

   672	
   673	/*
   674	 * Check if the @page can be added to the current segment(@bv), and make
   675	 * sure to call it only if page_is_mergeable(@bv, @page) is true
   676	 */
   677	static bool can_add_page_to_seg(struct request_queue *q,
   678			struct bio_vec *bv, struct page *page, unsigned len,
   679			unsigned offset)
   680	{
   681		unsigned long mask = queue_segment_boundary(q);
   682		phys_addr_t addr1 = page_to_phys(bv->bv_page) + bv->bv_offset;
   683		phys_addr_t addr2 = page_to_phys(page) + offset + len - 1;
   684	
   685		if ((addr1 | mask) != (addr2 | mask))
   686			return false;
   687	
   688		if (bv->bv_len + len > queue_max_segment_size(q))
   689			return false;
   690	
 > 691		WARN_ON_ONCE(same_page && (len + off) > PAGE_SIZE);
   692	
   693		return true;
   694	}
   695	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux