tree: git://git.cmpxchg.org/linux-mmotm.git master head: a4f20e3ed193cd4b2f742ce37f88112c7441146f commit: cbc718f7f0e7315ca1dd8049be0f879bdb363bb1 [37/234] ocfs2-fall-back-to-buffer-io-when-append-dio-is-disabled-with-file-hole-existing-fix config: blackfin-allyesconfig (attached as .config) compiler: bfin-uclinux-gcc (GCC) 7.2.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 cbc718f7f0e7315ca1dd8049be0f879bdb363bb1 # save the attached .config to linux build tree make.cross ARCH=blackfin All warnings (new ones prefixed by >>): fs//ocfs2/aops.c: In function 'ocfs2_range_has_holes': >> fs//ocfs2/aops.c:2437:11: warning: comparison of constant '0' with boolean expression is always false [-Wbool-compare] if (ret < 0) { ^ vim +/0 +2437 fs//ocfs2/aops.c c15471f79 Ryan Ding 2016-03-25 2419 0e5218c24 Changwei Ge 2017-12-23 2420 /* 0e5218c24 Changwei Ge 2017-12-23 2421 * Will look for holes and unwritten extents in the range starting at 0e5218c24 Changwei Ge 2017-12-23 2422 * pos for count bytes (inclusive). 0e5218c24 Changwei Ge 2017-12-23 2423 */ cbc718f7f Andrew Morton 2017-12-23 2424 static bool ocfs2_range_has_holes(struct inode *inode, loff_t pos, size_t count) 0e5218c24 Changwei Ge 2017-12-23 2425 { cbc718f7f Andrew Morton 2017-12-23 2426 bool ret = false; 0e5218c24 Changwei Ge 2017-12-23 2427 unsigned int extent_flags; 0e5218c24 Changwei Ge 2017-12-23 2428 u32 cpos, clusters, extent_len, phys_cpos; 0e5218c24 Changwei Ge 2017-12-23 2429 struct super_block *sb = inode->i_sb; 0e5218c24 Changwei Ge 2017-12-23 2430 0e5218c24 Changwei Ge 2017-12-23 2431 cpos = pos >> OCFS2_SB(sb)->s_clustersize_bits; 0e5218c24 Changwei Ge 2017-12-23 2432 clusters = ocfs2_clusters_for_bytes(sb, pos + count) - cpos; 0e5218c24 Changwei Ge 2017-12-23 2433 0e5218c24 Changwei Ge 2017-12-23 2434 while (clusters) { 0e5218c24 Changwei Ge 2017-12-23 2435 ret = ocfs2_get_clusters(inode, cpos, &phys_cpos, &extent_len, 0e5218c24 Changwei Ge 2017-12-23 2436 &extent_flags); 0e5218c24 Changwei Ge 2017-12-23 @2437 if (ret < 0) { 0e5218c24 Changwei Ge 2017-12-23 2438 mlog_errno(ret); 0e5218c24 Changwei Ge 2017-12-23 2439 goto out; 0e5218c24 Changwei Ge 2017-12-23 2440 } 0e5218c24 Changwei Ge 2017-12-23 2441 0e5218c24 Changwei Ge 2017-12-23 2442 if (phys_cpos == 0 || (extent_flags & OCFS2_EXT_UNWRITTEN)) { cbc718f7f Andrew Morton 2017-12-23 2443 ret = true; cbc718f7f Andrew Morton 2017-12-23 2444 goto out; 0e5218c24 Changwei Ge 2017-12-23 2445 } 0e5218c24 Changwei Ge 2017-12-23 2446 0e5218c24 Changwei Ge 2017-12-23 2447 if (extent_len > clusters) 0e5218c24 Changwei Ge 2017-12-23 2448 extent_len = clusters; 0e5218c24 Changwei Ge 2017-12-23 2449 0e5218c24 Changwei Ge 2017-12-23 2450 clusters -= extent_len; 0e5218c24 Changwei Ge 2017-12-23 2451 cpos += extent_len; 0e5218c24 Changwei Ge 2017-12-23 2452 } 0e5218c24 Changwei Ge 2017-12-23 2453 out: 0e5218c24 Changwei Ge 2017-12-23 2454 return ret; 0e5218c24 Changwei Ge 2017-12-23 2455 } 0e5218c24 Changwei Ge 2017-12-23 2456 :::::: The code at line 2437 was first introduced by commit :::::: 0e5218c24f42022a11fad0117cfd472c5feb361a ocfs2: fall back to buffer IO when append dio is disabled with file hole existing :::::: TO: Changwei Ge <ge.changwei@xxxxxxx> :::::: CC: Johannes Weiner <hannes@xxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip