Hi Coly, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.6 next-20200403] [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/Coly-Li/raid5-use-memalloc_noio_save-restore-in-resize_chunks/20200402-215014 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 919dce24701f7b34681a6a1d3ef95c9f6c4fb1cc config: x86_64-rhel (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.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 'scribble_alloc': drivers/md/raid5.c:2237:15: warning: unused variable 'noio_flag' [-Wunused-variable] unsigned int noio_flag; ^~~~~~~~~ drivers/md/raid5.c: In function 'resize_chunks': >> drivers/md/raid5.c:2275:14: error: implicit declaration of function 'memalloc_noio_save'; did you mean 'vmalloc_to_page'? [-Werror=implicit-function-declaration] noio_flag = memalloc_noio_save(); ^~~~~~~~~~~~~~~~~~ vmalloc_to_page >> drivers/md/raid5.c:2285:2: error: implicit declaration of function 'memalloc_noio_restore'; did you mean '__vmalloc_node_range'? [-Werror=implicit-function-declaration] memalloc_noio_restore(noio_flag); ^~~~~~~~~~~~~~~~~~~~~ __vmalloc_node_range cc1: some warnings being treated as errors vim +2275 drivers/md/raid5.c 2249 2250 static int resize_chunks(struct r5conf *conf, int new_disks, int new_sectors) 2251 { 2252 unsigned long cpu; 2253 int err = 0; 2254 unsigned int noio_flag; 2255 2256 /* 2257 * Never shrink. And mddev_suspend() could deadlock if this is called 2258 * from raid5d. In that case, scribble_disks and scribble_sectors 2259 * should equal to new_disks and new_sectors 2260 */ 2261 if (conf->scribble_disks >= new_disks && 2262 conf->scribble_sectors >= new_sectors) 2263 return 0; 2264 mddev_suspend(conf->mddev); 2265 get_online_cpus(); 2266 2267 /* 2268 * scribble_alloc() allocates memory by kvmalloc_array(), if 2269 * the memory allocation triggers memory reclaim I/Os onto 2270 * this raid array, there might be potential deadlock if this 2271 * raid array happens to be suspended during memory allocation. 2272 * Here the scope APIs are used to disable such recursive memory 2273 * reclaim I/Os. 2274 */ > 2275 noio_flag = memalloc_noio_save(); 2276 for_each_present_cpu(cpu) { 2277 struct raid5_percpu *percpu; 2278 2279 percpu = per_cpu_ptr(conf->percpu, cpu); 2280 err = scribble_alloc(percpu, new_disks, 2281 new_sectors / STRIPE_SECTORS); 2282 if (err) 2283 break; 2284 } > 2285 memalloc_noio_restore(noio_flag); 2286 2287 put_online_cpus(); 2288 mddev_resume(conf->mddev); 2289 if (!err) { 2290 conf->scribble_disks = new_disks; 2291 conf->scribble_sectors = new_sectors; 2292 } 2293 return err; 2294 } 2295 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip