aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/scsi
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2014-12-04 11:34:19 +0000
committerAlexander Motin <mav@FreeBSD.org>2014-12-04 11:34:19 +0000
commitef8daf3fedea42e9519fd722ec60c801ec6ce1cc (patch)
tree941ac8b775086c59b8407dd21087e39abd6fb5fe /sys/cam/scsi
parent3d6aff56154e3c2feb9b6fc492d9d18e89e76d75 (diff)
downloadsrc-ef8daf3fedea42e9519fd722ec60c801ec6ce1cc.tar.gz
src-ef8daf3fedea42e9519fd722ec60c801ec6ce1cc.zip
Add GET LBA STATUS command support to CTL.
It is implemented for LUNs backed by ZVOLs in "dev" mode and files. GEOM has no such API, so for LUNs backed by raw devices all LBAs will be reported as mapped/unknown. MFC after: 2 weeks Sponsored by: iXsystems, Inc.
Notes
Notes: svn path=/head/; revision=275474
Diffstat (limited to 'sys/cam/scsi')
-rw-r--r--sys/cam/scsi/scsi_all.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h
index 6ee03705c753..d536a74b2ebc 100644
--- a/sys/cam/scsi/scsi_all.h
+++ b/sys/cam/scsi/scsi_all.h
@@ -2518,6 +2518,32 @@ struct scsi_read_capacity_data_long
uint8_t reserved[16];
};
+struct scsi_get_lba_status
+{
+ uint8_t opcode;
+#define SGLS_SERVICE_ACTION 0x12
+ uint8_t service_action;
+ uint8_t addr[8];
+ uint8_t alloc_len[4];
+ uint8_t reserved;
+ uint8_t control;
+};
+
+struct scsi_get_lba_status_data_descr
+{
+ uint8_t addr[8];
+ uint8_t length[4];
+ uint8_t status;
+ uint8_t reserved[3];
+};
+
+struct scsi_get_lba_status_data
+{
+ uint8_t length[4];
+ uint8_t reserved[4];
+ struct scsi_get_lba_status_data_descr descr[];
+};
+
struct scsi_report_luns
{
uint8_t opcode;