Re: [PATCH] md: improve io stats accounting

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

 



Hi Artur,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20200529]
[cannot apply to linus/master md/for-next v5.7 v5.7-rc7 v5.7-rc6 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/Artur-Paszkiewicz/md-improve-io-stats-accounting/20200602-002835
base:    e7b08814b16b80a0bf76eeca16317f8c2ed23b8c
config: ia64-allmodconfig (attached as .config)
compiler: ia64-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=ia64 

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

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

drivers/md/md.c: In function 'md_end_request':
>> drivers/md/md.c:481:2: error: implicit declaration of function 'generic_end_io_acct'; did you mean 'bio_end_io_acct'? [-Werror=implicit-function-declaration]
481 |  generic_end_io_acct(mddev->queue, bio_op(orig_bio),
|  ^~~~~~~~~~~~~~~~~~~
|  bio_end_io_acct
drivers/md/md.c: In function 'md_make_request':
>> drivers/md/md.c:526:3: error: implicit declaration of function 'generic_start_io_acct'; did you mean 'bio_start_io_acct'? [-Werror=implicit-function-declaration]
526 |   generic_start_io_acct(mddev->queue, bio_op(bio),
|   ^~~~~~~~~~~~~~~~~~~~~
|   bio_start_io_acct
drivers/md/md.c: In function 'bind_rdev_to_array':
drivers/md/md.c:2475:27: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
2475 |   /* failure here is OK */;
|                           ^
drivers/md/md.c: In function 'slot_store':
drivers/md/md.c:3236:28: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
3236 |    /* failure here is OK */;
|                            ^
drivers/md/md.c: In function 'remove_and_add_spares':
drivers/md/md.c:9103:29: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
9103 |     /* failure here is OK */;
|                             ^
cc1: some warnings being treated as errors

vim +481 drivers/md/md.c

   472	
   473	static void md_end_request(struct bio *bio)
   474	{
   475		struct md_io *md_io = bio->bi_private;
   476		struct mddev *mddev = md_io->mddev;
   477		struct bio *orig_bio = md_io->orig_bio;
   478	
   479		orig_bio->bi_status = bio->bi_status;
   480	
 > 481		generic_end_io_acct(mddev->queue, bio_op(orig_bio),
   482				    &mddev->gendisk->part0, md_io->start_time);
   483		bio_put(bio);
   484	
   485		bio_endio(orig_bio);
   486	}
   487	
   488	static blk_qc_t md_make_request(struct request_queue *q, struct bio *bio)
   489	{
   490		const int rw = bio_data_dir(bio);
   491		struct mddev *mddev = bio->bi_disk->private_data;
   492	
   493		if (unlikely(test_bit(MD_BROKEN, &mddev->flags)) && (rw == WRITE)) {
   494			bio_io_error(bio);
   495			return BLK_QC_T_NONE;
   496		}
   497	
   498		blk_queue_split(q, &bio);
   499	
   500		if (mddev == NULL || mddev->pers == NULL) {
   501			bio_io_error(bio);
   502			return BLK_QC_T_NONE;
   503		}
   504		if (mddev->ro == 1 && unlikely(rw == WRITE)) {
   505			if (bio_sectors(bio) != 0)
   506				bio->bi_status = BLK_STS_IOERR;
   507			bio_endio(bio);
   508			return BLK_QC_T_NONE;
   509		}
   510	
   511		if (bio->bi_pool != &mddev->md_io_bs) {
   512			struct bio *clone;
   513			struct md_io *md_io;
   514	
   515			clone = bio_clone_fast(bio, GFP_NOIO, &mddev->md_io_bs);
   516	
   517			md_io = container_of(clone, struct md_io, orig_bio_clone);
   518			md_io->mddev = mddev;
   519			md_io->orig_bio = bio;
   520			md_io->start_time = jiffies;
   521	
   522			clone->bi_end_io = md_end_request;
   523			clone->bi_private = md_io;
   524			bio = clone;
   525	
 > 526			generic_start_io_acct(mddev->queue, bio_op(bio),
   527					      bio_sectors(bio), &mddev->gendisk->part0);
   528		}
   529	
   530		/* bio could be mergeable after passing to underlayer */
   531		bio->bi_opf &= ~REQ_NOMERGE;
   532	
   533		md_handle_request(mddev, bio);
   534	
   535		return BLK_QC_T_NONE;
   536	}
   537	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux