Re: [PATCH 1/2] fs: Convert writepage_t callback to pass a folio

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

 



Hi Matthew,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20230125]
[cannot apply to tytso-ext4/dev akpm-mm/mm-everything cifs/for-next mszeredi-fuse/for-next xfs-linux/for-next trondmy-nfs/linux-next hubcap/for-next linus/master v6.2-rc5 v6.2-rc4 v6.2-rc3 v6.2-rc5]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Matthew-Wilcox-Oracle/fs-Convert-writepage_t-callback-to-pass-a-folio/20230128-112951
patch link:    https://lore.kernel.org/r/20230126201255.1681189-2-willy%40infradead.org
patch subject: [PATCH 1/2] fs: Convert writepage_t callback to pass a folio
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20230129/202301290130.frg9YGk5-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/19e834de445f5d3a390fff94320e71e8077ce632
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Matthew-Wilcox-Oracle/fs-Convert-writepage_t-callback-to-pass-a-folio/20230128-112951
        git checkout 19e834de445f5d3a390fff94320e71e8077ce632
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash fs/gfs2/

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

All errors (new ones prefixed by >>):

   fs/gfs2/log.c: In function 'gfs2_ail1_start_one':
>> fs/gfs2/log.c:143:55: error: passing argument 3 of 'write_cache_pages' from incompatible pointer type [-Werror=incompatible-pointer-types]
     143 |                 ret = write_cache_pages(mapping, wbc, __gfs2_writepage, mapping);
         |                                                       ^~~~~~~~~~~~~~~~
         |                                                       |
         |                                                       int (*)(struct page *, struct writeback_control *, void *)
   In file included from fs/gfs2/log.c:20:
   include/linux/writeback.h:375:66: note: expected 'writepage_t' {aka 'int (*)(struct folio *, struct writeback_control *, void *)'} but argument is of type 'int (*)(struct page *, struct writeback_control *, void *)'
     375 |                       struct writeback_control *wbc, writepage_t writepage,
         |                                                      ~~~~~~~~~~~~^~~~~~~~~
   cc1: some warnings being treated as errors


vim +/write_cache_pages +143 fs/gfs2/log.c

