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: powerpc-randconfig-r005-20200602 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 2388a096e7865c043e83ece4e26654bd3d1a20d5)
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
        # install powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc 

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:481:2: error: implicit declaration of function 'generic_end_io_acct' [-Werror,-Wimplicit-function-declaration]
generic_end_io_acct(mddev->queue, bio_op(orig_bio),
^
drivers/md/md.c:481:2: note: did you mean 'bio_end_io_acct'?
include/linux/blkdev.h:1917:20: note: 'bio_end_io_acct' declared here
static inline void bio_end_io_acct(struct bio *bio, unsigned long start_time)
^
>> drivers/md/md.c:526:3: error: implicit declaration of function 'generic_start_io_acct' [-Werror,-Wimplicit-function-declaration]
generic_start_io_acct(mddev->queue, bio_op(bio),
^
drivers/md/md.c:526:3: note: did you mean 'bio_start_io_acct'?
include/linux/blkdev.h:1907:29: note: 'bio_start_io_acct' declared here
static inline unsigned long bio_start_io_acct(struct bio *bio)
^
2 errors generated.

vim +/generic_end_io_acct +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