This allows a rolling upgrade from 0.47.2 to 0.48.
Signed-off-by: Sage Weil <sage@inktank.com>
}
void encode_payload(uint64_t features) {
+ if (monmap_bl.length() && (features & CEPH_FEATURE_MONENC) == 0) {
+ // reencode old-format monmap
+ MonMap t;
+ t.decode(monmap_bl);
+ monmap_bl.clear();
+ t.encode(monmap_bl, features);
+ }
+
::encode(fsid, payload);
::encode(op, payload);
::encode(epoch, payload);
#ifndef CEPH_MMONMAP_H
#define CEPH_MMONMAP_H
+#include "include/ceph_features.h"
#include "msg/Message.h"
+#include "mon/MonMap.h"
class MMonMap : public Message {
public:
const char *get_type_name() const { return "mon_map"; }
void encode_payload(uint64_t features) {
+ if (monmapbl.length() && (features & CEPH_FEATURE_MONENC) == 0) {
+ // reencode old-format monmap
+ MonMap t;
+ t.decode(monmapbl);
+ monmapbl.clear();
+ t.encode(monmapbl, features);
+ }
+
::encode(monmapbl, payload);
}
void decode_payload() {
#ifndef CEPH_MMONPROBE_H
#define CEPH_MMONPROBE_H
+#include "include/ceph_features.h"
#include "msg/Message.h"
#include "mon/MonMap.h"
}
void encode_payload(uint64_t features) {
+ if (monmap_bl.length() && (features & CEPH_FEATURE_MONENC) == 0) {
+ // reencode old-format monmap
+ MonMap t;
+ t.decode(monmap_bl);
+ monmap_bl.clear();
+ t.encode(monmap_bl, features);
+ }
+
::encode(fsid, payload);
::encode(op, payload);
::encode(name, payload);