Hi Carlos,
FYI, the error/warning still remains.
tree:
https://android.googlesource.com/kernel/common upstream-f2fs-stable-linux-4.14.y
head: a1f8c5458f03b609b124191a55118e9c11109442
commit: ea4899e2410d1394cc4857298ecf8cc511d5afd4 [1255/1431] fs: Enable bmap() function to
properly return errors
config: i386-randconfig-a003-20220117
(
https://download.01.org/0day-ci/archive/20220120/202201201153.CiFuSOUM-lk...)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
git remote add android-common
https://android.googlesource.com/kernel/common
git fetch --no-tags android-common upstream-f2fs-stable-linux-4.14.y
git checkout ea4899e2410d1394cc4857298ecf8cc511d5afd4
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/md/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/md/bitmap.c: In function 'read_page':
> drivers/md/bitmap.c:382:32: warning: passing argument 2 of
'bmap' makes pointer from integer without a cast [-Wint-conversion]
bh->b_blocknr = bmap(inode, block);
^~~~~
In file included from include/linux/genhd.h:68:0,
from include/linux/blkdev.h:11,
from drivers/md/bitmap.c:18:
include/linux/fs.h:2729:12: note: expected 'sector_t * {aka long long unsigned int
*}' but argument is of type 'sector_t {aka long long unsigned int}'
extern int bmap(struct inode *inode, sector_t *block);
^~~~
arch/x86/include/asm/bitops.h: Assembler messages:
arch/x86/include/asm/bitops.h:225: Warning: no instruction mnemonic suffix given and no
register operands; using default for `bts'
arch/x86/include/asm/bitops.h:271: Warning: no instruction mnemonic suffix given and no
register operands; using default for `btr'
vim +/bmap +382 drivers/md/bitmap.c
32a7627cf3a353 NeilBrown 2005-06-21 350
d785a06a0b9d0c NeilBrown 2006-06-26 351 /* read a page from a file.
d785a06a0b9d0c NeilBrown 2006-06-26 352 * We both read the page, and attach buffers
to the page to record the
d785a06a0b9d0c NeilBrown 2006-06-26 353 * address of each block (using bmap).
These addresses will be used
d785a06a0b9d0c NeilBrown 2006-06-26 354 * to write the block later, completely
bypassing the filesystem.
d785a06a0b9d0c NeilBrown 2006-06-26 355 * This usage is similar to how swap files
are handled, and allows us
d785a06a0b9d0c NeilBrown 2006-06-26 356 * to write to a file with no concerns of
memory allocation failing.
d785a06a0b9d0c NeilBrown 2006-06-26 357 */
27581e5ae01f77 NeilBrown 2012-05-22 358 static int read_page(struct file *file,
unsigned long index,
d785a06a0b9d0c NeilBrown 2006-06-26 359 struct bitmap *bitmap,
27581e5ae01f77 NeilBrown 2012-05-22 360 unsigned long count,
27581e5ae01f77 NeilBrown 2012-05-22 361 struct page *page)
32a7627cf3a353 NeilBrown 2005-06-21 362 {
27581e5ae01f77 NeilBrown 2012-05-22 363 int ret = 0;
496ad9aa8ef448 Al Viro 2013-01-23 364 struct inode *inode = file_inode(file);
d785a06a0b9d0c NeilBrown 2006-06-26 365 struct buffer_head *bh;
d785a06a0b9d0c NeilBrown 2006-06-26 366 sector_t block;
32a7627cf3a353 NeilBrown 2005-06-21 367
36a4e1fe0f4541 NeilBrown 2011-10-07 368 pr_debug("read bitmap file (%dB @
%llu)\n", (int)PAGE_SIZE,
2d1f3b5d1b2cd1 NeilBrown 2006-01-06 369 (unsigned long long)index <<
PAGE_SHIFT);
32a7627cf3a353 NeilBrown 2005-06-21 370
d785a06a0b9d0c NeilBrown 2006-06-26 371 bh = alloc_page_buffers(page,
1<<inode->i_blkbits, 0);
d785a06a0b9d0c NeilBrown 2006-06-26 372 if (!bh) {
27581e5ae01f77 NeilBrown 2012-05-22 373 ret = -ENOMEM;
d785a06a0b9d0c NeilBrown 2006-06-26 374 goto out;
d785a06a0b9d0c NeilBrown 2006-06-26 375 }
d785a06a0b9d0c NeilBrown 2006-06-26 376 attach_page_buffers(page, bh);
d785a06a0b9d0c NeilBrown 2006-06-26 377 block = index << (PAGE_SHIFT -
inode->i_blkbits);
d785a06a0b9d0c NeilBrown 2006-06-26 378 while (bh) {
d785a06a0b9d0c NeilBrown 2006-06-26 379 if (count == 0)
d785a06a0b9d0c NeilBrown 2006-06-26 380 bh->b_blocknr = 0;
d785a06a0b9d0c NeilBrown 2006-06-26 381 else {
d785a06a0b9d0c NeilBrown 2006-06-26 @382 bh->b_blocknr = bmap(inode, block);
d785a06a0b9d0c NeilBrown 2006-06-26 383 if (bh->b_blocknr == 0) {
d785a06a0b9d0c NeilBrown 2006-06-26 384 /* Cannot use this file! */
27581e5ae01f77 NeilBrown 2012-05-22 385 ret = -EINVAL;
d785a06a0b9d0c NeilBrown 2006-06-26 386 goto out;
d785a06a0b9d0c NeilBrown 2006-06-26 387 }
d785a06a0b9d0c NeilBrown 2006-06-26 388 bh->b_bdev =
inode->i_sb->s_bdev;
d785a06a0b9d0c NeilBrown 2006-06-26 389 if (count <
(1<<inode->i_blkbits))
d785a06a0b9d0c NeilBrown 2006-06-26 390 count = 0;
32a7627cf3a353 NeilBrown 2005-06-21 391 else
d785a06a0b9d0c NeilBrown 2006-06-26 392 count -=
(1<<inode->i_blkbits);
d785a06a0b9d0c NeilBrown 2006-06-26 393
d785a06a0b9d0c NeilBrown 2006-06-26 394 bh->b_end_io = end_bitmap_write;
d785a06a0b9d0c NeilBrown 2006-06-26 395 bh->b_private = bitmap;
ce25c31bdd3b39 NeilBrown 2006-06-26 396
atomic_inc(&bitmap->pending_writes);
ce25c31bdd3b39 NeilBrown 2006-06-26 397 set_buffer_locked(bh);
ce25c31bdd3b39 NeilBrown 2006-06-26 398 set_buffer_mapped(bh);
2a222ca992c35a Mike Christie 2016-06-05 399 submit_bh(REQ_OP_READ, 0, bh);
d785a06a0b9d0c NeilBrown 2006-06-26 400 }
d785a06a0b9d0c NeilBrown 2006-06-26 401 block++;
d785a06a0b9d0c NeilBrown 2006-06-26 402 bh = bh->b_this_page;
d785a06a0b9d0c NeilBrown 2006-06-26 403 }
d785a06a0b9d0c NeilBrown 2006-06-26 404 page->index = index;
ce25c31bdd3b39 NeilBrown 2006-06-26 405
ce25c31bdd3b39 NeilBrown 2006-06-26 406 wait_event(bitmap->write_wait,
ce25c31bdd3b39 NeilBrown 2006-06-26 407
atomic_read(&bitmap->pending_writes)==0);
b405fe91e50c60 NeilBrown 2012-05-22 408 if (test_bit(BITMAP_WRITE_ERROR,
&bitmap->flags))
27581e5ae01f77 NeilBrown 2012-05-22 409 ret = -EIO;
32a7627cf3a353 NeilBrown 2005-06-21 410 out:
27581e5ae01f77 NeilBrown 2012-05-22 411 if (ret)
ec0cc226854a79 NeilBrown 2016-11-02 412 pr_err("md: bitmap read error: (%dB @
%llu): %d\n",
2d1f3b5d1b2cd1 NeilBrown 2006-01-06 413 (int)PAGE_SIZE,
2d1f3b5d1b2cd1 NeilBrown 2006-01-06 414 (unsigned long long)index <<
PAGE_SHIFT,
27581e5ae01f77 NeilBrown 2012-05-22 415 ret);
27581e5ae01f77 NeilBrown 2012-05-22 416 return ret;
32a7627cf3a353 NeilBrown 2005-06-21 417 }
32a7627cf3a353 NeilBrown 2005-06-21 418
:::::: The code at line 382 was first introduced by commit
:::::: d785a06a0b9d0cd86b3cc1bf8e236e62af7b47ed [PATCH] md/bitmap: change md/bitmap file
handling to use bmap to file blocks
:::::: TO: NeilBrown <neilb(a)suse.de>
:::::: CC: Linus Torvalds <torvalds(a)g5.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org