tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: fb57b1fabcb28f358901b2df90abd2b48abc1ca8 commit: 5990119677a94b79da19c01770d3fe0ceda77229 [8920/10701] dm zoned: add metadata logging functions config: arm64-randconfig-r005-20200520 (attached as .config) compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project e6658079aca6d971b4e9d7137a3a2ecbc9c34aec) reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu git checkout 5990119677a94b79da19c01770d3fe0ceda77229 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot All warnings (new ones prefixed by >>, old ones prefixed by <<): >> drivers/md/dm-zoned-metadata.c:2468:6: warning: no previous prototype for function 'dmz_print_dev' [-Wmissing-prototypes] void dmz_print_dev(struct dmz_metadata *zmd, int num) ^ drivers/md/dm-zoned-metadata.c:2468:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void dmz_print_dev(struct dmz_metadata *zmd, int num) ^ static 1 warning generated. vim +/dmz_print_dev +2468 drivers/md/dm-zoned-metadata.c 2467 > 2468 void dmz_print_dev(struct dmz_metadata *zmd, int num) 2469 { 2470 struct dmz_dev *dev = &zmd->dev[num]; 2471 2472 dmz_dev_info(dev, "Host-%s zoned block device", 2473 bdev_zoned_model(dev->bdev) == BLK_ZONED_HA ? 2474 "aware" : "managed"); 2475 dmz_dev_info(dev, " %llu 512-byte logical sectors", 2476 (u64)dev->capacity); 2477 dmz_dev_info(dev, " %u zones of %llu 512-byte logical sectors", 2478 dev->nr_zones, (u64)zmd->zone_nr_sectors); 2479 } 2480 /* 2481 * Initialize the zoned metadata. 2482 */ 2483 int dmz_ctr_metadata(struct dmz_dev *dev, struct dmz_metadata **metadata, 2484 const char *devname) 2485 { 2486 struct dmz_metadata *zmd; 2487 unsigned int i; 2488 struct dm_zone *zone; 2489 int ret; 2490 2491 zmd = kzalloc(sizeof(struct dmz_metadata), GFP_KERNEL); 2492 if (!zmd) 2493 return -ENOMEM; 2494 2495 strcpy(zmd->devname, devname); 2496 zmd->dev = dev; 2497 zmd->mblk_rbtree = RB_ROOT; 2498 init_rwsem(&zmd->mblk_sem); 2499 mutex_init(&zmd->mblk_flush_lock); 2500 spin_lock_init(&zmd->mblk_lock); 2501 INIT_LIST_HEAD(&zmd->mblk_lru_list); 2502 INIT_LIST_HEAD(&zmd->mblk_dirty_list); 2503 2504 mutex_init(&zmd->map_lock); 2505 atomic_set(&zmd->unmap_nr_rnd, 0); 2506 INIT_LIST_HEAD(&zmd->unmap_rnd_list); 2507 INIT_LIST_HEAD(&zmd->map_rnd_list); 2508 2509 atomic_set(&zmd->unmap_nr_seq, 0); 2510 INIT_LIST_HEAD(&zmd->unmap_seq_list); 2511 INIT_LIST_HEAD(&zmd->map_seq_list); 2512 2513 atomic_set(&zmd->nr_reserved_seq_zones, 0); 2514 INIT_LIST_HEAD(&zmd->reserved_seq_zones_list); 2515 2516 init_waitqueue_head(&zmd->free_wq); 2517 2518 /* Initialize zone descriptors */ 2519 ret = dmz_init_zones(zmd); 2520 if (ret) 2521 goto err; 2522 2523 /* Get super block */ 2524 ret = dmz_load_sb(zmd); 2525 if (ret) 2526 goto err; 2527 2528 /* Set metadata zones starting from sb_zone */ 2529 for (i = 0; i < zmd->nr_meta_zones << 1; i++) { 2530 zone = dmz_get(zmd, zmd->sb[0].zone->id + i); 2531 if (!dmz_is_rnd(zone)) 2532 goto err; 2533 set_bit(DMZ_META, &zone->flags); 2534 } 2535 2536 /* Load mapping table */ 2537 ret = dmz_load_mapping(zmd); 2538 if (ret) 2539 goto err; 2540 2541 /* 2542 * Cache size boundaries: allow at least 2 super blocks, the chunk map 2543 * blocks and enough blocks to be able to cache the bitmap blocks of 2544 * up to 16 zones when idle (min_nr_mblks). Otherwise, if busy, allow 2545 * the cache to add 512 more metadata blocks. 2546 */ 2547 zmd->min_nr_mblks = 2 + zmd->nr_map_blocks + zmd->zone_nr_bitmap_blocks * 16; 2548 zmd->max_nr_mblks = zmd->min_nr_mblks + 512; 2549 zmd->mblk_shrinker.count_objects = dmz_mblock_shrinker_count; 2550 zmd->mblk_shrinker.scan_objects = dmz_mblock_shrinker_scan; 2551 zmd->mblk_shrinker.seeks = DEFAULT_SEEKS; 2552 2553 /* Metadata cache shrinker */ 2554 ret = register_shrinker(&zmd->mblk_shrinker); 2555 if (ret) { 2556 dmz_zmd_err(zmd, "Register metadata cache shrinker failed"); 2557 goto err; 2558 } 2559 2560 dmz_zmd_info(zmd, "DM-Zoned metadata version %d", DMZ_META_VER); 2561 dmz_print_dev(zmd, 0); 2562 2563 dmz_zmd_info(zmd, " %u zones of %llu 512-byte logical sectors", 2564 zmd->nr_zones, (u64)zmd->zone_nr_sectors); 2565 dmz_zmd_info(zmd, " %u metadata zones", 2566 zmd->nr_meta_zones * 2); 2567 dmz_zmd_info(zmd, " %u data zones for %u chunks", 2568 zmd->nr_data_zones, zmd->nr_chunks); 2569 dmz_zmd_info(zmd, " %u random zones (%u unmapped)", 2570 zmd->nr_rnd, atomic_read(&zmd->unmap_nr_rnd)); 2571 dmz_zmd_info(zmd, " %u sequential zones (%u unmapped)", 2572 zmd->nr_seq, atomic_read(&zmd->unmap_nr_seq)); 2573 dmz_zmd_info(zmd, " %u reserved sequential data zones", 2574 zmd->nr_reserved_seq); 2575 dmz_zmd_debug(zmd, "Format:"); 2576 dmz_zmd_debug(zmd, "%u metadata blocks per set (%u max cache)", 2577 zmd->nr_meta_blocks, zmd->max_nr_mblks); 2578 dmz_zmd_debug(zmd, " %u data zone mapping blocks", 2579 zmd->nr_map_blocks); 2580 dmz_zmd_debug(zmd, " %u bitmap blocks", 2581 zmd->nr_bitmap_blocks); 2582 2583 *metadata = zmd; 2584 2585 return 0; 2586 err: 2587 dmz_cleanup_metadata(zmd); 2588 kfree(zmd); 2589 *metadata = NULL; 2590 2591 return ret; 2592 } 2593 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org