ceph: include type in ceph_entity_addr, filepath

Include a type/version in ceph_entity_addr and filepath.  Include extra
byte in filepath encoding as necessary.

Signed-off-by: Sage Weil <sage@newdream.net>
diff --git a/fs/ceph/decode.h b/fs/ceph/decode.h
index 10de848..b90a33b 100644
--- a/fs/ceph/decode.h
+++ b/fs/ceph/decode.h
@@ -138,6 +138,7 @@
 {
 	u32 len = path ? strlen(path) : 0;
 	BUG_ON(*p + sizeof(ino) + sizeof(len) + len > end);
+	ceph_encode_8(p, 1);
 	ceph_encode_64(p, ino);
 	ceph_encode_32(p, len);
 	if (len)
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 93998a0..4e3e8b2 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1325,7 +1325,7 @@
 	}
 
 	len = sizeof(*head) +
-		pathlen1 + pathlen2 + 2*(sizeof(u32) + sizeof(u64));
+		pathlen1 + pathlen2 + 2*(1 + sizeof(u32) + sizeof(u64));
 
 	/* calculate (max) length for cap releases */
 	len += sizeof(struct ceph_mds_request_release) *
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c
index 81bc779..e4e8d44 100644
--- a/fs/ceph/messenger.c
+++ b/fs/ceph/messenger.c
@@ -1909,6 +1909,7 @@
 		msgr->inst.addr = *myaddr;
 
 	/* select a random nonce */
+	msgr->inst.addr.type = 0;
 	get_random_bytes(&msgr->inst.addr.nonce, sizeof(msgr->inst.addr.nonce));
 	encode_my_addr(msgr);
 
diff --git a/fs/ceph/msgr.h b/fs/ceph/msgr.h
index 40b6189..8aaab41 100644
--- a/fs/ceph/msgr.h
+++ b/fs/ceph/msgr.h
@@ -21,7 +21,7 @@
  * whenever the wire protocol changes.  try to keep this string length
  * constant.
  */
-#define CEPH_BANNER "ceph v026"
+#define CEPH_BANNER "ceph v027"
 #define CEPH_BANNER_MAX_LEN 30
 
 
@@ -61,7 +61,8 @@
  * entity_addr -- network address
  */
 struct ceph_entity_addr {
-	__le64 nonce;  /* unique id for process (e.g. pid) */
+	__le32 type;
+	__le32 nonce;  /* unique id for process (e.g. pid) */
 	struct sockaddr_storage in_addr;
 } __attribute__ ((packed));