Hi Yufen, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on song-md/md-next] [also build test WARNING on cryptodev/master v5.8-rc3 next-20200702] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Yufen-Yu/md-raid5-set-STRIPE_SIZE-as-a-configurable-value/20200702-200949 base: git://git.kernel.org/pub/scm/linux/kernel/git/song/md.git md-next config: parisc-defconfig (attached as .config) compiler: hppa-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=parisc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): In file included from include/linux/kernel.h:15, from arch/parisc/include/asm/bug.h:5, from include/linux/bug.h:5, from include/linux/thread_info.h:12, from include/asm-generic/current.h:5, from ./arch/parisc/include/generated/asm/current.h:1, from include/linux/sched.h:12, from include/linux/blkdev.h:5, from drivers/md/raid5.c:38: drivers/md/raid5.c: In function 'raid5_end_read_request': include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ include/linux/printk.h:507:10: note: in definition of macro 'printk_ratelimited' 507 | printk(fmt, ##__VA_ARGS__); \ | ^~~ include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH' 14 | #define KERN_INFO KERN_SOH "6" /* informational */ | ^~~~~~~~ include/linux/printk.h:527:21: note: in expansion of macro 'KERN_INFO' 527 | printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~ >> drivers/md/raid5.c:2533:4: note: in expansion of macro 'pr_info_ratelimited' 2533 | pr_info_ratelimited( | ^~~~~~~~~~~~~~~~~~~ drivers/md/raid5.c:2534:42: note: format string is defined here 2534 | "md/raid:%s: read error corrected (%lu sectors at %llu on %s)\n", | ~~^ | | | long unsigned int | %u In file included from include/linux/printk.h:7, from include/linux/kernel.h:15, from arch/parisc/include/asm/bug.h:5, from include/linux/bug.h:5, from include/linux/thread_info.h:12, from include/asm-generic/current.h:5, from ./arch/parisc/include/generated/asm/current.h:1, from include/linux/sched.h:12, from include/linux/blkdev.h:5, from drivers/md/raid5.c:38: drivers/md/raid5.c: In function 'check_stripe_cache': include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ include/linux/kern_levels.h:12:22: note: in expansion of macro 'KERN_SOH' 12 | #define KERN_WARNING KERN_SOH "4" /* warning conditions */ | ^~~~~~~~ include/linux/printk.h:348:9: note: in expansion of macro 'KERN_WARNING' 348 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~ >> drivers/md/raid5.c:7853:3: note: in expansion of macro 'pr_warn' 7853 | pr_warn("md/raid:%s: reshape: not enough stripes. Needed %lu\n", | ^~~~~~~ drivers/md/raid5.c:7853:63: note: format string is defined here 7853 | pr_warn("md/raid:%s: reshape: not enough stripes. Needed %lu\n", | ~~^ | | | long unsigned int | %u drivers/md/raid5.c: In function 'raid5_start_reshape': drivers/md/raid5.c:7993:31: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] 7993 | /* Failure here is OK */; | ^ vim +/pr_info_ratelimited +2533 drivers/md/raid5.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 2490 4246a0b63bd8f5 Christoph Hellwig 2015-07-20 2491 static void raid5_end_read_request(struct bio * bi) ^1da177e4c3f41 Linus Torvalds 2005-04-16 2492 { ^1da177e4c3f41 Linus Torvalds 2005-04-16 2493 struct stripe_head *sh = bi->bi_private; d1688a6d5515f1 NeilBrown 2011-10-11 2494 struct r5conf *conf = sh->raid_conf; 7ecaa1e6a1ad69 NeilBrown 2006-03-27 2495 int disks = sh->disks, i; d69504325978c4 NeilBrown 2006-07-10 2496 char b[BDEVNAME_SIZE]; dd054fce88d33d NeilBrown 2011-12-23 2497 struct md_rdev *rdev = NULL; 05616be5e11f66 NeilBrown 2012-05-21 2498 sector_t s; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2499 ^1da177e4c3f41 Linus Torvalds 2005-04-16 2500 for (i=0 ; i<disks; i++) ^1da177e4c3f41 Linus Torvalds 2005-04-16 2501 if (bi == &sh->dev[i].req) ^1da177e4c3f41 Linus Torvalds 2005-04-16 2502 break; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2503 4246a0b63bd8f5 Christoph Hellwig 2015-07-20 2504 pr_debug("end_read_request %llu/%d, count: %d, error %d.\n", ^1da177e4c3f41 Linus Torvalds 2005-04-16 2505 (unsigned long long)sh->sector, i, atomic_read(&sh->count), 4e4cbee93d5613 Christoph Hellwig 2017-06-03 2506 bi->bi_status); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2507 if (i == disks) { 5f9d1fde7d54a5 Shaohua Li 2016-08-22 2508 bio_reset(bi); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2509 BUG(); 6712ecf8f64811 NeilBrown 2007-09-27 2510 return; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2511 } 14a75d3e07c784 NeilBrown 2011-12-23 2512 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) dd054fce88d33d NeilBrown 2011-12-23 2513 /* If replacement finished while this request was outstanding, dd054fce88d33d NeilBrown 2011-12-23 2514 * 'replacement' might be NULL already. dd054fce88d33d NeilBrown 2011-12-23 2515 * In that case it moved down to 'rdev'. dd054fce88d33d NeilBrown 2011-12-23 2516 * rdev is not removed until all requests are finished. dd054fce88d33d NeilBrown 2011-12-23 2517 */ 14a75d3e07c784 NeilBrown 2011-12-23 2518 rdev = conf->disks[i].replacement; dd054fce88d33d NeilBrown 2011-12-23 2519 if (!rdev) 14a75d3e07c784 NeilBrown 2011-12-23 2520 rdev = conf->disks[i].rdev; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2521 05616be5e11f66 NeilBrown 2012-05-21 2522 if (use_new_offset(conf, sh)) 05616be5e11f66 NeilBrown 2012-05-21 2523 s = sh->sector + rdev->new_data_offset; 05616be5e11f66 NeilBrown 2012-05-21 2524 else 05616be5e11f66 NeilBrown 2012-05-21 2525 s = sh->sector + rdev->data_offset; 4e4cbee93d5613 Christoph Hellwig 2017-06-03 2526 if (!bi->bi_status) { ^1da177e4c3f41 Linus Torvalds 2005-04-16 2527 set_bit(R5_UPTODATE, &sh->dev[i].flags); 4e5314b56a7ea1 NeilBrown 2005-11-08 2528 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { 14a75d3e07c784 NeilBrown 2011-12-23 2529 /* Note that this cannot happen on a 14a75d3e07c784 NeilBrown 2011-12-23 2530 * replacement device. We just fail those on 14a75d3e07c784 NeilBrown 2011-12-23 2531 * any error 14a75d3e07c784 NeilBrown 2011-12-23 2532 */ cc6167b4f3b3ca NeilBrown 2016-11-02 @2533 pr_info_ratelimited( cc6167b4f3b3ca NeilBrown 2016-11-02 2534 "md/raid:%s: read error corrected (%lu sectors at %llu on %s)\n", 98afa1940ade70 Yufen Yu 2020-07-02 2535 mdname(conf->mddev), 98afa1940ade70 Yufen Yu 2020-07-02 2536 conf->stripe_sectors, 05616be5e11f66 NeilBrown 2012-05-21 2537 (unsigned long long)s, d69504325978c4 NeilBrown 2006-07-10 2538 bdevname(rdev->bdev, b)); 98afa1940ade70 Yufen Yu 2020-07-02 2539 atomic_add(conf->stripe_sectors, &rdev->corrected_errors); 4e5314b56a7ea1 NeilBrown 2005-11-08 2540 clear_bit(R5_ReadError, &sh->dev[i].flags); 4e5314b56a7ea1 NeilBrown 2005-11-08 2541 clear_bit(R5_ReWrite, &sh->dev[i].flags); 3f9e7c140e4c4e majianpeng 2012-07-31 2542 } else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) 3f9e7c140e4c4e majianpeng 2012-07-31 2543 clear_bit(R5_ReadNoMerge, &sh->dev[i].flags); 3f9e7c140e4c4e majianpeng 2012-07-31 2544 86aa1397ddfde5 Song Liu 2017-01-12 2545 if (test_bit(R5_InJournal, &sh->dev[i].flags)) 86aa1397ddfde5 Song Liu 2017-01-12 2546 /* 86aa1397ddfde5 Song Liu 2017-01-12 2547 * end read for a page in journal, this 86aa1397ddfde5 Song Liu 2017-01-12 2548 * must be preparing for prexor in rmw 86aa1397ddfde5 Song Liu 2017-01-12 2549 */ 86aa1397ddfde5 Song Liu 2017-01-12 2550 set_bit(R5_OrigPageUPTDODATE, &sh->dev[i].flags); 86aa1397ddfde5 Song Liu 2017-01-12 2551 14a75d3e07c784 NeilBrown 2011-12-23 2552 if (atomic_read(&rdev->read_errors)) 14a75d3e07c784 NeilBrown 2011-12-23 2553 atomic_set(&rdev->read_errors, 0); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2554 } else { 14a75d3e07c784 NeilBrown 2011-12-23 2555 const char *bdn = bdevname(rdev->bdev, b); ba22dcbf106338 NeilBrown 2005-11-08 2556 int retry = 0; 2e8ac30312973d majianpeng 2012-07-03 2557 int set_bad = 0; d69504325978c4 NeilBrown 2006-07-10 2558 ^1da177e4c3f41 Linus Torvalds 2005-04-16 2559 clear_bit(R5_UPTODATE, &sh->dev[i].flags); b76b4715eba0d0 Nigel Croxon 2019-09-06 2560 if (!(bi->bi_status == BLK_STS_PROTECTION)) d69504325978c4 NeilBrown 2006-07-10 2561 atomic_inc(&rdev->read_errors); 14a75d3e07c784 NeilBrown 2011-12-23 2562 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) cc6167b4f3b3ca NeilBrown 2016-11-02 2563 pr_warn_ratelimited( cc6167b4f3b3ca NeilBrown 2016-11-02 2564 "md/raid:%s: read error on replacement device (sector %llu on %s).\n", 14a75d3e07c784 NeilBrown 2011-12-23 2565 mdname(conf->mddev), 05616be5e11f66 NeilBrown 2012-05-21 2566 (unsigned long long)s, 14a75d3e07c784 NeilBrown 2011-12-23 2567 bdn); 2e8ac30312973d majianpeng 2012-07-03 2568 else if (conf->mddev->degraded >= conf->max_degraded) { 2e8ac30312973d majianpeng 2012-07-03 2569 set_bad = 1; cc6167b4f3b3ca NeilBrown 2016-11-02 2570 pr_warn_ratelimited( cc6167b4f3b3ca NeilBrown 2016-11-02 2571 "md/raid:%s: read error not correctable (sector %llu on %s).\n", d69504325978c4 NeilBrown 2006-07-10 2572 mdname(conf->mddev), 05616be5e11f66 NeilBrown 2012-05-21 2573 (unsigned long long)s, d69504325978c4 NeilBrown 2006-07-10 2574 bdn); 2e8ac30312973d majianpeng 2012-07-03 2575 } else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) { 4e5314b56a7ea1 NeilBrown 2005-11-08 2576 /* Oh, no!!! */ 2e8ac30312973d majianpeng 2012-07-03 2577 set_bad = 1; cc6167b4f3b3ca NeilBrown 2016-11-02 2578 pr_warn_ratelimited( cc6167b4f3b3ca NeilBrown 2016-11-02 2579 "md/raid:%s: read error NOT corrected!! (sector %llu on %s).\n", d69504325978c4 NeilBrown 2006-07-10 2580 mdname(conf->mddev), 05616be5e11f66 NeilBrown 2012-05-21 2581 (unsigned long long)s, d69504325978c4 NeilBrown 2006-07-10 2582 bdn); 2e8ac30312973d majianpeng 2012-07-03 2583 } else if (atomic_read(&rdev->read_errors) 0009fad0333708 Nigel Croxon 2019-08-21 2584 > conf->max_nr_stripes) { 0009fad0333708 Nigel Croxon 2019-08-21 2585 if (!test_bit(Faulty, &rdev->flags)) { 0009fad0333708 Nigel Croxon 2019-08-21 2586 pr_warn("md/raid:%s: %d read_errors > %d stripes\n", 0009fad0333708 Nigel Croxon 2019-08-21 2587 mdname(conf->mddev), 0009fad0333708 Nigel Croxon 2019-08-21 2588 atomic_read(&rdev->read_errors), 0009fad0333708 Nigel Croxon 2019-08-21 2589 conf->max_nr_stripes); cc6167b4f3b3ca NeilBrown 2016-11-02 2590 pr_warn("md/raid:%s: Too many read errors, failing device %s.\n", d69504325978c4 NeilBrown 2006-07-10 2591 mdname(conf->mddev), bdn); 0009fad0333708 Nigel Croxon 2019-08-21 2592 } 0009fad0333708 Nigel Croxon 2019-08-21 2593 } else ba22dcbf106338 NeilBrown 2005-11-08 2594 retry = 1; edfa1f651e9326 Bian Yu 2013-11-14 2595 if (set_bad && test_bit(In_sync, &rdev->flags) edfa1f651e9326 Bian Yu 2013-11-14 2596 && !test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) edfa1f651e9326 Bian Yu 2013-11-14 2597 retry = 1; ba22dcbf106338 NeilBrown 2005-11-08 2598 if (retry) 143f6e733b7305 Xiao Ni 2019-07-08 2599 if (sh->qd_idx >= 0 && sh->pd_idx == i) 143f6e733b7305 Xiao Ni 2019-07-08 2600 set_bit(R5_ReadError, &sh->dev[i].flags); 143f6e733b7305 Xiao Ni 2019-07-08 2601 else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) { ba22dcbf106338 NeilBrown 2005-11-08 2602 set_bit(R5_ReadError, &sh->dev[i].flags); 3f9e7c140e4c4e majianpeng 2012-07-31 2603 clear_bit(R5_ReadNoMerge, &sh->dev[i].flags); 3f9e7c140e4c4e majianpeng 2012-07-31 2604 } else 3f9e7c140e4c4e majianpeng 2012-07-31 2605 set_bit(R5_ReadNoMerge, &sh->dev[i].flags); ba22dcbf106338 NeilBrown 2005-11-08 2606 else { 4e5314b56a7ea1 NeilBrown 2005-11-08 2607 clear_bit(R5_ReadError, &sh->dev[i].flags); 4e5314b56a7ea1 NeilBrown 2005-11-08 2608 clear_bit(R5_ReWrite, &sh->dev[i].flags); 2e8ac30312973d majianpeng 2012-07-03 2609 if (!(set_bad 2e8ac30312973d majianpeng 2012-07-03 2610 && test_bit(In_sync, &rdev->flags) 2e8ac30312973d majianpeng 2012-07-03 2611 && rdev_set_badblocks( 98afa1940ade70 Yufen Yu 2020-07-02 2612 rdev, sh->sector, 98afa1940ade70 Yufen Yu 2020-07-02 2613 conf->stripe_sectors, 0))) d69504325978c4 NeilBrown 2006-07-10 2614 md_error(conf->mddev, rdev); ba22dcbf106338 NeilBrown 2005-11-08 2615 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 2616 } 14a75d3e07c784 NeilBrown 2011-12-23 2617 rdev_dec_pending(rdev, conf->mddev); c94455558337ee Shaohua Li 2016-09-08 2618 bio_reset(bi); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2619 clear_bit(R5_LOCKED, &sh->dev[i].flags); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2620 set_bit(STRIPE_HANDLE, &sh->state); 6d036f7d52e5a9 Shaohua Li 2015-08-13 2621 raid5_release_stripe(sh); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2622 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 2623 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip