mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
e96e72c45a
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>
45 lines
1,021 B
C
45 lines
1,021 B
C
/*
|
|
* osd_types.h - Types and constants which are not part of the protocol.
|
|
*
|
|
* Copyright (C) 2008 Panasas Inc. All rights reserved.
|
|
*
|
|
* Authors:
|
|
* Boaz Harrosh <bharrosh@panasas.com>
|
|
* Benny Halevy <bhalevy@panasas.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2
|
|
*
|
|
* Contains types and constants that are implementation specific and are
|
|
* used by more than one part of the osd library.
|
|
* (Eg initiator/target/security_manager/...)
|
|
*/
|
|
#ifndef __OSD_TYPES_H__
|
|
#define __OSD_TYPES_H__
|
|
|
|
struct osd_systemid {
|
|
u8 data[OSD_SYSTEMID_LEN];
|
|
};
|
|
|
|
typedef u64 __bitwise osd_id;
|
|
|
|
struct osd_obj_id {
|
|
osd_id partition;
|
|
osd_id id;
|
|
};
|
|
|
|
static const struct __weak osd_obj_id osd_root_object = {0, 0};
|
|
|
|
struct osd_attr {
|
|
u32 attr_page;
|
|
u32 attr_id;
|
|
u16 len; /* byte count of operand */
|
|
void *val_ptr; /* in network order */
|
|
};
|
|
|
|
struct osd_sg_entry {
|
|
u64 offset;
|
|
u64 len;
|
|
};
|
|
|
|
#endif /* ndef __OSD_TYPES_H__ */
|