summaryrefslogtreecommitdiff
path: root/include/scsi/osd_types.h
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2010-10-19 14:22:21 +0200
committerJames Bottomley <James.Bottomley@suse.de>2010-10-26 10:42:34 -0500
commite96e72c45a1e78e9266dd70113b851395a440ef3 (patch)
tree92c60e5d7edc9d1129ba2e4ab38783d2727c7bc7 /include/scsi/osd_types.h
parentc4df46c49d8677158c7fb070a08e0d386c80205f (diff)
[SCSI] libosd: Support for scatter gather write/read commands
This patch adds the Scatter-Gather (sg) API to libosd. Scatter-gather enables a write/read of multiple none-contiguous areas of an object, in a single call. The extents may overlap and/or be in any order. The Scatter-Gather list is sent to the target in what is called a "cdb continuation segment". This is yet another possible segment in the osd-out-buffer. It is unlike all other segments in that it sits before the actual "data" segment (which until now was always first), and that it is signed by itself and not part of the data buffer. This is because the cdb-continuation-segment is considered a spill-over of the CDB data, and is therefor signed under OSD_SEC_CAPKEY and higher. TODO: A new osd_finalize_request_ex version should be supplied so the @caps received on the network also contains a size parameter and can be spilled over into the "cdb continuation segment". Thanks to John Chandy <john.chandy@uconn.edu> for the original code, and investigations. And the implementation of SG support in the osd-target. Original-coded-by: John Chandy <john.chandy@uconn.edu> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi/osd_types.h')
-rw-r--r--include/scsi/osd_types.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/scsi/osd_types.h b/include/scsi/osd_types.h
index 3f5e88cc75c0..bd0be7ed4bcf 100644
--- a/include/scsi/osd_types.h
+++ b/include/scsi/osd_types.h
@@ -37,4 +37,9 @@ struct osd_attr {
void *val_ptr; /* in network order */
};
+struct osd_sg_entry {
+ u64 offset;
+ u64 len;
+};
+
#endif /* ndef __OSD_TYPES_H__ */