Re: [PATCH v8 3/4] Adds blk_interposer to md.

From: kernel test robot
Date: Fri Apr 09 2021 - 13:04:18 EST


Hi Sergei,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on block/for-next]
[also build test WARNING on hch-configfs/for-next v5.12-rc6]
[cannot apply to dm/for-next next-20210409]
[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/Sergei-Shtepa/block-device-interposer/20210409-194943
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: x86_64-randconfig-s032-20210409 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-279-g6d5d9b42-dirty
# https://github.com/0day-ci/linux/commit/df79fb333cb0a1263a1f03f54de425507e3c2238
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sergei-Shtepa/block-device-interposer/20210409-194943
git checkout df79fb333cb0a1263a1f03f54de425507e3c2238
# 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@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
>> drivers/md/dm-table.c:337:63: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted fmode_t [usertype] mode @@ got bool [usertype] interpose @@
drivers/md/dm-table.c:337:63: sparse: expected restricted fmode_t [usertype] mode
drivers/md/dm-table.c:337:63: sparse: got bool [usertype] interpose
--
>> drivers/md/dm.c:2682:5: sparse: sparse: symbol '__dm_attach_interposer' was not declared. Should it be static?
>> drivers/md/dm.c:2724:5: sparse: sparse: symbol '__dm_detach_interposer' was not declared. Should it be static?

Please review and possibly fold the followup patch.

vim +337 drivers/md/dm-table.c

322
323 /*
324 * This upgrades the mode on an already open dm_dev, being
325 * careful to leave things as they were if we fail to reopen the
326 * device and not to touch the existing bdev field in case
327 * it is accessed concurrently.
328 */
329 static int upgrade_mode(struct dm_dev_internal *dd, fmode_t new_mode,
330 bool interpose, struct mapped_device *md)
331 {
332 int r;
333 struct dm_dev *old_dev, *new_dev;
334
335 old_dev = dd->dm_dev;
336
> 337 r = dm_get_table_device(md, dd->dm_dev->bdev->bd_dev, interpose,
338 dd->dm_dev->mode | new_mode, &new_dev);
339 if (r)
340 return r;
341
342 dd->dm_dev = new_dev;
343 dm_put_table_device(md, old_dev);
344
345 return 0;
346 }
347

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip