Begin op enqueueing into the blockstore

This commit is contained in:
Vitaliy Filippov
2019-12-13 20:12:31 +03:00
parent 283d03ef18
commit f6eb4326b3
2 changed files with 159 additions and 29 deletions
+18 -13
View File
@@ -7,12 +7,16 @@
#define SECONDARY_OSD_REPLY_MAGIC 0xd17a57243b580b99baa699b87b434553
#define OSD_OP_PACKET_SIZE 0x80
#define OSD_REPLY_PACKET_SIZE 0x80
#define OSD_OP_MIN 0x01
#define OSD_OP_SECONDARY_READ 0x01
#define OSD_OP_SECONDARY_WRITE 0x02
#define OSD_OP_SECONDARY_SYNC 0x03
#define OSD_OP_SECONDARY_STABILIZE 0x04
#define OSD_OP_SECONDARY_DELETE 0x05
#define OSD_OP_SECONDARY_LIST 0x10
#define OSD_OP_MAX 0x10
#define OSD_RW_ALIGN 512
#define OSD_RW_MAX 64*1024*1024
// common header of all operations
struct __attribute__((__packed__)) osd_op_header_t
@@ -110,11 +114,11 @@ struct __attribute__((__packed__)) osd_op_secondary_stabilize_t
struct __attribute__((__packed__))
{
osd_op_header_t header;
// oid array length
// obj_ver_id array length in bytes
uint32_t len;
} packet;
// oid array
object_id *oids;
// object&version array
obj_ver_id *objects;
};
struct __attribute__((__packed__)) osd_reply_secondary_stabilize_t
@@ -150,20 +154,21 @@ struct __attribute__((__packed__)) osd_reply_secondary_list_t
union osd_any_op_t
{
osd_op_secondary_rw_t secondary_rw;
osd_op_secondary_del_t secondary_del;
osd_op_secondary_sync_t op_sync;
osd_op_secondary_stabilize_t op_stabilize;
osd_op_secondary_list_t op_list;
osd_op_header_t hdr;
osd_op_secondary_rw_t sec_rw;
osd_op_secondary_del_t sec_del;
osd_op_secondary_sync_t sec_sync;
osd_op_secondary_stabilize_t sec_stabilize;
osd_op_secondary_list_t sec_list;
};
union osd_any_reply_t
{
osd_reply_secondary_rw_t secondary_rw;
osd_reply_secondary_del_t secondary_del;
osd_reply_secondary_sync_t op_sync;
osd_reply_secondary_stabilize_t op_stabilize;
osd_reply_secondary_list_t op_list;
osd_reply_secondary_rw_t sec_rw;
osd_reply_secondary_del_t sec_del;
osd_reply_secondary_sync_t sec_sync;
osd_reply_secondary_stabilize_t sec_stabilize;
osd_reply_secondary_list_t sec_list;
};
static int size_ok = sizeof(osd_any_op_t) < OSD_OP_PACKET_SIZE &&