Hi Nikolay,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v5.7-rc1]
[also build test ERROR on next-20200416]
[cannot apply to btrfs/next]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see
https://stackoverflow.com/a/37406982]
url:
https://github.com/0day-ci/linux/commits/Nikolay-Borisov/btrfs-Make-btrfs...
base: 8f3d9f354286745c751374f5f1fcafee6b3f3136
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
fs/btrfs/volumes.c: In function 'btrfs_scan_one_device':
> fs/btrfs/volumes.c:1341:10: error: assignment to 'struct
btrfs_device *' from incompatible pointer type 'struct btrfs_super_block *'
[-Werror=incompatible-pointer-types]
1341 | device = disk_super;
| ^
cc1: some warnings being treated as errors
vim +1341 fs/btrfs/volumes.c
1309
1310 /*
1311 * Look for a btrfs signature on a device. This may be called out of the mount
path
1312 * and we are not allowed to call set_blocksize during the scan. The superblock
1313 * is read via pagecache
1314 */
1315 struct btrfs_device *btrfs_scan_one_device(const char *path, fmode_t flags,
1316 void *holder)
1317 {
1318 struct btrfs_super_block *disk_super;
1319 bool new_device_added = false;
1320 struct btrfs_device *device = NULL;
1321 struct block_device *bdev;
1322 u64 bytenr;
1323
1324 lockdep_assert_held(&uuid_mutex);
1325
1326 /*
1327 * we would like to check all the supers, but that would make
1328 * a btrfs mount succeed after a mkfs from a different FS.
1329 * So, we need to add a special mount option to scan for
1330 * later supers, using BTRFS_SUPER_MIRROR_MAX instead
1331 */
1332 bytenr = btrfs_sb_offset(0);
1333 flags |= FMODE_EXCL;
1334
1335 bdev = blkdev_get_by_path(path, flags, holder);
1336 if (IS_ERR(bdev))
1337 return ERR_CAST(bdev);
1338
1339 disk_super = btrfs_read_disk_super(bdev, bytenr);
1340 if (IS_ERR(disk_super)) {
1341 device = disk_super;
1342 goto error_bdev_put;
1343 }
1344
1345 device = device_list_add(path, disk_super, &new_device_added);
1346 if (!IS_ERR(device)) {
1347 if (new_device_added)
1348 btrfs_free_stale_devices(path, device);
1349 }
1350
1351 btrfs_release_disk_super(disk_super);
1352
1353 error_bdev_put:
1354 blkdev_put(bdev, flags);
1355
1356 return device;
1357 }
1358
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org