On 2014年07月03日 15:22, Liu Yuan wrote:
On Thu, Jul 03, 2014 at 11:15:31AM +0800, Ruoyu wrote:
It is worth to do it because these two attributes are not specific
to every request type.
recovery.c and object_list_cache.c are also updated because of the
change. Later patch will apply it, too.
Signed-off-by: Ruoyu <lian...@ucweb.com>
---
include/sheepdog_proto.h | 20 ++++++++++----------
sheep/object_list_cache.c | 4 ++--
sheep/recovery.c | 5 ++---
3 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/include/sheepdog_proto.h b/include/sheepdog_proto.h
index 76fad51..79035ae 100644
--- a/include/sheepdog_proto.h
+++ b/include/sheepdog_proto.h
@@ -122,16 +122,18 @@
#define STORE_LEN 16
-#define SD_REQ_SIZE 48
-#define SD_RSP_SIZE 48
+#define SD_REQ_SIZE 72
+#define SD_RSP_SIZE 72
struct sd_req {
uint8_t proto_ver;
uint8_t opcode;
uint16_t flags;
uint32_t epoch;
- uint32_t id;
- uint32_t data_length;
+ uint32_t id;
+ uint32_t data_length;
+ uint8_t addr[16];
+ uint16_t port;
union {
struct {
uint64_t oid;
@@ -176,10 +178,6 @@ struct sd_req {
uint32_t generation;
uint32_t count;
} ref;
- struct {
- uint8_t addr[16];
- uint16_t port;
- } node_addr;
No, sd_req is protocol shared by sheep and QEMU, we should avoid to change
the layout of command header, otherwise we have to modify QEMU sheepdog driver.
Understand.
Please give a suggestion for the next patch "optimize repairing replica
in dog vdi check command"
Thanks
Yuan
--
sheepdog mailing list
sheepdog@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/sheepdog