public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: kbuild-all@01.org, darrick.wong@oracle.com,
	linux-nvdimm@lists.01.org, david@fromorbit.com,
	linux-xfs@vger.kernel.org, ross.zwisler@linux.intel.com,
	linux-ext4@vger.kernel.org, dan.j.williams@intel.com
Subject: Re: [PATCH v4 2/3] dax: change bdev_dax_supported() to support boolean returns
Date: Sun, 18 Feb 2018 16:22:48 +0800	[thread overview]
Message-ID: <201802181615.wTEEGhEQ%fengguang.wu@intel.com> (raw)
In-Reply-To: <151871655831.27617.969797567050409931.stgit@djiang5-desk3.ch.intel.com>

[-- Attachment #1: Type: text/plain, Size: 6886 bytes --]

Hi Dave,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc1 next-20180216]
[cannot apply to dgc-xfs/for-next]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Dave-Jiang/minimal-DAX-support-for-XFS-realtime-device/20180218-154220
config: i386-randconfig-x003-201807 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   fs//xfs/xfs_super.c: In function 'xfs_fs_fill_super':
>> fs//xfs/xfs_super.c:1660:8: warning: 'rtdev_is_dax' may be used uninitialized in this function [-Wmaybe-uninitialized]
      bool rtdev_is_dax, datadev_is_dax;
           ^~~~~~~~~~~~

vim +/rtdev_is_dax +1660 fs//xfs/xfs_super.c

  1566	
  1567	STATIC int
  1568	xfs_fs_fill_super(
  1569		struct super_block	*sb,
  1570		void			*data,
  1571		int			silent)
  1572	{
  1573		struct inode		*root;
  1574		struct xfs_mount	*mp = NULL;
  1575		int			flags = 0, error = -ENOMEM;
  1576	
  1577		mp = kzalloc(sizeof(struct xfs_mount), GFP_KERNEL);
  1578		if (!mp)
  1579			goto out;
  1580	
  1581		spin_lock_init(&mp->m_sb_lock);
  1582		mutex_init(&mp->m_growlock);
  1583		atomic_set(&mp->m_active_trans, 0);
  1584		INIT_DELAYED_WORK(&mp->m_reclaim_work, xfs_reclaim_worker);
  1585		INIT_DELAYED_WORK(&mp->m_eofblocks_work, xfs_eofblocks_worker);
  1586		INIT_DELAYED_WORK(&mp->m_cowblocks_work, xfs_cowblocks_worker);
  1587		mp->m_kobj.kobject.kset = xfs_kset;
  1588	
  1589		mp->m_super = sb;
  1590		sb->s_fs_info = mp;
  1591	
  1592		error = xfs_parseargs(mp, (char *)data);
  1593		if (error)
  1594			goto out_free_fsname;
  1595	
  1596		sb_min_blocksize(sb, BBSIZE);
  1597		sb->s_xattr = xfs_xattr_handlers;
  1598		sb->s_export_op = &xfs_export_operations;
  1599	#ifdef CONFIG_XFS_QUOTA
  1600		sb->s_qcop = &xfs_quotactl_operations;
  1601		sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP | QTYPE_MASK_PRJ;
  1602	#endif
  1603		sb->s_op = &xfs_super_operations;
  1604	
  1605		if (silent)
  1606			flags |= XFS_MFSI_QUIET;
  1607	
  1608		error = xfs_open_devices(mp);
  1609		if (error)
  1610			goto out_free_fsname;
  1611	
  1612		error = xfs_init_mount_workqueues(mp);
  1613		if (error)
  1614			goto out_close_devices;
  1615	
  1616		error = xfs_init_percpu_counters(mp);
  1617		if (error)
  1618			goto out_destroy_workqueues;
  1619	
  1620		/* Allocate stats memory before we do operations that might use it */
  1621		mp->m_stats.xs_stats = alloc_percpu(struct xfsstats);
  1622		if (!mp->m_stats.xs_stats) {
  1623			error = -ENOMEM;
  1624			goto out_destroy_counters;
  1625		}
  1626	
  1627		error = xfs_readsb(mp, flags);
  1628		if (error)
  1629			goto out_free_stats;
  1630	
  1631		error = xfs_finish_flags(mp);
  1632		if (error)
  1633			goto out_free_sb;
  1634	
  1635		error = xfs_setup_devices(mp);
  1636		if (error)
  1637			goto out_free_sb;
  1638	
  1639		error = xfs_filestream_mount(mp);
  1640		if (error)
  1641			goto out_free_sb;
  1642	
  1643		/*
  1644		 * we must configure the block size in the superblock before we run the
  1645		 * full mount process as the mount process can lookup and cache inodes.
  1646		 */
  1647		sb->s_magic = XFS_SB_MAGIC;
  1648		sb->s_blocksize = mp->m_sb.sb_blocksize;
  1649		sb->s_blocksize_bits = ffs(sb->s_blocksize) - 1;
  1650		sb->s_maxbytes = xfs_max_file_offset(sb->s_blocksize_bits);
  1651		sb->s_max_links = XFS_MAXLINK;
  1652		sb->s_time_gran = 1;
  1653		set_posix_acl_flag(sb);
  1654	
  1655		/* version 5 superblocks support inode version counters. */
  1656		if (XFS_SB_VERSION_NUM(&mp->m_sb) == XFS_SB_VERSION_5)
  1657			sb->s_flags |= SB_I_VERSION;
  1658	
  1659		if (mp->m_flags & XFS_MOUNT_DAX) {
> 1660			bool rtdev_is_dax, datadev_is_dax;
  1661	
  1662			xfs_warn(mp,
  1663			"DAX enabled. Warning: EXPERIMENTAL, use at your own risk");
  1664	
  1665			datadev_is_dax = bdev_dax_supported(sb,
  1666					mp->m_ddev_targp->bt_bdev, sb->s_blocksize);
  1667			if (mp->m_rtdev_targp)
  1668				rtdev_is_dax = bdev_dax_supported(sb,
  1669						mp->m_rtdev_targp->bt_bdev,
  1670						sb->s_blocksize);
  1671			if (!rtdev_is_dax && !datadev_is_dax) {
  1672				xfs_alert(mp,
  1673				"DAX unsupported by block device. Turning off DAX.");
  1674				mp->m_flags &= ~XFS_MOUNT_DAX;
  1675			}
  1676			if (xfs_sb_version_hasreflink(&mp->m_sb)) {
  1677				xfs_alert(mp,
  1678			"DAX and reflink cannot be used together!");
  1679				error = -EINVAL;
  1680				goto out_filestream_unmount;
  1681			}
  1682		}
  1683	
  1684		if (mp->m_flags & XFS_MOUNT_DISCARD) {
  1685			struct request_queue *q = bdev_get_queue(sb->s_bdev);
  1686	
  1687			if (!blk_queue_discard(q)) {
  1688				xfs_warn(mp, "mounting with \"discard\" option, but "
  1689						"the device does not support discard");
  1690				mp->m_flags &= ~XFS_MOUNT_DISCARD;
  1691			}
  1692		}
  1693	
  1694		if (xfs_sb_version_hasreflink(&mp->m_sb) && mp->m_sb.sb_rblocks) {
  1695			xfs_alert(mp,
  1696		"reflink not compatible with realtime device!");
  1697			error = -EINVAL;
  1698			goto out_filestream_unmount;
  1699		}
  1700	
  1701		if (xfs_sb_version_hasrmapbt(&mp->m_sb) && mp->m_sb.sb_rblocks) {
  1702			xfs_alert(mp,
  1703		"reverse mapping btree not compatible with realtime device!");
  1704			error = -EINVAL;
  1705			goto out_filestream_unmount;
  1706		}
  1707	
  1708		error = xfs_mountfs(mp);
  1709		if (error)
  1710			goto out_filestream_unmount;
  1711	
  1712		root = igrab(VFS_I(mp->m_rootip));
  1713		if (!root) {
  1714			error = -ENOENT;
  1715			goto out_unmount;
  1716		}
  1717		sb->s_root = d_make_root(root);
  1718		if (!sb->s_root) {
  1719			error = -ENOMEM;
  1720			goto out_unmount;
  1721		}
  1722	
  1723		return 0;
  1724	
  1725	 out_filestream_unmount:
  1726		xfs_filestream_unmount(mp);
  1727	 out_free_sb:
  1728		xfs_freesb(mp);
  1729	 out_free_stats:
  1730		free_percpu(mp->m_stats.xs_stats);
  1731	 out_destroy_counters:
  1732		xfs_destroy_percpu_counters(mp);
  1733	 out_destroy_workqueues:
  1734		xfs_destroy_mount_workqueues(mp);
  1735	 out_close_devices:
  1736		xfs_close_devices(mp);
  1737	 out_free_fsname:
  1738		xfs_free_fsname(mp);
  1739		kfree(mp);
  1740	 out:
  1741		return error;
  1742	
  1743	 out_unmount:
  1744		xfs_filestream_unmount(mp);
  1745		xfs_unmountfs(mp);
  1746		goto out_free_sb;
  1747	}
  1748	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28527 bytes --]

  reply	other threads:[~2018-02-18  8:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15 17:42 [PATCH v4 0/3] minimal DAX support for XFS realtime device Dave Jiang
     [not found] ` <151871644696.27617.4390718895806529377.stgit-Cxk7aZI4ujnJARH06PadV2t3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2018-02-15 17:42   ` [PATCH v4 1/3] fs: allow per-device dax status checking for filesystems Dave Jiang
     [not found]     ` <151871655228.27617.3514495396592472682.stgit-Cxk7aZI4ujnJARH06PadV2t3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2018-02-15 17:52       ` Christoph Hellwig
     [not found]         ` <20180215175241.GA25223-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2018-02-15 17:58           ` Dave Jiang
2018-02-15 18:05             ` Christoph Hellwig
     [not found]             ` <f5f93cd1-4d9e-c794-99fb-28daa0d1669d-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-02-15 19:06               ` Darrick J. Wong
2018-03-01  1:22       ` kbuild test robot
2018-02-15 17:42   ` [PATCH v4 2/3] dax: change bdev_dax_supported() to support boolean returns Dave Jiang
2018-02-18  8:22     ` kbuild test robot [this message]
2018-02-15 17:42   ` [PATCH v4 3/3] xfs: reject removal of realtime flag when datadev doesn't support DAX Dave Jiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201802181615.wTEEGhEQ%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=darrick.wong@oracle.com \
    --cc=dave.jiang@intel.com \
    --cc=david@fromorbit.com \
    --cc=kbuild-all@01.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=ross.zwisler@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox