hail-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pete Zaitcev <zaitcev@redhat.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Project Hail List <hail-devel@vger.kernel.org>
Subject: [hail patch 2/3] fix 32/64 wire interoperability
Date: Wed, 4 Aug 2010 17:16:49 -0600	[thread overview]
Message-ID: <20100804171649.10861679@lembas.zaitcev.lan> (raw)

Testing found that tabled and chunkd running on CPUs with different
word length cannot talk to each other.

The bug was introduced by commit ea5d20bc22aeed077312c9c1824e84651af17a16.

The fix is to add named padding that takes the place of the invisible
padding, thus making the layout platform-neutral.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>

---
 include/chunk_msg.h |    1 +
 1 file changed, 1 insertion(+)

diff --git a/include/chunk_msg.h b/include/chunk_msg.h
index a34fc21..4c170e4 100644
--- a/include/chunk_msg.h
+++ b/include/chunk_msg.h
@@ -91,6 +91,7 @@ struct chunksrv_resp {
 	uint32_t		nonce;	/* txn id, copied from request */
 	uint64_t		data_len;		/* len of addn'l data */
 	unsigned char		hash[CHD_CSUM_SZ];	/* SHA1 checksum */
+	unsigned char		rsv2[4];		/* pad for 64 bits */
 };
 
 struct chunksrv_resp_get {

             reply	other threads:[~2010-08-04 23:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-04 23:16 Pete Zaitcev [this message]
2010-08-05 21:25 ` [hail patch 2/3] fix 32/64 wire interoperability Jeff Garzik
2010-08-05 23:19   ` Pete Zaitcev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100804171649.10861679@lembas.zaitcev.lan \
    --to=zaitcev@redhat.com \
    --cc=hail-devel@vger.kernel.org \
    --cc=jeff@garzik.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).