CC: [email protected] CC: [email protected] TO: Christoph Hellwig <[email protected]> CC: Dan Williams <[email protected]> CC: "Darrick J. Wong" <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git libnvdimm-for-next head: de291b5902860d18d6e02000808aeb833ec1feb6 commit: b842f1d14a190e217a8ee3f6dae9e1dff1817d87 [30/32] fsdax: don't require CONFIG_BLOCK :::::: branch date: 4 days ago :::::: commit date: 8 days ago config: i386-randconfig-m031-20211211 (https://download.01.org/0day-ci/archive/20211212/[email protected]/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> New smatch warnings: fs/fuse/dax.c:190 fuse_setup_one_mapping() warn: should 'start_idx << 21' be a 64 bit type? fs/fuse/dax.c:871 dmap_writeback_invalidate() warn: should 'dmap->itn.start << 21' be a 64 bit type? fs/fuse/dax.c:965 inode_inline_reclaim_one_dmap() warn: should 'start_idx << 21' be a 64 bit type? fs/fuse/dax.c:1117 lookup_and_reclaim_dmap() warn: should 'start_idx << 21' be a 64 bit type? Old smatch warnings: fs/fuse/dax.c:284 dmap_removemapping_list() error: uninitialized symbol 'ret'. fs/fuse/dax.c:716 fuse_dax_read_iter() warn: inconsistent returns '&inode->i_rwsem'. fs/fuse/dax.c:774 fuse_dax_write_iter() warn: inconsistent returns '&inode->i_rwsem'. vim +190 fs/fuse/dax.c c2d0ad00d948de Vivek Goyal 2020-08-19 181 c2d0ad00d948de Vivek Goyal 2020-08-19 182 static int fuse_setup_one_mapping(struct inode *inode, unsigned long start_idx, c2d0ad00d948de Vivek Goyal 2020-08-19 183 struct fuse_dax_mapping *dmap, bool writable, c2d0ad00d948de Vivek Goyal 2020-08-19 184 bool upgrade) c2d0ad00d948de Vivek Goyal 2020-08-19 185 { fcee216beb9c15 Max Reitz 2020-05-06 186 struct fuse_mount *fm = get_fuse_mount(inode); fcee216beb9c15 Max Reitz 2020-05-06 187 struct fuse_conn_dax *fcd = fm->fc->dax; c2d0ad00d948de Vivek Goyal 2020-08-19 188 struct fuse_inode *fi = get_fuse_inode(inode); c2d0ad00d948de Vivek Goyal 2020-08-19 189 struct fuse_setupmapping_in inarg; c2d0ad00d948de Vivek Goyal 2020-08-19 @190 loff_t offset = start_idx << FUSE_DAX_SHIFT; c2d0ad00d948de Vivek Goyal 2020-08-19 191 FUSE_ARGS(args); c2d0ad00d948de Vivek Goyal 2020-08-19 192 ssize_t err; c2d0ad00d948de Vivek Goyal 2020-08-19 193 c2d0ad00d948de Vivek Goyal 2020-08-19 194 WARN_ON(fcd->nr_free_ranges < 0); c2d0ad00d948de Vivek Goyal 2020-08-19 195 c2d0ad00d948de Vivek Goyal 2020-08-19 196 /* Ask fuse daemon to setup mapping */ c2d0ad00d948de Vivek Goyal 2020-08-19 197 memset(&inarg, 0, sizeof(inarg)); c2d0ad00d948de Vivek Goyal 2020-08-19 198 inarg.foffset = offset; c2d0ad00d948de Vivek Goyal 2020-08-19 199 inarg.fh = -1; c2d0ad00d948de Vivek Goyal 2020-08-19 200 inarg.moffset = dmap->window_offset; c2d0ad00d948de Vivek Goyal 2020-08-19 201 inarg.len = FUSE_DAX_SZ; c2d0ad00d948de Vivek Goyal 2020-08-19 202 inarg.flags |= FUSE_SETUPMAPPING_FLAG_READ; c2d0ad00d948de Vivek Goyal 2020-08-19 203 if (writable) c2d0ad00d948de Vivek Goyal 2020-08-19 204 inarg.flags |= FUSE_SETUPMAPPING_FLAG_WRITE; c2d0ad00d948de Vivek Goyal 2020-08-19 205 args.opcode = FUSE_SETUPMAPPING; c2d0ad00d948de Vivek Goyal 2020-08-19 206 args.nodeid = fi->nodeid; c2d0ad00d948de Vivek Goyal 2020-08-19 207 args.in_numargs = 1; c2d0ad00d948de Vivek Goyal 2020-08-19 208 args.in_args[0].size = sizeof(inarg); c2d0ad00d948de Vivek Goyal 2020-08-19 209 args.in_args[0].value = &inarg; fcee216beb9c15 Max Reitz 2020-05-06 210 err = fuse_simple_request(fm, &args); c2d0ad00d948de Vivek Goyal 2020-08-19 211 if (err < 0) c2d0ad00d948de Vivek Goyal 2020-08-19 212 return err; c2d0ad00d948de Vivek Goyal 2020-08-19 213 dmap->writable = writable; c2d0ad00d948de Vivek Goyal 2020-08-19 214 if (!upgrade) { 9a752d18c85ae5 Vivek Goyal 2020-08-19 215 /* c4e0cd4e0c1654 Zheng Yongjun 2021-06-04 216 * We don't take a reference on inode. inode is valid right now 9a752d18c85ae5 Vivek Goyal 2020-08-19 217 * and when inode is going away, cleanup logic should first 9a752d18c85ae5 Vivek Goyal 2020-08-19 218 * cleanup dmap entries. 9a752d18c85ae5 Vivek Goyal 2020-08-19 219 */ 9a752d18c85ae5 Vivek Goyal 2020-08-19 220 dmap->inode = inode; c2d0ad00d948de Vivek Goyal 2020-08-19 221 dmap->itn.start = dmap->itn.last = start_idx; c2d0ad00d948de Vivek Goyal 2020-08-19 222 /* Protected by fi->dax->sem */ c2d0ad00d948de Vivek Goyal 2020-08-19 223 interval_tree_insert(&dmap->itn, &fi->dax->tree); c2d0ad00d948de Vivek Goyal 2020-08-19 224 fi->dax->nr++; d0cfb9dcbca6eb Vivek Goyal 2020-08-19 225 spin_lock(&fcd->lock); d0cfb9dcbca6eb Vivek Goyal 2020-08-19 226 list_add_tail(&dmap->busy_list, &fcd->busy_ranges); d0cfb9dcbca6eb Vivek Goyal 2020-08-19 227 fcd->nr_busy_ranges++; d0cfb9dcbca6eb Vivek Goyal 2020-08-19 228 spin_unlock(&fcd->lock); c2d0ad00d948de Vivek Goyal 2020-08-19 229 } c2d0ad00d948de Vivek Goyal 2020-08-19 230 return 0; c2d0ad00d948de Vivek Goyal 2020-08-19 231 } c2d0ad00d948de Vivek Goyal 2020-08-19 232 :::::: The code at line 190 was first introduced by commit :::::: c2d0ad00d948de73c78f05d2b3e5bdfa605035cc virtiofs: implement dax read/write operations :::::: TO: Vivek Goyal <[email protected]> :::::: CC: Miklos Szeredi <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
