From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0846038673849963320==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v4 2/7] dax: introduce dax device flag DAXDEV_RECOVERY Date: Thu, 27 Jan 2022 08:19:09 +0800 Message-ID: <202201270829.kVFg9H4N-lkp@intel.com> In-Reply-To: <20220126211116.860012-3-jane.chu@oracle.com> List-Id: --===============0846038673849963320== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Jane, Thank you for the patch! Yet something to improve: [auto build test ERROR on nvdimm/libnvdimm-for-next] [also build test ERROR on linus/master v5.17-rc1 next-20220125] [cannot apply to device-mapper-dm/for-next tip/x86/core] [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] url: https://github.com/0day-ci/linux/commits/Jane-Chu/DAX-poison-recove= ry/20220127-051422 base: https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git l= ibnvdimm-for-next config: h8300-randconfig-r013-20220126 (https://download.01.org/0day-ci/arc= hive/20220127/202201270829.kVFg9H4N-lkp(a)intel.com/config) compiler: h8300-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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/0day-ci/linux/commit/bd070965ec17cd8d846ff4332= 1aef2c9f34bba5a git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jane-Chu/DAX-poison-recovery/20220= 127-051422 git checkout bd070965ec17cd8d846ff43321aef2c9f34bba5a # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dh8300 SHELL=3D/bin/bash drivers/dax/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/dax/super.c:276:6: warning: no previous prototype for 'run_dax' = [-Wmissing-prototypes] 276 | void run_dax(struct dax_device *dax_dev) | ^~~~~~~ >> drivers/dax/super.c:328:5: error: redefinition of 'dax_prep_recovery' 328 | int dax_prep_recovery(struct dax_device *dax_dev, void **kaddr) | ^~~~~~~~~~~~~~~~~ In file included from drivers/dax/super.c:14: include/linux/dax.h:169:19: note: previous definition of 'dax_prep_recov= ery' with type 'int(struct dax_device *, void **)' 169 | static inline int dax_prep_recovery(struct dax_device *dax_dev, = void **kaddr) | ^~~~~~~~~~~~~~~~~ vim +/dax_prep_recovery +328 drivers/dax/super.c 275 = > 276 void run_dax(struct dax_device *dax_dev) 277 { 278 set_bit(DAXDEV_ALIVE, &dax_dev->flags); 279 } 280 EXPORT_SYMBOL_GPL(run_dax); 281 = 282 static struct inode *dax_alloc_inode(struct super_block *sb) 283 { 284 struct dax_device *dax_dev; 285 struct inode *inode; 286 = 287 dax_dev =3D kmem_cache_alloc(dax_cache, GFP_KERNEL); 288 if (!dax_dev) 289 return NULL; 290 = 291 inode =3D &dax_dev->inode; 292 inode->i_rdev =3D 0; 293 return inode; 294 } 295 = 296 static struct dax_device *to_dax_dev(struct inode *inode) 297 { 298 return container_of(inode, struct dax_device, inode); 299 } 300 = 301 static void dax_free_inode(struct inode *inode) 302 { 303 struct dax_device *dax_dev =3D to_dax_dev(inode); 304 if (inode->i_rdev) 305 ida_simple_remove(&dax_minor_ida, iminor(inode)); 306 kmem_cache_free(dax_cache, dax_dev); 307 } 308 = 309 static void dax_destroy_inode(struct inode *inode) 310 { 311 struct dax_device *dax_dev =3D to_dax_dev(inode); 312 WARN_ONCE(test_bit(DAXDEV_ALIVE, &dax_dev->flags), 313 "kill_dax() must be called before final iput()\n"); 314 } 315 = 316 void set_dax_recovery(struct dax_device *dax_dev) 317 { 318 set_bit(DAXDEV_RECOVERY, &dax_dev->flags); 319 } 320 EXPORT_SYMBOL_GPL(set_dax_recovery); 321 = 322 bool dax_recovery_capable(struct dax_device *dax_dev) 323 { 324 return test_bit(DAXDEV_RECOVERY, &dax_dev->flags); 325 } 326 EXPORT_SYMBOL_GPL(dax_recovery_capable); 327 = > 328 int dax_prep_recovery(struct dax_device *dax_dev, void **kaddr) 329 { 330 if (dax_recovery_capable(dax_dev)) { 331 set_bit(DAXDEV_RECOVERY, (unsigned long *)kaddr); 332 return 0; 333 } 334 return -EINVAL; 335 } 336 EXPORT_SYMBOL_GPL(dax_prep_recovery); 337 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============0846038673849963320==--