From: Damien Le Moal <damien.lemoal@xxxxxxxx> For ZBC disks with RC_BASIS=0, limit the message indicating the capacity adjustment to the disk first scan. Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxxx> --- drivers/scsi/sd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index f7b6132..3a9d96e 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -2128,9 +2128,10 @@ static void sd_read_zones(struct scsi_disk *sdkp, unsigned char *buffer) /* The max_lba field is the capacity of a zoned device */ lba = get_unaligned_be64(&buffer[8]); if (lba + 1 > sdkp->capacity) { - sd_printk(KERN_WARNING, sdkp, - "Max LBA %zu (capacity %zu)\n", - (sector_t) lba + 1, sdkp->capacity); + if (sdkp->first_scan) + sd_printk(KERN_WARNING, sdkp, + "Changing capacity from %zu to Max LBA+1 %zu\n", + sdkp->capacity, (sector_t) lba + 1); sdkp->capacity = lba + 1; } } -- 1.8.5.6 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html