diff options
-rw-r--r-- | fs/ceph/decode.h | 1 | ||||
-rw-r--r-- | fs/ceph/mds_client.c | 2 | ||||
-rw-r--r-- | fs/ceph/messenger.c | 1 | ||||
-rw-r--r-- | fs/ceph/msgr.h | 5 |
4 files changed, 6 insertions, 3 deletions
diff --git a/fs/ceph/decode.h b/fs/ceph/decode.h index 10de84896244..b90a33b948c7 100644 --- a/fs/ceph/decode.h +++ b/fs/ceph/decode.h | |||
@@ -138,6 +138,7 @@ static inline void ceph_encode_filepath(void **p, void *end, | |||
138 | { | 138 | { |
139 | u32 len = path ? strlen(path) : 0; | 139 | u32 len = path ? strlen(path) : 0; |
140 | BUG_ON(*p + sizeof(ino) + sizeof(len) + len > end); | 140 | BUG_ON(*p + sizeof(ino) + sizeof(len) + len > end); |
141 | ceph_encode_8(p, 1); | ||
141 | ceph_encode_64(p, ino); | 142 | ceph_encode_64(p, ino); |
142 | ceph_encode_32(p, len); | 143 | ceph_encode_32(p, len); |
143 | if (len) | 144 | if (len) |
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 93998a0678c4..4e3e8b229e67 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -1325,7 +1325,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc, | |||
1325 | } | 1325 | } |
1326 | 1326 | ||
1327 | len = sizeof(*head) + | 1327 | len = sizeof(*head) + |
1328 | pathlen1 + pathlen2 + 2*(sizeof(u32) + sizeof(u64)); | 1328 | pathlen1 + pathlen2 + 2*(1 + sizeof(u32) + sizeof(u64)); |
1329 | 1329 | ||
1330 | /* calculate (max) length for cap releases */ | 1330 | /* calculate (max) length for cap releases */ |
1331 | len += sizeof(struct ceph_mds_request_release) * | 1331 | len += sizeof(struct ceph_mds_request_release) * |
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index 81bc779adb90..e4e8d4439d3a 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c | |||
@@ -1909,6 +1909,7 @@ struct ceph_messenger *ceph_messenger_create(struct ceph_entity_addr *myaddr) | |||
1909 | msgr->inst.addr = *myaddr; | 1909 | msgr->inst.addr = *myaddr; |
1910 | 1910 | ||
1911 | /* select a random nonce */ | 1911 | /* select a random nonce */ |
1912 | msgr->inst.addr.type = 0; | ||
1912 | get_random_bytes(&msgr->inst.addr.nonce, sizeof(msgr->inst.addr.nonce)); | 1913 | get_random_bytes(&msgr->inst.addr.nonce, sizeof(msgr->inst.addr.nonce)); |
1913 | encode_my_addr(msgr); | 1914 | encode_my_addr(msgr); |
1914 | 1915 | ||
diff --git a/fs/ceph/msgr.h b/fs/ceph/msgr.h index 40b6189aa9e3..8aaab414f3f8 100644 --- a/fs/ceph/msgr.h +++ b/fs/ceph/msgr.h | |||
@@ -21,7 +21,7 @@ | |||
21 | * whenever the wire protocol changes. try to keep this string length | 21 | * whenever the wire protocol changes. try to keep this string length |
22 | * constant. | 22 | * constant. |
23 | */ | 23 | */ |
24 | #define CEPH_BANNER "ceph v026" | 24 | #define CEPH_BANNER "ceph v027" |
25 | #define CEPH_BANNER_MAX_LEN 30 | 25 | #define CEPH_BANNER_MAX_LEN 30 |
26 | 26 | ||
27 | 27 | ||
@@ -61,7 +61,8 @@ extern const char *ceph_entity_type_name(int type); | |||
61 | * entity_addr -- network address | 61 | * entity_addr -- network address |
62 | */ | 62 | */ |
63 | struct ceph_entity_addr { | 63 | struct ceph_entity_addr { |
64 | __le64 nonce; /* unique id for process (e.g. pid) */ | 64 | __le32 type; |
65 | __le32 nonce; /* unique id for process (e.g. pid) */ | ||
65 | struct sockaddr_storage in_addr; | 66 | struct sockaddr_storage in_addr; |
66 | } __attribute__ ((packed)); | 67 | } __attribute__ ((packed)); |
67 | 68 | ||