lkml.org 
[lkml]   [2021]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v4 08/10] md: Implement dax_holder_operations
    Hi Shiyang,

    Thank you for the patch! Yet something to improve:

    [auto build test ERROR on xfs-linux/for-next]
    [also build test ERROR on dm/for-next linus/master v5.13-rc4]
    [cannot apply to hnaz-linux-mm/master next-20210603]
    [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/Shiyang-Ruan/fsdax-introduce-fs-query-to-support-reflink/20210604-092105
    base: https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git for-next
    config: h8300-randconfig-r021-20210604 (attached as .config)
    compiler: h8300-linux-gcc (GCC) 9.3.0
    reproduce (this is a W=1 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/94db8a17905296e4d5bfe93eb5199f477646622a
    git remote add linux-review https://github.com/0day-ci/linux
    git fetch --no-tags linux-review Shiyang-Ruan/fsdax-introduce-fs-query-to-support-reflink/20210604-092105
    git checkout 94db8a17905296e4d5bfe93eb5199f477646622a
    # save the attached .config to linux build tree
    COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300

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

    All error/warnings (new ones prefixed by >>):

    drivers/md/dm.c: In function 'open_table_device':
    >> drivers/md/dm.c:784:12: error: implicit declaration of function 'dax_get_holder'; did you mean 'xa_get_order'? [-Werror=implicit-function-declaration]
    784 | holders = dax_get_holder(td->dm_dev.dax_dev);
    | ^~~~~~~~~~~~~~
    | xa_get_order
    >> drivers/md/dm.c:784:10: warning: assignment to 'struct list_head *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    784 | holders = dax_get_holder(td->dm_dev.dax_dev);
    | ^
    >> drivers/md/dm.c:788:3: error: implicit declaration of function 'dax_set_holder'; did you mean 'xas_set_order'? [-Werror=implicit-function-declaration]
    788 | dax_set_holder(td->dm_dev.dax_dev, holders, &dm_dax_holder_ops);
    | ^~~~~~~~~~~~~~
    | xas_set_order
    drivers/md/dm.c: In function 'close_table_device':
    drivers/md/dm.c:808:10: warning: assignment to 'struct list_head *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    808 | holders = dax_get_holder(td->dm_dev.dax_dev);
    | ^
    drivers/md/dm.c: In function 'dm_dax_corrputed_range':
    >> drivers/md/dm.c:1339:30: warning: initialization of 'struct list_head *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1339 | struct list_head *holders = dax_get_holder(dax_dev);
    | ^~~~~~~~~~~~~~
    cc1: some warnings being treated as errors


    vim +784 drivers/md/dm.c

    750
    751 static char *_dm_claim_ptr = "I belong to device-mapper";
    752 static const struct dax_holder_operations dm_dax_holder_ops;
    753 struct dm_holder {
    754 struct list_head list;
    755 struct mapped_device *md;
    756 };
    757 /*
    758 * Open a table device so we can use it as a map destination.
    759 */
    760 static int open_table_device(struct table_device *td, dev_t dev,
    761 struct mapped_device *md)
    762 {
    763 struct block_device *bdev;
    764 struct list_head *holders;
    765 struct dm_holder *holder;
    766
    767 int r;
    768
    769 BUG_ON(td->dm_dev.bdev);
    770
    771 bdev = blkdev_get_by_dev(dev, td->dm_dev.mode | FMODE_EXCL, _dm_claim_ptr);
    772 if (IS_ERR(bdev))
    773 return PTR_ERR(bdev);
    774
    775 r = bd_link_disk_holder(bdev, dm_disk(md));
    776 if (r) {
    777 blkdev_put(bdev, td->dm_dev.mode | FMODE_EXCL);
    778 return r;
    779 }
    780
    781 td->dm_dev.bdev = bdev;
    782 td->dm_dev.dax_dev = dax_get_by_host(bdev->bd_disk->disk_name);
    783
    > 784 holders = dax_get_holder(td->dm_dev.dax_dev);
    785 if (!holders) {
    786 holders = kmalloc(sizeof(*holders), GFP_KERNEL);
    787 INIT_LIST_HEAD(holders);
    > 788 dax_set_holder(td->dm_dev.dax_dev, holders, &dm_dax_holder_ops);
    789 }
    790 holder = kmalloc(sizeof(*holder), GFP_KERNEL);
    791 holder->md = md;
    792 list_add_tail(&holder->list, holders);
    793
    794 return 0;
    795 }
    796

    ---
    0-DAY CI Kernel Test Service, Intel Corporation
    https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
    [unhandled content-type:application/gzip]
    \
     
     \ /
      Last update: 2021-06-04 07:49    [W:4.551 / U:0.440 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site