[Sheepdog] [PATCH 7/7] sheep: fix wrong alignment
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Thu Aug 4 10:41:01 CEST 2011
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
sheep/sheep_priv.h | 1 +
sheep/store.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/sheep/sheep_priv.h b/sheep/sheep_priv.h
index 74741fa..ae5bb03 100644
--- a/sheep/sheep_priv.h
+++ b/sheep/sheep_priv.h
@@ -232,6 +232,7 @@ int get_sheep_fd(uint8_t *addr, uint16_t port, int node_idx,
/* Journal header for data object */
struct jrnl_vdi_head {
uint32_t jh_type;
+ uint32_t pad;
uint64_t jh_offset;
uint64_t jh_size;
};
diff --git a/sheep/store.c b/sheep/store.c
index 9318eed..f5f9ab1 100644
--- a/sheep/store.c
+++ b/sheep/store.c
@@ -727,6 +727,7 @@ static int store_queue_request_local(struct request *req, uint32_t epoch)
jd.jdf_oid = oid;
jd.jdf_target_fd = fd;
+ memset(&jh, 0, sizeof(jh));
jh.jh_type = JRNL_TYPE_VDI;
jh.jh_offset = hdr->offset;
jh.jh_size = hdr->data_length;
--
1.7.2.5
More information about the sheepdog
mailing list