All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: 824731276@qq.com, axboe@kernel.dk
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-block@vger.kernel.org, baiguo@kylinos.cn
Subject: Re: [PATCH] block:added printing when bio->bi_status fails
Date: Thu, 8 Aug 2024 03:55:17 +0800	[thread overview]
Message-ID: <202408080303.bwOWkFK1-lkp@intel.com> (raw)
In-Reply-To: <tencent_F71A15579D1E52ED0B58EF2F3607AA883308@qq.com>

Hi,

kernel test robot noticed the following build errors:

[auto build test ERROR on axboe-block/for-next]
[also build test ERROR on linus/master v6.11-rc2 next-20240807]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/824731276-qq-com/block-added-printing-when-bio-bi_status-fails/20240807-174005
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
patch link:    https://lore.kernel.org/r/tencent_F71A15579D1E52ED0B58EF2F3607AA883308%40qq.com
patch subject: [PATCH] block:added printing when bio->bi_status fails
config: openrisc-allnoconfig (https://download.01.org/0day-ci/archive/20240808/202408080303.bwOWkFK1-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240808/202408080303.bwOWkFK1-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408080303.bwOWkFK1-lkp@intel.com/

All errors (new ones prefixed by >>):

   block/bio.c: In function 'bio_endio':
>> block/bio.c:1620:34: error: 'struct bio' has no member named 'bi_disk'
    1620 |         if (bio->bi_status && bio->bi_disk)
         |                                  ^~
   In file included from include/asm-generic/bug.h:22,
                    from arch/openrisc/include/asm/bug.h:5,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/mm.h:6,
                    from block/bio.c:5:
   block/bio.c:1622:62: error: 'struct bio' has no member named 'bi_disk'
    1622 |                                 __func__, bio->bi_status, bio->bi_disk->major,\
         |                                                              ^~
   include/linux/printk.h:437:33: note: in definition of macro 'printk_index_wrap'
     437 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
   block/bio.c:1621:17: note: in expansion of macro 'printk'
    1621 |                 printk(KERN_ERR "bio: %s status is %d, disk[%d:%d]\n",\
         |                 ^~~~~~
   block/bio.c:1623:36: error: 'struct bio' has no member named 'bi_disk'
    1623 |                                 bio->bi_disk->first_minor);
         |                                    ^~
   include/linux/printk.h:437:33: note: in definition of macro 'printk_index_wrap'
     437 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
   block/bio.c:1621:17: note: in expansion of macro 'printk'
    1621 |                 printk(KERN_ERR "bio: %s status is %d, disk[%d:%d]\n",\
         |                 ^~~~~~


vim +1620 block/bio.c

  1589	
  1590	/**
  1591	 * bio_endio - end I/O on a bio
  1592	 * @bio:	bio
  1593	 *
  1594	 * Description:
  1595	 *   bio_endio() will end I/O on the whole bio. bio_endio() is the preferred
  1596	 *   way to end I/O on a bio. No one should call bi_end_io() directly on a
  1597	 *   bio unless they own it and thus know that it has an end_io function.
  1598	 *
  1599	 *   bio_endio() can be called several times on a bio that has been chained
  1600	 *   using bio_chain().  The ->bi_end_io() function will only be called the
  1601	 *   last time.
  1602	 **/
  1603	void bio_endio(struct bio *bio)
  1604	{
  1605	again:
  1606		if (!bio_remaining_done(bio))
  1607			return;
  1608		if (!bio_integrity_endio(bio))
  1609			return;
  1610	
  1611		blk_zone_bio_endio(bio);
  1612	
  1613		rq_qos_done_bio(bio);
  1614	
  1615		if (bio->bi_bdev && bio_flagged(bio, BIO_TRACE_COMPLETION)) {
  1616			trace_block_bio_complete(bdev_get_queue(bio->bi_bdev), bio);
  1617			bio_clear_flag(bio, BIO_TRACE_COMPLETION);
  1618		}
  1619	
> 1620		if (bio->bi_status && bio->bi_disk)
  1621			printk(KERN_ERR "bio: %s status is %d, disk[%d:%d]\n",\
  1622					__func__, bio->bi_status, bio->bi_disk->major,\
  1623					bio->bi_disk->first_minor);
  1624	
  1625		/*
  1626		 * Need to have a real endio function for chained bios, otherwise
  1627		 * various corner cases will break (like stacking block devices that
  1628		 * save/restore bi_end_io) - however, we want to avoid unbounded
  1629		 * recursion and blowing the stack. Tail call optimization would
  1630		 * handle this, but compiling with frame pointers also disables
  1631		 * gcc's sibling call optimization.
  1632		 */
  1633		if (bio->bi_end_io == bio_chain_endio) {
  1634			bio = __bio_chain_endio(bio);
  1635			goto again;
  1636		}
  1637	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2024-08-07 19:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07  9:33 [PATCH] block:added printing when bio->bi_status fails 824731276
2024-08-07 19:55 ` kernel test robot [this message]
2024-08-07 20:05 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2024-08-08  9:54 824731276
2024-08-16  4:04 ` kernel test robot
2024-08-16  7:45 ` Yu Kuai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202408080303.bwOWkFK1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=824731276@qq.com \
    --cc=axboe@kernel.dk \
    --cc=baiguo@kylinos.cn \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.