From: kernel test robot <lkp@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH 12/12] block: move integrity information into queue_limits
Date: Fri, 14 Jun 2024 16:26:25 +0800 [thread overview]
Message-ID: <202406141610.lfc2j4LN-lkp@intel.com> (raw)
In-Reply-To: <20240613084839.1044015-13-hch@lst.de>
Hi Christoph,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v6.10-rc3]
[cannot apply to axboe-block/for-next device-mapper-dm/for-next mkp-scsi/for-next song-md/md-next next-20240613]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Christoph-Hellwig/md-raid0-don-t-free-conf-on-raid0_run-failure/20240613-190028
base: linus/master
patch link: https://lore.kernel.org/r/20240613084839.1044015-13-hch%40lst.de
patch subject: [PATCH 12/12] block: move integrity information into queue_limits
config: parisc-defconfig (https://download.01.org/0day-ci/archive/20240614/202406141610.lfc2j4LN-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240614/202406141610.lfc2j4LN-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406141610.lfc2j4LN-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/scsi/sd.c: In function 'sd_revalidate_disk':
>> drivers/scsi/sd.c:3658:45: error: 'lim' undeclared (first use in this function)
3658 | sd_config_protection(sdkp, &lim);
| ^~~
drivers/scsi/sd.c:3658:45: note: each undeclared identifier is reported only once for each function it appears in
vim +/lim +3658 drivers/scsi/sd.c
3585
3586 /**
3587 * sd_revalidate_disk - called the first time a new disk is seen,
3588 * performs disk spin up, read_capacity, etc.
3589 * @disk: struct gendisk we care about
3590 **/
3591 static int sd_revalidate_disk(struct gendisk *disk)
3592 {
3593 struct scsi_disk *sdkp = scsi_disk(disk);
3594 struct scsi_device *sdp = sdkp->device;
3595 struct request_queue *q = sdkp->disk->queue;
3596 sector_t old_capacity = sdkp->capacity;
3597 unsigned char *buffer;
3598 unsigned int dev_max, rw_max;
3599
3600 SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp,
3601 "sd_revalidate_disk\n"));
3602
3603 /*
3604 * If the device is offline, don't try and read capacity or any
3605 * of the other niceties.
3606 */
3607 if (!scsi_device_online(sdp))
3608 goto out;
3609
3610 buffer = kmalloc(SD_BUF_SIZE, GFP_KERNEL);
3611 if (!buffer) {
3612 sd_printk(KERN_WARNING, sdkp, "sd_revalidate_disk: Memory "
3613 "allocation failure.\n");
3614 goto out;
3615 }
3616
3617 sd_spinup_disk(sdkp);
3618
3619 /*
3620 * Without media there is no reason to ask; moreover, some devices
3621 * react badly if we do.
3622 */
3623 if (sdkp->media_present) {
3624 sd_read_capacity(sdkp, buffer);
3625 /*
3626 * Some USB/UAS devices return generic values for mode pages
3627 * until the media has been accessed. Trigger a READ operation
3628 * to force the device to populate mode pages.
3629 */
3630 if (sdp->read_before_ms)
3631 sd_read_block_zero(sdkp);
3632 /*
3633 * set the default to rotational. All non-rotational devices
3634 * support the block characteristics VPD page, which will
3635 * cause this to be updated correctly and any device which
3636 * doesn't support it should be treated as rotational.
3637 */
3638 blk_queue_flag_clear(QUEUE_FLAG_NONROT, q);
3639 blk_queue_flag_set(QUEUE_FLAG_ADD_RANDOM, q);
3640
3641 if (scsi_device_supports_vpd(sdp)) {
3642 sd_read_block_provisioning(sdkp);
3643 sd_read_block_limits(sdkp);
3644 sd_read_block_limits_ext(sdkp);
3645 sd_read_block_characteristics(sdkp);
3646 sd_zbc_read_zones(sdkp, buffer);
3647 sd_read_cpr(sdkp);
3648 }
3649
3650 sd_print_capacity(sdkp, old_capacity);
3651
3652 sd_read_write_protect_flag(sdkp, buffer);
3653 sd_read_cache_type(sdkp, buffer);
3654 sd_read_io_hints(sdkp, buffer);
3655 sd_read_app_tag_own(sdkp, buffer);
3656 sd_read_write_same(sdkp, buffer);
3657 sd_read_security(sdkp, buffer);
> 3658 sd_config_protection(sdkp, &lim);
3659 }
3660
3661 /*
3662 * We now have all cache related info, determine how we deal
3663 * with flush requests.
3664 */
3665 sd_set_flush_flag(sdkp);
3666
3667 /* Initial block count limit based on CDB TRANSFER LENGTH field size. */
3668 dev_max = sdp->use_16_for_rw ? SD_MAX_XFER_BLOCKS : SD_DEF_XFER_BLOCKS;
3669
3670 /* Some devices report a maximum block count for READ/WRITE requests. */
3671 dev_max = min_not_zero(dev_max, sdkp->max_xfer_blocks);
3672 q->limits.max_dev_sectors = logical_to_sectors(sdp, dev_max);
3673
3674 if (sd_validate_min_xfer_size(sdkp))
3675 blk_queue_io_min(sdkp->disk->queue,
3676 logical_to_bytes(sdp, sdkp->min_xfer_blocks));
3677 else
3678 blk_queue_io_min(sdkp->disk->queue, 0);
3679
3680 if (sd_validate_opt_xfer_size(sdkp, dev_max)) {
3681 q->limits.io_opt = logical_to_bytes(sdp, sdkp->opt_xfer_blocks);
3682 rw_max = logical_to_sectors(sdp, sdkp->opt_xfer_blocks);
3683 } else {
3684 q->limits.io_opt = 0;
3685 rw_max = min_not_zero(logical_to_sectors(sdp, dev_max),
3686 (sector_t)BLK_DEF_MAX_SECTORS_CAP);
3687 }
3688
3689 /*
3690 * Limit default to SCSI host optimal sector limit if set. There may be
3691 * an impact on performance for when the size of a request exceeds this
3692 * host limit.
3693 */
3694 rw_max = min_not_zero(rw_max, sdp->host->opt_sectors);
3695
3696 /* Do not exceed controller limit */
3697 rw_max = min(rw_max, queue_max_hw_sectors(q));
3698
3699 /*
3700 * Only update max_sectors if previously unset or if the current value
3701 * exceeds the capabilities of the hardware.
3702 */
3703 if (sdkp->first_scan ||
3704 q->limits.max_sectors > q->limits.max_dev_sectors ||
3705 q->limits.max_sectors > q->limits.max_hw_sectors) {
3706 q->limits.max_sectors = rw_max;
3707 q->limits.max_user_sectors = rw_max;
3708 }
3709
3710 sdkp->first_scan = 0;
3711
3712 set_capacity_and_notify(disk, logical_to_sectors(sdp, sdkp->capacity));
3713 sd_config_write_same(sdkp);
3714 kfree(buffer);
3715
3716 /*
3717 * For a zoned drive, revalidating the zones can be done only once
3718 * the gendisk capacity is set. So if this fails, set back the gendisk
3719 * capacity to 0.
3720 */
3721 if (sd_zbc_revalidate_zones(sdkp))
3722 set_capacity_and_notify(disk, 0);
3723
3724 out:
3725 return 0;
3726 }
3727
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-06-14 8:26 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-13 8:48 move integrity settings to queue_limits v3 Christoph Hellwig
2024-06-13 8:48 ` [PATCH 01/12] block: initialize integrity buffer to zero before writing it to media Christoph Hellwig
2024-06-14 2:02 ` Martin K. Petersen
2024-06-14 12:45 ` Kanchan Joshi
2024-06-13 8:48 ` [PATCH 02/12] md/raid0: don't free conf on raid0_run failure Christoph Hellwig
2024-06-14 2:03 ` Martin K. Petersen
2024-06-13 8:48 ` [PATCH 03/12] md/raid1: " Christoph Hellwig
2024-06-14 2:04 ` Martin K. Petersen
2024-06-13 8:48 ` [PATCH 04/12] dm-integrity: use the nop integrity profile Christoph Hellwig
2024-06-14 2:04 ` Martin K. Petersen
2024-06-13 8:48 ` [PATCH 05/12] block: remove the blk_integrity_profile structure Christoph Hellwig
2024-06-14 2:11 ` Martin K. Petersen
2024-06-13 8:48 ` [PATCH 06/12] block: remove the blk_flush_integrity call in blk_integrity_unregister Christoph Hellwig
2024-06-13 8:48 ` [PATCH 07/12] block: factor out flag_{store,show} helper for integrity Christoph Hellwig
2024-06-13 8:48 ` [PATCH 08/12] block: use kstrtoul in flag_store Christoph Hellwig
2024-06-14 12:46 ` Kanchan Joshi
2024-06-13 8:48 ` [PATCH 09/12] block: don't require stable pages for non-PI metadata Christoph Hellwig
2024-06-13 8:48 ` [PATCH 10/12] block: bypass the STABLE_WRITES flag for protection information Christoph Hellwig
2024-06-13 8:48 ` [PATCH 11/12] block: invert the BLK_INTEGRITY_{GENERATE,VERIFY} flags Christoph Hellwig
2024-06-14 2:11 ` Martin K. Petersen
2024-06-13 8:48 ` [PATCH 12/12] block: move integrity information into queue_limits Christoph Hellwig
2024-06-13 13:40 ` Hannes Reinecke
2024-06-14 2:18 ` Martin K. Petersen
2024-06-14 8:26 ` kernel test robot [this message]
2024-06-14 8:47 ` kernel test robot
2024-06-14 12:33 ` move integrity settings to queue_limits v3 Jens Axboe
2024-06-14 16:03 ` Christoph Hellwig
2024-06-14 16:04 ` Jens Axboe
2024-06-14 16:07 ` Christoph Hellwig
2024-06-14 16:16 ` Jens Axboe
2024-06-14 16:23 ` Jens Axboe
2024-06-15 5:01 ` Christoph Hellwig
2024-06-14 16:23 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2024-06-05 6:28 move integrity settings to queue_limits Christoph Hellwig
2024-06-05 6:28 ` [PATCH 12/12] block: move integrity information into queue_limits Christoph Hellwig
2024-06-05 16:56 ` Bart Van Assche
2024-06-06 4:51 ` Christoph Hellwig
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=202406141610.lfc2j4LN-lkp@intel.com \
--to=lkp@intel.com \
--cc=hch@lst.de \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.