All of lore.kernel.org
 help / color / mirror / Atom feed
* [chao-linux:compression 7/7] fs/f2fs/data.c:2100: undefined reference to `__divdi3'
@ 2020-03-31 18:04 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-03-31 18:04 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5472 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git compression
head:   1f78b0122255807d0aaf3c76a3d73761bc115bf1
commit: 1f78b0122255807d0aaf3c76a3d73761bc115bf1 [7/7] f2fs: use round_up()/DIV_ROUND_UP()
config: h8300-randconfig-a001-20200331 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 1f78b0122255807d0aaf3c76a3d73761bc115bf1
        # save the attached .config to linux build tree
        GCC_VERSION=9.3.0 make.cross ARCH=h8300 

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

All errors (new ones prefixed by >>):

   h8300-linux-ld: fs/f2fs/data.o: in function `f2fs_read_multi_pages':
>> fs/f2fs/data.c:2100: undefined reference to `__divdi3'
   h8300-linux-ld: fs/f2fs/data.o: in function `f2fs_read_single_page':
   fs/f2fs/data.c:1981: undefined reference to `__divdi3'

vim +2100 fs/f2fs/data.c

  2081	
  2082	#ifdef CONFIG_F2FS_FS_COMPRESSION
  2083	int f2fs_read_multi_pages(struct compress_ctx *cc, struct bio **bio_ret,
  2084					unsigned nr_pages, sector_t *last_block_in_bio,
  2085					bool is_readahead, bool for_write)
  2086	{
  2087		struct dnode_of_data dn;
  2088		struct inode *inode = cc->inode;
  2089		struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
  2090		struct bio *bio = *bio_ret;
  2091		unsigned int start_idx = cc->cluster_idx << cc->log_cluster_size;
  2092		sector_t last_block_in_file;
  2093		const unsigned blocksize = 1 << inode->i_blkbits;
  2094		struct decompress_io_ctx *dic = NULL;
  2095		int i;
  2096		int ret = 0;
  2097	
  2098		f2fs_bug_on(sbi, f2fs_cluster_is_empty(cc));
  2099	
> 2100		last_block_in_file = DIV_ROUND_UP(f2fs_readpage_limit(inode),
  2101									blocksize);
  2102	
  2103		/* get rid of pages beyond EOF */
  2104		for (i = 0; i < cc->cluster_size; i++) {
  2105			struct page *page = cc->rpages[i];
  2106	
  2107			if (!page)
  2108				continue;
  2109			if ((sector_t)page->index >= last_block_in_file) {
  2110				zero_user_segment(page, 0, PAGE_SIZE);
  2111				if (!PageUptodate(page))
  2112					SetPageUptodate(page);
  2113			} else if (!PageUptodate(page)) {
  2114				continue;
  2115			}
  2116			unlock_page(page);
  2117			cc->rpages[i] = NULL;
  2118			cc->nr_rpages--;
  2119		}
  2120	
  2121		/* we are done since all pages are beyond EOF */
  2122		if (f2fs_cluster_is_empty(cc))
  2123			goto out;
  2124	
  2125		set_new_dnode(&dn, inode, NULL, NULL, 0);
  2126		ret = f2fs_get_dnode_of_data(&dn, start_idx, LOOKUP_NODE);
  2127		if (ret)
  2128			goto out;
  2129	
  2130		/* cluster was overwritten as normal cluster */
  2131		if (dn.data_blkaddr != COMPRESS_ADDR)
  2132			goto out;
  2133	
  2134		for (i = 1; i < cc->cluster_size; i++) {
  2135			block_t blkaddr;
  2136	
  2137			blkaddr = data_blkaddr(dn.inode, dn.node_page,
  2138							dn.ofs_in_node + i);
  2139	
  2140			if (!__is_valid_data_blkaddr(blkaddr))
  2141				break;
  2142	
  2143			if (!f2fs_is_valid_blkaddr(sbi, blkaddr, DATA_GENERIC)) {
  2144				ret = -EFAULT;
  2145				goto out_put_dnode;
  2146			}
  2147			cc->nr_cpages++;
  2148		}
  2149	
  2150		/* nothing to decompress */
  2151		if (cc->nr_cpages == 0) {
  2152			ret = 0;
  2153			goto out_put_dnode;
  2154		}
  2155	
  2156		dic = f2fs_alloc_dic(cc);
  2157		if (IS_ERR(dic)) {
  2158			ret = PTR_ERR(dic);
  2159			goto out_put_dnode;
  2160		}
  2161	
  2162		for (i = 0; i < dic->nr_cpages; i++) {
  2163			struct page *page = dic->cpages[i];
  2164			block_t blkaddr;
  2165	
  2166			blkaddr = data_blkaddr(dn.inode, dn.node_page,
  2167							dn.ofs_in_node + i + 1);
  2168	
  2169			if (bio && !page_is_mergeable(sbi, bio,
  2170						*last_block_in_bio, blkaddr)) {
  2171	submit_and_realloc:
  2172				__submit_bio(sbi, bio, DATA);
  2173				bio = NULL;
  2174			}
  2175	
  2176			if (!bio) {
  2177				bio = f2fs_grab_read_bio(inode, blkaddr, nr_pages,
  2178						is_readahead ? REQ_RAHEAD : 0,
  2179						page->index, for_write);
  2180				if (IS_ERR(bio)) {
  2181					ret = PTR_ERR(bio);
  2182					bio = NULL;
  2183					dic->failed = true;
  2184					if (refcount_sub_and_test(dic->nr_cpages - i,
  2185								&dic->ref))
  2186						f2fs_decompress_end_io(dic->rpages,
  2187								cc->cluster_size, true,
  2188								false);
  2189					f2fs_free_dic(dic);
  2190					f2fs_put_dnode(&dn);
  2191					*bio_ret = bio;
  2192					return ret;
  2193				}
  2194			}
  2195	
  2196			f2fs_wait_on_block_writeback(inode, blkaddr);
  2197	
  2198			if (bio_add_page(bio, page, blocksize, 0) < blocksize)
  2199				goto submit_and_realloc;
  2200	
  2201			inc_page_count(sbi, F2FS_RD_DATA);
  2202			ClearPageError(page);
  2203			*last_block_in_bio = blkaddr;
  2204		}
  2205	
  2206		f2fs_put_dnode(&dn);
  2207	
  2208		*bio_ret = bio;
  2209		return 0;
  2210	
  2211	out_put_dnode:
  2212		f2fs_put_dnode(&dn);
  2213	out:
  2214		f2fs_decompress_end_io(cc->rpages, cc->cluster_size, true, false);
  2215		*bio_ret = bio;
  2216		return ret;
  2217	}
  2218	#endif
  2219	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27064 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-31 18:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 18:04 [chao-linux:compression 7/7] fs/f2fs/data.c:2100: undefined reference to `__divdi3' kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.