diff mbox series

sd: Signal drive managed SMR disks

Message ID 20200514081953.1252087-1-damien.lemoal@wdc.com (mailing list archive)
State Mainlined
Commit 0bd735df7681e41647a69b1fad0eb5594c60a727
Headers show
Series sd: Signal drive managed SMR disks | expand

Commit Message

Damien Le Moal May 14, 2020, 8:19 a.m. UTC
Print a message indicating that a disk is a drive-managed SMR model when
such drive is found using the ZONED filed of the Block Device
Characteristics VPD page (IDENTIFY data on ATA side).

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
---
 drivers/scsi/sd.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Johannes Thumshirn May 14, 2020, 8:24 a.m. UTC | #1
Loos good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Martin K. Petersen May 15, 2020, 1:10 a.m. UTC | #2
On Thu, 14 May 2020 17:19:53 +0900, Damien Le Moal wrote:

> Print a message indicating that a disk is a drive-managed SMR model when
> such drive is found using the ZONED filed of the Block Device
> Characteristics VPD page (IDENTIFY data on ATA side).

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: sd: Signal drive managed SMR disks
      https://git.kernel.org/mkp/scsi/c/0bd735df7681
diff mbox series

Patch

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index a793cb08d025..8929e178c6f8 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -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)