public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH V5 15/19] famfs_fuse: Plumb dax iomap and fuse read/write/mmap
       [not found] <0100019bc834ead9-7ed67793-5e18-45f6-80cc-146cfd7d4c8a-000000@email.amazonses.com>
@ 2026-01-17  1:40 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-01-17  1:40 UTC (permalink / raw)
  To: John Groves, John Groves, Miklos Szeredi, Dan Williams,
	Bernd Schubert, Alison Schofield
  Cc: llvm, oe-kbuild-all, Jonathan Corbet, Vishal Verma, Dave Jiang,
	Matthew Wilcox, Jan Kara, Alexander Viro, David Hildenbrand,
	Christian Brauner, Darrick J . Wong, Randy Dunlap, Jeff Layton,
	Amir Goldstein, Jonathan Cameron, Stefan Hajnoczi, Joanne Koong,
	Josef Bacik, Bagas Sanjaya, James Morse, Fuad Tabba,
	Sean Christopherson, Shivank Garg, Ackerley Tng, Gregory Price,
	Aravind Ramesh, Ajay Joshi

Hi John,

kernel test robot noticed the following build warnings:

[auto build test WARNING on mszeredi-fuse/for-next]
[also build test WARNING on brauner-vfs/vfs.all v6.19-rc5]
[cannot apply to linus/master next-20260116]
[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/John-Groves/dax-Factor-out-dax_folio_reset_order-helper/20260117-031401
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git for-next
patch link:    https://lore.kernel.org/r/0100019bc834ead9-7ed67793-5e18-45f6-80cc-146cfd7d4c8a-000000%40email.amazonses.com
patch subject: [PATCH V5 15/19] famfs_fuse: Plumb dax iomap and fuse read/write/mmap
config: s390-defconfig (https://download.01.org/0day-ci/archive/20260117/202601170925.1qbFpAwE-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260117/202601170925.1qbFpAwE-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601170925.1qbFpAwE-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/fuse/famfs.c:610:22: warning: variable 'ext_size' is uninitialized when used within its own initialization [-Wuninitialized]
     610 |                 u64 ext_size = min(ext_size, meta->file_size);
         |                     ~~~~~~~~       ^~~~~~~~
   include/linux/minmax.h:105:38: note: expanded from macro 'min'
     105 | #define min(x, y)       __careful_cmp(min, x, y)
         |                                            ^
   include/linux/minmax.h:98:25: note: expanded from macro '__careful_cmp'
      98 |         __careful_cmp_once(op, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_))
         |                                ^
   include/linux/minmax.h:92:13: note: expanded from macro '__careful_cmp_once'
      92 |         auto ux = (x); auto uy = (y);                   \
         |                    ^
   1 warning generated.


vim +/ext_size +610 fs/fuse/famfs.c

   585	
   586	static int
   587	famfs_interleave_fileofs_to_daxofs(struct inode *inode, struct iomap *iomap,
   588				 loff_t file_offset, off_t len, unsigned int flags)
   589	{
   590		struct fuse_inode *fi = get_fuse_inode(inode);
   591		struct famfs_file_meta *meta = fi->famfs_meta;
   592		struct fuse_conn *fc = get_fuse_conn(inode);
   593		loff_t local_offset = file_offset;
   594	
   595		/* This function is only for extent_type INTERLEAVED_EXTENT */
   596		if (meta->fm_extent_type != INTERLEAVED_EXTENT) {
   597			pr_err("%s: bad extent type\n", __func__);
   598			goto err_out;
   599		}
   600	
   601		if (famfs_file_bad(inode))
   602			goto err_out;
   603	
   604		iomap->offset = file_offset;
   605	
   606		for (int i = 0; i < meta->fm_niext; i++) {
   607			struct famfs_meta_interleaved_ext *fei = &meta->ie[i];
   608			u64 chunk_size = fei->fie_chunk_size;
   609			u64 nstrips = fei->fie_nstrips;
 > 610			u64 ext_size = min(ext_size, meta->file_size);
   611	
   612			if (ext_size == 0) {
   613				pr_err("%s: ext_size=%lld file_size=%ld\n",
   614				       __func__, fei->fie_nbytes, meta->file_size);
   615				goto err_out;
   616			}
   617	
   618			/* Is the data is in this striped extent? */
   619			if (local_offset < ext_size) {
   620				u64 chunk_num       = local_offset / chunk_size;
   621				u64 chunk_offset    = local_offset % chunk_size;
   622				u64 chunk_remainder = chunk_size - chunk_offset;
   623				u64 stripe_num      = chunk_num / nstrips;
   624				u64 strip_num       = chunk_num % nstrips;
   625				u64 strip_offset    = chunk_offset + (stripe_num * chunk_size);
   626				u64 strip_dax_ofs = fei->ie_strips[strip_num].ext_offset;
   627				u64 strip_devidx = fei->ie_strips[strip_num].dev_index;
   628	
   629				if (strip_devidx >= fc->dax_devlist->nslots) {
   630					pr_err("%s: strip_devidx %llu >= nslots %d\n",
   631					       __func__, strip_devidx,
   632					       fc->dax_devlist->nslots);
   633					goto err_out;
   634				}
   635	
   636				if (!fc->dax_devlist->devlist[strip_devidx].valid) {
   637					pr_err("%s: daxdev=%lld invalid\n", __func__,
   638						strip_devidx);
   639					goto err_out;
   640				}
   641	
   642				iomap->addr    = strip_dax_ofs + strip_offset;
   643				iomap->offset  = file_offset;
   644				iomap->length  = min_t(loff_t, len, chunk_remainder);
   645	
   646				iomap->dax_dev = fc->dax_devlist->devlist[strip_devidx].devp;
   647	
   648				iomap->type    = IOMAP_MAPPED;
   649				iomap->flags   = flags;
   650	
   651				return 0;
   652			}
   653			local_offset -= ext_size; /* offset is beyond this striped extent */
   654		}
   655	
   656	 err_out:
   657		pr_err("%s: err_out\n", __func__);
   658	
   659		/* We fell out the end of the extent list.
   660		 * Set iomap to zero length in this case, and return 0
   661		 * This just means that the r/w is past EOF
   662		 */
   663		iomap->addr    = 0; /* there is no valid dax device offset */
   664		iomap->offset  = file_offset; /* file offset */
   665		iomap->length  = 0; /* this had better result in no access to dax mem */
   666		iomap->dax_dev = NULL;
   667		iomap->type    = IOMAP_MAPPED;
   668		iomap->flags   = flags;
   669	
   670		return -EIO;
   671	}
   672	

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

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

only message in thread, other threads:[~2026-01-17  1:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <0100019bc834ead9-7ed67793-5e18-45f6-80cc-146cfd7d4c8a-000000@email.amazonses.com>
2026-01-17  1:40 ` [PATCH V5 15/19] famfs_fuse: Plumb dax iomap and fuse read/write/mmap kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox