From: kernel test robot <lkp@intel.com>
To: Goffredo Baroncelli <kreijack@libero.it>, linux-btrfs@vger.kernel.org
Cc: kbuild-all@lists.01.org, Goffredo Baroncelli <kreijack@inwind.it>
Subject: Re: [PATCH] btrfs: allow more subvol= option
Date: Wed, 22 Jul 2020 09:12:29 +0800 [thread overview]
Message-ID: <202007220952.3BhwDq9X%lkp@intel.com> (raw)
In-Reply-To: <20200721203340.275921-2-kreijack@libero.it>
[-- Attachment #1: Type: text/plain, Size: 8032 bytes --]
Hi Goffredo,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kdave/for-next]
[also build test WARNING on v5.8-rc6 next-20200721]
[cannot apply to btrfs/next]
[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/Goffredo-Baroncelli/btrfs-allow-more-subvol-option/20200722-043357
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: x86_64-randconfig-s022-20200719 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-49-g707c5017-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected unsigned long flags @@ got restricted gfp_t [usertype] mask @@
include/trace/events/btrfs.h:1335:1: sparse: expected unsigned long flags
include/trace/events/btrfs.h:1335:1: sparse: got restricted gfp_t [usertype] mask
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast to restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: cast to restricted gfp_t
include/trace/events/btrfs.h:1335:1: sparse: sparse: restricted gfp_t degrades to integer
include/trace/events/btrfs.h:1335:1: sparse: sparse: restricted gfp_t degrades to integer
>> fs/btrfs/super.c:1714:51: sparse: sparse: Using plain integer as NULL pointer
fs/btrfs/super.c:2394:31: sparse: sparse: incompatible types in comparison expression (different address spaces):
fs/btrfs/super.c:2394:31: sparse: struct rcu_string [noderef] __rcu *
fs/btrfs/super.c:2394:31: sparse: struct rcu_string *
vim +1714 fs/btrfs/super.c
1685
1686 /*
1687 * Mount function which is called by VFS layer.
1688 *
1689 * In order to allow mounting a subvolume directly, btrfs uses mount_subtree()
1690 * which needs vfsmount* of device's root (/). This means device's root has to
1691 * be mounted internally in any case.
1692 *
1693 * Operation flow:
1694 * 1. Parse subvol id related options for later use in mount_subvol().
1695 *
1696 * 2. Mount device's root (/) by calling vfs_kern_mount().
1697 *
1698 * NOTE: vfs_kern_mount() is used by VFS to call btrfs_mount() in the
1699 * first place. In order to avoid calling btrfs_mount() again, we use
1700 * different file_system_type which is not registered to VFS by
1701 * register_filesystem() (btrfs_root_fs_type). As a result,
1702 * btrfs_mount_root() is called. The return value will be used by
1703 * mount_subtree() in mount_subvol().
1704 *
1705 * 3. Call mount_subvol() to get the dentry of subvolume. Since there is
1706 * "btrfs subvolume set-default", mount_subvol() is called always.
1707 */
1708 static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
1709 const char *device_name, void *data)
1710 {
1711 struct vfsmount *mnt_root;
1712 struct dentry *root;
1713 int i;
> 1714 char *subvol_names[SUBVOL_NAMES_COUNT] = {0,};
1715 u64 subvol_objectid = 0;
1716 int error = 0;
1717
1718 error = btrfs_parse_subvol_options(data, subvol_names,
1719 &subvol_objectid);
1720 if (error) {
1721 root = ERR_PTR(error);
1722 goto out;
1723 }
1724
1725 /* mount device's root (/) */
1726 mnt_root = vfs_kern_mount(&btrfs_root_fs_type, flags, device_name, data);
1727 if (PTR_ERR_OR_ZERO(mnt_root) == -EBUSY) {
1728 if (flags & SB_RDONLY) {
1729 mnt_root = vfs_kern_mount(&btrfs_root_fs_type,
1730 flags & ~SB_RDONLY, device_name, data);
1731 } else {
1732 mnt_root = vfs_kern_mount(&btrfs_root_fs_type,
1733 flags | SB_RDONLY, device_name, data);
1734 if (IS_ERR(mnt_root)) {
1735 root = ERR_CAST(mnt_root);
1736 goto out;
1737 }
1738
1739 down_write(&mnt_root->mnt_sb->s_umount);
1740 error = btrfs_remount(mnt_root->mnt_sb, &flags, NULL);
1741 up_write(&mnt_root->mnt_sb->s_umount);
1742 if (error < 0) {
1743 root = ERR_PTR(error);
1744 mntput(mnt_root);
1745 goto out;
1746 }
1747 }
1748 }
1749 if (IS_ERR(mnt_root)) {
1750 root = ERR_CAST(mnt_root);
1751 goto out;
1752 }
1753
1754 /* mount_subvol() will free mnt_root */
1755 root = mount_subvol(subvol_names, subvol_objectid, mnt_root);
1756
1757 out:
1758 for (i = 0 ; i < SUBVOL_NAMES_COUNT ; i++)
1759 kfree(subvol_names[i]);
1760 return root;
1761 }
1762
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33348 bytes --]
next prev parent reply other threads:[~2020-07-22 1:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 20:33 [RFC] btrfs: strategy to perform a rollback at boot time Goffredo Baroncelli
2020-07-21 20:33 ` [PATCH] btrfs: allow more subvol= option Goffredo Baroncelli
2020-07-21 20:50 ` Steven Davies
2020-07-22 1:12 ` kernel test robot [this message]
2020-07-21 20:55 ` [RFC] btrfs: strategy to perform a rollback at boot time Steven Davies
2020-07-23 19:52 ` Goffredo Baroncelli
2020-07-21 21:09 ` Chris Murphy
2020-07-22 0:21 ` Nicholas D Steeves
2020-07-23 20:02 ` Goffredo Baroncelli
2020-07-23 21:53 ` Zygo Blaxell
2020-07-24 11:56 ` Goffredo Baroncelli
2020-07-24 22:08 ` Chris Murphy
2020-07-25 2:37 ` Zygo Blaxell
2020-07-27 12:26 ` David Sterba
2020-07-27 17:25 ` Goffredo Baroncelli
2020-07-27 17:34 ` Goffredo Baroncelli
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=202007220952.3BhwDq9X%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=kreijack@inwind.it \
--cc=kreijack@libero.it \
--cc=linux-btrfs@vger.kernel.org \
/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