summaryrefslogtreecommitdiffstats
path: root/sys/cam/scsi/scsi_all.h
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2014-12-18 08:38:07 +0000
committermav <mav@FreeBSD.org>2014-12-18 08:38:07 +0000
commit4ff47ae9abedf70df85d191c50e4130adbdea839 (patch)
tree493e69933075582f0f9d4d1a850896cee12710af /sys/cam/scsi/scsi_all.h
parent251a95deec1d0bdb97ae02542b701f42eb54476a (diff)
downloadFreeBSD-src-4ff47ae9abedf70df85d191c50e4130adbdea839.zip
FreeBSD-src-4ff47ae9abedf70df85d191c50e4130adbdea839.tar.gz
MFC r275474: 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. Sponsored by: iXsystems, Inc.
Diffstat (limited to 'sys/cam/scsi/scsi_all.h')
-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 6ee0370..d536a74 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;
OpenPOWER on IntegriCloud