public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: linux-raid@vger.kernel.org, song@kernel.org
Cc: kbuild-all@lists.01.org, nfbrown@suse.com, colyli@suse.com,
	Jeff Mahoney <jeffm@suse.com>
Subject: Re: [PATCH] mdraid: fix read/write bytes accounting
Date: Tue, 9 Jun 2020 14:37:36 +0800	[thread overview]
Message-ID: <202006091434.XEVtHUe9%lkp@intel.com> (raw)
In-Reply-To: <20200605201953.11098-1-jeffm@suse.com>

[-- Attachment #1: Type: text/plain, Size: 5356 bytes --]

Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on next-20200608]
[cannot apply to v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/jeffm-suse-com/mdraid-fix-read-write-bytes-accounting/20200607-085457
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b170290c2836c40ab565736ba37681eb3dfd79b8
config: m68k-randconfig-r011-20200607 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        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
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

drivers/md/md.c: In function 'md_make_request':
>> drivers/md/md.c:485:15: warning: variable 'sectors' set but not used [-Wunused-but-set-variable]
485 |  unsigned int sectors;
|               ^~~~~~~
drivers/md/md.c: In function 'bind_rdev_to_array':
drivers/md/md.c:2454:27: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
2454 |   /* failure here is OK */;
|                           ^
drivers/md/md.c: In function 'slot_store':
drivers/md/md.c:3215:28: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
3215 |    /* failure here is OK */;
|                            ^
drivers/md/md.c: In function 'remove_and_add_spares':
drivers/md/md.c:9073:29: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
9073 |     /* failure here is OK */;
|                             ^

vim +/sectors +485 drivers/md/md.c

eb17e42dfd959c Jeff Mahoney         2020-06-05  480  
dece16353ef47d Jens Axboe           2015-11-05  481  static blk_qc_t md_make_request(struct request_queue *q, struct bio *bio)
^1da177e4c3f41 Linus Torvalds       2005-04-16  482  {
490773268cf64f NeilBrown            2010-03-25  483  	const int rw = bio_data_dir(bio);
e4fc5a74293fbe Christoph Hellwig    2020-05-08  484  	struct mddev *mddev = bio->bi_disk->private_data;
e91ece5590b3c7 Chris Mason          2011-02-07 @485  	unsigned int sectors;
490773268cf64f NeilBrown            2010-03-25  486  
62f7b1989c02fe Guilherme G. Piccoli 2019-09-03  487  	if (unlikely(test_bit(MD_BROKEN, &mddev->flags)) && (rw == WRITE)) {
62f7b1989c02fe Guilherme G. Piccoli 2019-09-03  488  		bio_io_error(bio);
62f7b1989c02fe Guilherme G. Piccoli 2019-09-03  489  		return BLK_QC_T_NONE;
62f7b1989c02fe Guilherme G. Piccoli 2019-09-03  490  	}
62f7b1989c02fe Guilherme G. Piccoli 2019-09-03  491  
af67c31fba3b87 NeilBrown            2017-06-18  492  	blk_queue_split(q, &bio);
54efd50bfd873e Kent Overstreet      2015-04-23  493  
274d8cbde1bc3b NeilBrown            2016-01-04  494  	if (mddev == NULL || mddev->pers == NULL) {
6712ecf8f64811 NeilBrown            2007-09-27  495  		bio_io_error(bio);
dece16353ef47d Jens Axboe           2015-11-05  496  		return BLK_QC_T_NONE;
^1da177e4c3f41 Linus Torvalds       2005-04-16  497  	}
bbfa57c0f2243a Sebastian Riemer     2013-02-21  498  	if (mddev->ro == 1 && unlikely(rw == WRITE)) {
4246a0b63bd8f5 Christoph Hellwig    2015-07-20  499  		if (bio_sectors(bio) != 0)
4e4cbee93d5613 Christoph Hellwig    2017-06-03  500  			bio->bi_status = BLK_STS_IOERR;
4246a0b63bd8f5 Christoph Hellwig    2015-07-20  501  		bio_endio(bio);
dece16353ef47d Jens Axboe           2015-11-05  502  		return BLK_QC_T_NONE;
bbfa57c0f2243a Sebastian Riemer     2013-02-21  503  	}
490773268cf64f NeilBrown            2010-03-25  504  
e91ece5590b3c7 Chris Mason          2011-02-07  505  	/*
e91ece5590b3c7 Chris Mason          2011-02-07  506  	 * save the sectors now since our bio can
e91ece5590b3c7 Chris Mason          2011-02-07  507  	 * go away inside make_request
e91ece5590b3c7 Chris Mason          2011-02-07  508  	 */
e91ece5590b3c7 Chris Mason          2011-02-07  509  	sectors = bio_sectors(bio);
9c573de3283af0 Shaohua Li           2016-04-25  510  	/* bio could be mergeable after passing to underlayer */
1eff9d322a4442 Jens Axboe           2016-08-05  511  	bio->bi_opf &= ~REQ_NOMERGE;
393debc23c7820 Shaohua Li           2017-09-21  512  
393debc23c7820 Shaohua Li           2017-09-21  513  	md_handle_request(mddev, bio);
490773268cf64f NeilBrown            2010-03-25  514  
dece16353ef47d Jens Axboe           2015-11-05  515  	return BLK_QC_T_NONE;
409c57f3801701 NeilBrown            2009-03-31  516  }
409c57f3801701 NeilBrown            2009-03-31  517  

:::::: The code at line 485 was first introduced by commit
:::::: e91ece5590b3c728624ab57043fc7a05069c604a md_make_request: don't touch the bio after calling make_request

:::::: TO: Chris Mason <chris.mason@oracle.com>
:::::: CC: NeilBrown <neilb@suse.de>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27017 bytes --]

      parent reply	other threads:[~2020-06-09  6:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05 20:19 [PATCH] mdraid: fix read/write bytes accounting jeffm
2020-06-08  7:13 ` Artur Paszkiewicz
2020-06-23 14:21   ` Guoqing Jiang
2020-06-23 16:48     ` Artur Paszkiewicz
2020-06-25  9:13       ` Guoqing Jiang
2020-06-23 14:24   ` Jeff Mahoney
2020-06-09  6:37 ` kernel test robot [this message]

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=202006091434.XEVtHUe9%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=colyli@suse.com \
    --cc=jeffm@suse.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=nfbrown@suse.com \
    --cc=song@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox