Re: [PATCH] f2fs: fix wrong inflight page stats for directIO

From: kernel test robot
Date: Mon Jul 19 2021 - 06:39:58 EST


Hi Chao,

I love your patch! Yet something to improve:

[auto build test ERROR on f2fs/dev-test]
[also build test ERROR on linux/master linus/master v5.14-rc2 next-20210716]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Chao-Yu/f2fs-fix-wrong-inflight-page-stats-for-directIO/20210719-170844
base: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test
config: nios2-randconfig-r031-20210719 (attached as .config)
compiler: nios2-linux-gcc (GCC) 10.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
# https://github.com/0day-ci/linux/commit/5fc42a72cb1e41b799ea659d710c091804fb648a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chao-Yu/f2fs-fix-wrong-inflight-page-stats-for-directIO/20210719-170844
git checkout 5fc42a72cb1e41b799ea659d710c091804fb648a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash fs/

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

All errors (new ones prefixed by >>):

fs/f2fs/data.c: In function 'f2fs_dio_submit_bio':
>> fs/f2fs/data.c:3523:16: error: 'blkcnt' undeclared (first use in this function); did you mean 'blkcg'?
3523 | dio->blkcnt = blkcnt;
| ^~~~~~
| blkcg
fs/f2fs/data.c:3523:16: note: each undeclared identifier is reported only once for each function it appears in


vim +3523 fs/f2fs/data.c

3508
3509 static void f2fs_dio_submit_bio(struct bio *bio, struct inode *inode,
3510 loff_t file_offset)
3511 {
3512 struct f2fs_private_dio *dio;
3513 bool write = (bio_op(bio) == REQ_OP_WRITE);
3514
3515 dio = f2fs_kzalloc(F2FS_I_SB(inode),
3516 sizeof(struct f2fs_private_dio), GFP_NOFS);
3517 if (!dio)
3518 goto out;
3519
3520 dio->inode = inode;
3521 dio->orig_end_io = bio->bi_end_io;
3522 dio->orig_private = bio->bi_private;
> 3523 dio->blkcnt = blkcnt;
3524 dio->write = write;
3525
3526 bio->bi_end_io = f2fs_dio_end_io;
3527 bio->bi_private = dio;
3528
3529 inc_page_counts(F2FS_I_SB(inode),
3530 write ? F2FS_DIO_WRITE : F2FS_DIO_READ, dio->blkcnt);
3531
3532 submit_bio(bio);
3533 return;
3534 out:
3535 bio->bi_status = BLK_STS_IOERR;
3536 bio_endio(bio);
3537 }
3538

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

Attachment: .config.gz
Description: application/gzip