/** * We allow to map RO many times and RW only once. We allow to map yet another * time RW, if MIGRATION is provided (second RW export can be required for * example for VM migration)
*/ enum rnbd_access_mode {
RNBD_ACCESS_RO,
RNBD_ACCESS_RW,
RNBD_ACCESS_MIGRATION,
};
/** * struct rnbd_msg_sess_info - initial session info from client to server * @hdr: message header * @ver: RNBD protocol version
*/ struct rnbd_msg_sess_info { struct rnbd_msg_hdr hdr;
u8 ver;
u8 reserved[31];
};
/** * struct rnbd_msg_sess_info_rsp - initial session info from server to client * @hdr: message header * @ver: RNBD protocol version
*/ struct rnbd_msg_sess_info_rsp { struct rnbd_msg_hdr hdr;
u8 ver;
u8 reserved[31];
};
/** * struct rnbd_msg_open - request to open a remote device. * @hdr: message header * @access_mode: the mode to open remote device, valid values see: * enum rnbd_access_mode * @device_name: device path on remote side
*/ struct rnbd_msg_open { struct rnbd_msg_hdr hdr;
u8 access_mode;
u8 resv1;
s8 dev_name[NAME_MAX];
u8 reserved[3];
};
/** * struct rnbd_msg_close - request to close a remote device. * @hdr: message header * @device_id: device_id on server side to identify the device
*/ struct rnbd_msg_close { struct rnbd_msg_hdr hdr;
__le32 device_id;
};
/** * struct rnbd_msg_open_rsp - response message to RNBD_MSG_OPEN * @hdr: message header * @device_id: device_id on server side to identify the device * @nsectors: number of sectors in the usual 512b unit * @max_hw_sectors: max hardware sectors in the usual 512b unit * @max_write_zeroes_sectors: max sectors for WRITE ZEROES in the 512b unit * @max_discard_sectors: max. sectors that can be discarded at once in 512b * unit. * @discard_granularity: size of the internal discard allocation unit in bytes * @discard_alignment: offset from internal allocation assignment in bytes * @physical_block_size: physical block size device supports in bytes * @logical_block_size: logical block size device supports in bytes * @max_segments: max segments hardware support in one transfer * @secure_discard: supports secure discard * @obsolete_rotational: obsolete, not in used. * @cache_policy: support write-back caching or FUA?
*/ struct rnbd_msg_open_rsp { struct rnbd_msg_hdr hdr;
__le32 device_id;
__le64 nsectors;
__le32 max_hw_sectors;
__le32 max_write_zeroes_sectors;
__le32 max_discard_sectors;
__le32 discard_granularity;
__le32 discard_alignment;
__le16 physical_block_size;
__le16 logical_block_size;
__le16 max_segments;
__le16 secure_discard;
u8 obsolete_rotational;
u8 cache_policy;
u8 reserved[10];
};
/** * struct rnbd_msg_io - message for I/O read/write * @hdr: message header * @device_id: device_id on server side to find the right device * @sector: bi_sector attribute from struct bio * @rw: valid values are defined in enum rnbd_io_flags * @bi_size: number of bytes for I/O read/write * @prio: priority
*/ struct rnbd_msg_io { struct rnbd_msg_hdr hdr;
__le32 device_id;
__le64 sector;
__le32 rw;
__le32 bi_size;
__le16 prio;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.