Re: [PATCH] Set R5_ReadError when there is read failure on parity disk of raid6

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

 



Hi Xiao,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.2 next-20190705]
[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/Xiao-Ni/Set-R5_ReadError-when-there-is-read-failure-on-parity-disk-of-raid6/20190708-042213
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-6) 7.4.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 >>):

   drivers/md/raid5.c: In function 'retry_aligned_read':
>> drivers/md/raid5.c:6159:40: error: 'i' undeclared (first use in this function)
      if (sh->qd_idx >= 0 && sh->pd_idx == i)
                                           ^
   drivers/md/raid5.c:6159:40: note: each undeclared identifier is reported only once for each function it appears in

vim +/i +6159 drivers/md/raid5.c

  6108	
  6109	static int  retry_aligned_read(struct r5conf *conf, struct bio *raid_bio,
  6110				       unsigned int offset)
  6111	{
  6112		/* We may not be able to submit a whole bio at once as there
  6113		 * may not be enough stripe_heads available.
  6114		 * We cannot pre-allocate enough stripe_heads as we may need
  6115		 * more than exist in the cache (if we allow ever large chunks).
  6116		 * So we do one stripe head at a time and record in
  6117		 * ->bi_hw_segments how many have been done.
  6118		 *
  6119		 * We *know* that this entire raid_bio is in one chunk, so
  6120		 * it will be only one 'dd_idx' and only need one call to raid5_compute_sector.
  6121		 */
  6122		struct stripe_head *sh;
  6123		int dd_idx;
  6124		sector_t sector, logical_sector, last_sector;
  6125		int scnt = 0;
  6126		int handled = 0;
  6127	
  6128		logical_sector = raid_bio->bi_iter.bi_sector &
  6129			~((sector_t)STRIPE_SECTORS-1);
  6130		sector = raid5_compute_sector(conf, logical_sector,
  6131					      0, &dd_idx, NULL);
  6132		last_sector = bio_end_sector(raid_bio);
  6133	
  6134		for (; logical_sector < last_sector;
  6135		     logical_sector += STRIPE_SECTORS,
  6136			     sector += STRIPE_SECTORS,
  6137			     scnt++) {
  6138	
  6139			if (scnt < offset)
  6140				/* already done this stripe */
  6141				continue;
  6142	
  6143			sh = raid5_get_active_stripe(conf, sector, 0, 1, 1);
  6144	
  6145			if (!sh) {
  6146				/* failed to get a stripe - must wait */
  6147				conf->retry_read_aligned = raid_bio;
  6148				conf->retry_read_offset = scnt;
  6149				return handled;
  6150			}
  6151	
  6152			if (!add_stripe_bio(sh, raid_bio, dd_idx, 0, 0)) {
  6153				raid5_release_stripe(sh);
  6154				conf->retry_read_aligned = raid_bio;
  6155				conf->retry_read_offset = scnt;
  6156				return handled;
  6157			}
  6158	
> 6159			if (sh->qd_idx >= 0 && sh->pd_idx == i)
  6160				set_bit(R5_ReadError, &sh->dev[i].flags);
  6161			else
  6162				set_bit(R5_ReadNoMerge, &sh->dev[dd_idx].flags);
  6163			handle_stripe(sh);
  6164			raid5_release_stripe(sh);
  6165			handled++;
  6166		}
  6167	
  6168		bio_endio(raid_bio);
  6169	
  6170		if (atomic_dec_and_test(&conf->active_aligned_reads))
  6171			wake_up(&conf->wait_for_quiescent);
  6172		return handled;
  6173	}
  6174	

---
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 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