95ecbd0f162fc0 Andreas Gruenbacher     2023-01-19   91  
ddacfaf76dd620 Steven Whitehouse       2006-10-03   92  /**
c551f66c5dfefd Lee Jones               2021-03-30   93   * gfs2_ail1_start_one - Start I/O on a transaction
c551f66c5dfefd Lee Jones               2021-03-30   94   * @sdp: The superblock
4667a0ec328678 Steven Whitehouse       2011-04-18   95   * @wbc: The writeback control structure
c551f66c5dfefd Lee Jones               2021-03-30   96   * @tr: The transaction to start I/O on
c551f66c5dfefd Lee Jones               2021-03-30   97   * @plug: The block plug currently active
ddacfaf76dd620 Steven Whitehouse       2006-10-03   98   */
ddacfaf76dd620 Steven Whitehouse       2006-10-03   99  
4f1de018215fb5 Steven Whitehouse       2011-04-26  100  static int gfs2_ail1_start_one(struct gfs2_sbd *sdp,
4667a0ec328678 Steven Whitehouse       2011-04-18  101  			       struct writeback_control *wbc,
17d77684088510 Bob Peterson            2021-02-18  102  			       struct gfs2_trans *tr, struct blk_plug *plug)
d6a079e82efd5f Dave Chinner            2011-03-11  103  __releases(&sdp->sd_ail_lock)
d6a079e82efd5f Dave Chinner            2011-03-11  104  __acquires(&sdp->sd_ail_lock)
ddacfaf76dd620 Steven Whitehouse       2006-10-03  105  {
5ac048bb7ea6e8 Steven Whitehouse       2011-03-30  106  	struct gfs2_glock *gl = NULL;
4667a0ec328678 Steven Whitehouse       2011-04-18  107  	struct address_space *mapping;
ddacfaf76dd620 Steven Whitehouse       2006-10-03  108  	struct gfs2_bufdata *bd, *s;
ddacfaf76dd620 Steven Whitehouse       2006-10-03  109  	struct buffer_head *bh;
b1676cbb11153b Bob Peterson            2019-11-13  110  	int ret = 0;
ddacfaf76dd620 Steven Whitehouse       2006-10-03  111  
16ca9412d80181 Benjamin Marzinski      2013-04-05  112  	list_for_each_entry_safe_reverse(bd, s, &tr->tr_ail1_list, bd_ail_st_list) {
ddacfaf76dd620 Steven Whitehouse       2006-10-03  113  		bh = bd->bd_bh;
ddacfaf76dd620 Steven Whitehouse       2006-10-03  114  
16ca9412d80181 Benjamin Marzinski      2013-04-05  115  		gfs2_assert(sdp, bd->bd_tr == tr);
ddacfaf76dd620 Steven Whitehouse       2006-10-03  116  
ddacfaf76dd620 Steven Whitehouse       2006-10-03  117  		if (!buffer_busy(bh)) {
30fe70a85a909a Bob Peterson            2019-11-13  118  			if (buffer_uptodate(bh)) {
30fe70a85a909a Bob Peterson            2019-11-13  119  				list_move(&bd->bd_ail_st_list,
30fe70a85a909a Bob Peterson            2019-11-13  120  					  &tr->tr_ail2_list);
30fe70a85a909a Bob Peterson            2019-11-13  121  				continue;
30fe70a85a909a Bob Peterson            2019-11-13  122  			}
036330c914365f Bob Peterson            2019-04-10  123  			if (!cmpxchg(&sdp->sd_log_error, 0, -EIO)) {
ddacfaf76dd620 Steven Whitehouse       2006-10-03  124  				gfs2_io_error_bh(sdp, bh);
69511080bd6efd Bob Peterson            2019-02-12  125  				gfs2_withdraw_delayed(sdp);
9e1a9ecd13b9bb Andreas Gruenbacher     2018-06-07  126  			}
ddacfaf76dd620 Steven Whitehouse       2006-10-03  127  		}
ddacfaf76dd620 Steven Whitehouse       2006-10-03  128  
30fe70a85a909a Bob Peterson            2019-11-13  129  		if (gfs2_withdrawn(sdp)) {
30fe70a85a909a Bob Peterson            2019-11-13  130  			gfs2_remove_from_ail(bd);
30fe70a85a909a Bob Peterson            2019-11-13  131  			continue;
30fe70a85a909a Bob Peterson            2019-11-13  132  		}
ddacfaf76dd620 Steven Whitehouse       2006-10-03  133  		if (!buffer_dirty(bh))
ddacfaf76dd620 Steven Whitehouse       2006-10-03  134  			continue;
5ac048bb7ea6e8 Steven Whitehouse       2011-03-30  135  		if (gl == bd->bd_gl)
5ac048bb7ea6e8 Steven Whitehouse       2011-03-30  136  			continue;
5ac048bb7ea6e8 Steven Whitehouse       2011-03-30  137  		gl = bd->bd_gl;
16ca9412d80181 Benjamin Marzinski      2013-04-05  138  		list_move(&bd->bd_ail_st_list, &tr->tr_ail1_list);
11551cf15ecc17 Matthew Wilcox (Oracle  2022-12-15  139) 		mapping = bh->b_folio->mapping;
4f1de018215fb5 Steven Whitehouse       2011-04-26  140  		if (!mapping)
4f1de018215fb5 Steven Whitehouse       2011-04-26  141  			continue;
d6a079e82efd5f Dave Chinner            2011-03-11  142  		spin_unlock(&sdp->sd_ail_lock);
95ecbd0f162fc0 Andreas Gruenbacher     2023-01-19 @143  		ret = write_cache_pages(mapping, wbc, __gfs2_writepage, mapping);
17d77684088510 Bob Peterson            2021-02-18  144  		if (need_resched()) {
17d77684088510 Bob Peterson            2021-02-18  145  			blk_finish_plug(plug);
17d77684088510 Bob Peterson            2021-02-18  146  			cond_resched();
17d77684088510 Bob Peterson            2021-02-18  147  			blk_start_plug(plug);
17d77684088510 Bob Peterson            2021-02-18  148  		}
d6a079e82efd5f Dave Chinner            2011-03-11  149  		spin_lock(&sdp->sd_ail_lock);
4e79e3f08e576a Bob Peterson            2020-11-12  150  		if (ret == -ENODATA) /* if a jdata write into a new hole */
4e79e3f08e576a Bob Peterson            2020-11-12  151  			ret = 0; /* ignore it */
b1676cbb11153b Bob Peterson            2019-11-13  152  		if (ret || wbc->nr_to_write <= 0)
4667a0ec328678 Steven Whitehouse       2011-04-18  153  			break;
b1676cbb11153b Bob Peterson            2019-11-13  154  		return -EBUSY;
4667a0ec328678 Steven Whitehouse       2011-04-18  155  	}
4f1de018215fb5 Steven Whitehouse       2011-04-26  156  
b1676cbb11153b Bob Peterson            2019-11-13  157  	return ret;
4667a0ec328678 Steven Whitehouse       2011-04-18  158  }
ddacfaf76dd620 Steven Whitehouse       2006-10-03  159  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux