mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 06:41:39 +00:00
libceph: update osd request/reply encoding
Use the new version of the encoding for osd requests and replies. In the process, update the way we are tracking request ops and reply lengths and results in the struct ceph_osd_request. Update the rbd and fs/ceph users appropriately. The main changes are: - we keep pointers into the request memory for fields we need to update each time the request is sent out over the wire - we keep information about the result in an array in the request struct where the users can easily get at it. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Alex Elder <elder@inktank.com>
This commit is contained in:
parent
2169aea649
commit
1b83bef24c
6 changed files with 220 additions and 167 deletions
|
@ -416,43 +416,5 @@ struct ceph_osd_op {
|
|||
__le32 payload_len;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/*
|
||||
* osd request message header. each request may include multiple
|
||||
* ceph_osd_op object operations.
|
||||
*/
|
||||
struct ceph_osd_request_head {
|
||||
__le32 client_inc; /* client incarnation */
|
||||
struct ceph_object_layout layout; /* pgid */
|
||||
__le32 osdmap_epoch; /* client's osdmap epoch */
|
||||
|
||||
__le32 flags;
|
||||
|
||||
struct ceph_timespec mtime; /* for mutations only */
|
||||
struct ceph_eversion reassert_version; /* if we are replaying op */
|
||||
|
||||
__le32 object_len; /* length of object name */
|
||||
|
||||
__le64 snapid; /* snapid to read */
|
||||
__le64 snap_seq; /* writer's snap context */
|
||||
__le32 num_snaps;
|
||||
|
||||
__le16 num_ops;
|
||||
struct ceph_osd_op ops[]; /* followed by ops[], obj, ticket, snaps */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct ceph_osd_reply_head {
|
||||
__le32 client_inc; /* client incarnation */
|
||||
__le32 flags;
|
||||
struct ceph_object_layout layout;
|
||||
__le32 osdmap_epoch;
|
||||
struct ceph_eversion reassert_version; /* for replaying uncommitted */
|
||||
|
||||
__le32 result; /* result code */
|
||||
|
||||
__le32 object_len; /* length of object name */
|
||||
__le32 num_ops;
|
||||
struct ceph_osd_op ops[0]; /* ops[], object */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue