[sheepdog] [PATCH 1/3] Add object_size member to sheepdog internal data.
Teruaki Ishizaki
ishizaki.teruaki at lab.ntt.co.jp
Tue Dec 9 13:49:22 CET 2014
This patch adds a information of "data object size"
to sheepdog request, response, state.
Signed-off-by: Teruaki Ishizaki <ishizaki.teruaki at lab.ntt.co.jp>
---
include/internal_proto.h | 3 ++-
include/sheepdog_proto.h | 6 ++++++
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/include/internal_proto.h b/include/internal_proto.h
index 74b50e1..b34aaa5 100644
--- a/include/internal_proto.h
+++ b/include/internal_proto.h
@@ -212,7 +212,7 @@ struct cluster_info {
uint8_t nr_copies;
uint8_t copy_policy;
enum sd_status status : 8;
- uint32_t __pad;
+ uint32_t object_size;
uint8_t store[STORE_LEN];
/* Node list at cluster_info->epoch */
@@ -356,6 +356,7 @@ struct vdi_state {
uint8_t snapshot;
uint8_t deleted;
uint8_t copy_policy;
+ uint32_t object_size;
uint32_t lock_state;
diff --git a/include/sheepdog_proto.h b/include/sheepdog_proto.h
index c25e9f1..cbb65b6 100644
--- a/include/sheepdog_proto.h
+++ b/include/sheepdog_proto.h
@@ -162,6 +162,8 @@ struct sd_req {
uint8_t reserved;
uint32_t snapid;
uint32_t type;
+ uint32_t object_size;
+ uint32_t __pad;
} vdi;
/* sheepdog-internal */
@@ -173,6 +175,7 @@ struct sd_req {
uint16_t flags;
uint32_t tag;
uint32_t nodes_nr;
+ uint32_t object_size;
} cluster;
struct {
uint32_t old_vid;
@@ -181,6 +184,8 @@ struct sd_req {
uint8_t set_bitmap; /* 0 means false */
/* others mean true */
uint8_t copy_policy;
+ uint8_t reserved;
+ uint32_t object_size;
} vdi_state;
struct {
uint64_t oid;
@@ -229,6 +234,7 @@ struct sd_rsp {
uint32_t attr_id;
uint8_t copies;
uint8_t reserved[3];
+ uint32_t object_size;
} vdi;
/* sheepdog-internal */
--
1.7.1
More information about the sheepdog
mailing list