Re: [PATCH v3 1/2] iomap: Add a page_prepare callback

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

 



Hi Andreas,

I love your patch! Yet something to improve:

[auto build test ERROR on gfs2/for-next]
[also build test ERROR on v5.1-rc6 next-20190424]
[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/Andreas-Gruenbacher/iomap-Add-a-page_prepare-callback/20190426-020018
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.1.0
reproduce:
        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
        GCC_VERSION=8.1.0 make.cross ARCH=xtensa 

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

Note: the linux-review/Andreas-Gruenbacher/iomap-Add-a-page_prepare-callback/20190426-020018 HEAD 9167204805d5e926444d03b3fa3ac1d1bc899a8a builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   fs/gfs2/bmap.c: In function 'gfs2_iomap_begin_write':
>> fs/gfs2/bmap.c:1080:10: error: 'struct iomap' has no member named 'page_done'; did you mean 'page_ops'?
      iomap->page_done = gfs2_iomap_journaled_page_done;
             ^~~~~~~~~
             page_ops

vim +1080 fs/gfs2/bmap.c

64bc06bb Andreas Gruenbacher 2018-06-24  1002  
64bc06bb Andreas Gruenbacher 2018-06-24  1003  static int gfs2_iomap_begin_write(struct inode *inode, loff_t pos,
64bc06bb Andreas Gruenbacher 2018-06-24  1004  				  loff_t length, unsigned flags,
c26b5aa8 Andreas Gruenbacher 2018-11-11  1005  				  struct iomap *iomap,
c26b5aa8 Andreas Gruenbacher 2018-11-11  1006  				  struct metapath *mp)
64bc06bb Andreas Gruenbacher 2018-06-24  1007  {
64bc06bb Andreas Gruenbacher 2018-06-24  1008  	struct gfs2_inode *ip = GFS2_I(inode);
64bc06bb Andreas Gruenbacher 2018-06-24  1009  	struct gfs2_sbd *sdp = GFS2_SB(inode);
64bc06bb Andreas Gruenbacher 2018-06-24  1010  	unsigned int data_blocks = 0, ind_blocks = 0, rblocks;
64bc06bb Andreas Gruenbacher 2018-06-24  1011  	bool unstuff, alloc_required;
628e366d Andreas Gruenbacher 2018-06-04  1012  	int ret;
628e366d Andreas Gruenbacher 2018-06-04  1013  
64bc06bb Andreas Gruenbacher 2018-06-24  1014  	ret = gfs2_write_lock(inode);
64bc06bb Andreas Gruenbacher 2018-06-24  1015  	if (ret)
64bc06bb Andreas Gruenbacher 2018-06-24  1016  		return ret;
64bc06bb Andreas Gruenbacher 2018-06-24  1017  
64bc06bb Andreas Gruenbacher 2018-06-24  1018  	unstuff = gfs2_is_stuffed(ip) &&
64bc06bb Andreas Gruenbacher 2018-06-24  1019  		  pos + length > gfs2_max_stuffed_size(ip);
64bc06bb Andreas Gruenbacher 2018-06-24  1020  
c26b5aa8 Andreas Gruenbacher 2018-11-11  1021  	ret = gfs2_iomap_get(inode, pos, length, flags, iomap, mp);
64bc06bb Andreas Gruenbacher 2018-06-24  1022  	if (ret)
c26b5aa8 Andreas Gruenbacher 2018-11-11  1023  		goto out_unlock;
64bc06bb Andreas Gruenbacher 2018-06-24  1024  
64bc06bb Andreas Gruenbacher 2018-06-24  1025  	alloc_required = unstuff || iomap->type == IOMAP_HOLE;
64bc06bb Andreas Gruenbacher 2018-06-24  1026  
64bc06bb Andreas Gruenbacher 2018-06-24  1027  	if (alloc_required || gfs2_is_jdata(ip))
64bc06bb Andreas Gruenbacher 2018-06-24  1028  		gfs2_write_calc_reserv(ip, iomap->length, &data_blocks,
64bc06bb Andreas Gruenbacher 2018-06-24  1029  				       &ind_blocks);
64bc06bb Andreas Gruenbacher 2018-06-24  1030  
64bc06bb Andreas Gruenbacher 2018-06-24  1031  	if (alloc_required) {
64bc06bb Andreas Gruenbacher 2018-06-24  1032  		struct gfs2_alloc_parms ap = {
64bc06bb Andreas Gruenbacher 2018-06-24  1033  			.target = data_blocks + ind_blocks
64bc06bb Andreas Gruenbacher 2018-06-24  1034  		};
64bc06bb Andreas Gruenbacher 2018-06-24  1035  
64bc06bb Andreas Gruenbacher 2018-06-24  1036  		ret = gfs2_quota_lock_check(ip, &ap);
64bc06bb Andreas Gruenbacher 2018-06-24  1037  		if (ret)
c26b5aa8 Andreas Gruenbacher 2018-11-11  1038  			goto out_unlock;
64bc06bb Andreas Gruenbacher 2018-06-24  1039  
64bc06bb Andreas Gruenbacher 2018-06-24  1040  		ret = gfs2_inplace_reserve(ip, &ap);
64bc06bb Andreas Gruenbacher 2018-06-24  1041  		if (ret)
64bc06bb Andreas Gruenbacher 2018-06-24  1042  			goto out_qunlock;
64bc06bb Andreas Gruenbacher 2018-06-24  1043  	}
64bc06bb Andreas Gruenbacher 2018-06-24  1044  
64bc06bb Andreas Gruenbacher 2018-06-24  1045  	rblocks = RES_DINODE + ind_blocks;
64bc06bb Andreas Gruenbacher 2018-06-24  1046  	if (gfs2_is_jdata(ip))
64bc06bb Andreas Gruenbacher 2018-06-24  1047  		rblocks += data_blocks;
64bc06bb Andreas Gruenbacher 2018-06-24  1048  	if (ind_blocks || data_blocks)
64bc06bb Andreas Gruenbacher 2018-06-24  1049  		rblocks += RES_STATFS + RES_QUOTA;
64bc06bb Andreas Gruenbacher 2018-06-24  1050  	if (inode == sdp->sd_rindex)
64bc06bb Andreas Gruenbacher 2018-06-24  1051  		rblocks += 2 * RES_STATFS;
64bc06bb Andreas Gruenbacher 2018-06-24  1052  	if (alloc_required)
64bc06bb Andreas Gruenbacher 2018-06-24  1053  		rblocks += gfs2_rg_blocks(ip, data_blocks + ind_blocks);
64bc06bb Andreas Gruenbacher 2018-06-24  1054  
64bc06bb Andreas Gruenbacher 2018-06-24  1055  	ret = gfs2_trans_begin(sdp, rblocks, iomap->length >> inode->i_blkbits);
64bc06bb Andreas Gruenbacher 2018-06-24  1056  	if (ret)
64bc06bb Andreas Gruenbacher 2018-06-24  1057  		goto out_trans_fail;
64bc06bb Andreas Gruenbacher 2018-06-24  1058  
64bc06bb Andreas Gruenbacher 2018-06-24  1059  	if (unstuff) {
64bc06bb Andreas Gruenbacher 2018-06-24  1060  		ret = gfs2_unstuff_dinode(ip, NULL);
64bc06bb Andreas Gruenbacher 2018-06-24  1061  		if (ret)
64bc06bb Andreas Gruenbacher 2018-06-24  1062  			goto out_trans_end;
c26b5aa8 Andreas Gruenbacher 2018-11-11  1063  		release_metapath(mp);
64bc06bb Andreas Gruenbacher 2018-06-24  1064  		ret = gfs2_iomap_get(inode, iomap->offset, iomap->length,
c26b5aa8 Andreas Gruenbacher 2018-11-11  1065  				     flags, iomap, mp);
64bc06bb Andreas Gruenbacher 2018-06-24  1066  		if (ret)
64bc06bb Andreas Gruenbacher 2018-06-24  1067  			goto out_trans_end;
64bc06bb Andreas Gruenbacher 2018-06-24  1068  	}
64bc06bb Andreas Gruenbacher 2018-06-24  1069  
64bc06bb Andreas Gruenbacher 2018-06-24  1070  	if (iomap->type == IOMAP_HOLE) {
c26b5aa8 Andreas Gruenbacher 2018-11-11  1071  		ret = gfs2_iomap_alloc(inode, iomap, flags, mp);
64bc06bb Andreas Gruenbacher 2018-06-24  1072  		if (ret) {
64bc06bb Andreas Gruenbacher 2018-06-24  1073  			gfs2_trans_end(sdp);
64bc06bb Andreas Gruenbacher 2018-06-24  1074  			gfs2_inplace_release(ip);
64bc06bb Andreas Gruenbacher 2018-06-24  1075  			punch_hole(ip, iomap->offset, iomap->length);
64bc06bb Andreas Gruenbacher 2018-06-24  1076  			goto out_qunlock;
64bc06bb Andreas Gruenbacher 2018-06-24  1077  		}
64bc06bb Andreas Gruenbacher 2018-06-24  1078  	}
fee5150c Andreas Gruenbacher 2018-10-10  1079  	if (!gfs2_is_stuffed(ip) && gfs2_is_jdata(ip))
64bc06bb Andreas Gruenbacher 2018-06-24 @1080  		iomap->page_done = gfs2_iomap_journaled_page_done;
64bc06bb Andreas Gruenbacher 2018-06-24  1081  	return 0;
64bc06bb Andreas Gruenbacher 2018-06-24  1082  
64bc06bb Andreas Gruenbacher 2018-06-24  1083  out_trans_end:
64bc06bb Andreas Gruenbacher 2018-06-24  1084  	gfs2_trans_end(sdp);
64bc06bb Andreas Gruenbacher 2018-06-24  1085  out_trans_fail:
64bc06bb Andreas Gruenbacher 2018-06-24  1086  	if (alloc_required)
64bc06bb Andreas Gruenbacher 2018-06-24  1087  		gfs2_inplace_release(ip);
64bc06bb Andreas Gruenbacher 2018-06-24  1088  out_qunlock:
64bc06bb Andreas Gruenbacher 2018-06-24  1089  	if (alloc_required)
64bc06bb Andreas Gruenbacher 2018-06-24  1090  		gfs2_quota_unlock(ip);
c26b5aa8 Andreas Gruenbacher 2018-11-11  1091  out_unlock:
64bc06bb Andreas Gruenbacher 2018-06-24  1092  	gfs2_write_unlock(inode);
64bc06bb Andreas Gruenbacher 2018-06-24  1093  	return ret;
64bc06bb Andreas Gruenbacher 2018-06-24  1094  }
64bc06bb Andreas Gruenbacher 2018-06-24  1095  

:::::: The code at line 1080 was first introduced by commit
:::::: 64bc06bb32ee9cf458f432097113c8b495d75757 gfs2: iomap buffered write support

:::::: TO: Andreas Gruenbacher <agruenba@xxxxxxxxxx>
:::::: CC: Andreas Gruenbacher <agruenba@xxxxxxxxxx>

---
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 Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux