scsi: sd: Signal drive managed SMR disks
authorDamien Le Moal <damien.lemoal@wdc.com>
Thu, 14 May 2020 08:19:53 +0000 (17:19 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 15 May 2020 00:48:53 +0000 (20:48 -0400)
Print a message indicating that a disk is a drive-managed SMR model when
such drive is found using the ZONED field of the Block Device
Characteristics VPD page (IDENTIFY data on ATA side).

[mkp: typo]

Link: https://lore.kernel.org/r/20200514081953.1252087-1-damien.lemoal@wdc.com
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sd.c

index a793cb0..8929e17 100644 (file)
@@ -2955,6 +2955,9 @@ static void sd_read_block_characteristics(struct scsi_disk *sdkp)
                         * with partitions as regular block devices.
                         */
                        q->limits.zoned = BLK_ZONED_NONE;
+                       if (sdkp->zoned == 2 && sdkp->first_scan)
+                               sd_printk(KERN_NOTICE, sdkp,
+                                         "Drive-managed SMR disk\n");
                }
        }
        if (blk_queue_is_zoned(q) && sdkp->first_scan)