OSDN Git Service

scsi: sd: add concurrent positioning ranges support
authorDamien Le Moal <damien.lemoal@wdc.com>
Wed, 27 Oct 2021 02:22:20 +0000 (11:22 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 27 Oct 2021 03:01:48 +0000 (21:01 -0600)
commite815d36548f01797ce381be8f0b74f4ba9befd15
treec74c9303990a9d538eb5a3488405b3ee1be4a850
parenta2247f19ee1c5ad75ef095cdfb909a3244b88aa8
scsi: sd: add concurrent positioning ranges support

Add the sd_read_cpr() function to the sd scsi disk driver to discover
if a device has multiple concurrent positioning ranges (i.e. multiple
actuators on an HDD). The existence of VPD page B9h indicates if a
device has multiple concurrent positioning ranges. The page content
describes each range supported by the device.

sd_read_cpr() is called from sd_revalidate_disk() and uses the block
layer functions disk_alloc_independent_access_ranges() and
disk_set_independent_access_ranges() to represent the set of actuators
of the device as independent access ranges.

The format of the Concurrent Positioning Ranges VPD page B9h is defined
in section 6.6.6 of SBC-5.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20211027022223.183838-3-damien.lemoal@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/sd.c
drivers/scsi/sd.h