summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2012-02-24 13:00:33 -0800
committerSage Weil <sage@newdream.net>2012-02-24 13:00:33 -0800
commit321ba67f1bddf623a60ada8623401f7feb6bccee (patch)
tree181f3da1406d89bebe47c7253b2308d93dd323e7
parentc3e1291da94fe0861715c0ca34ecc8f02da2a3a6 (diff)
parentddc99983228e761f754e0038aecbe341d7e2181f (diff)
downloadceph-321ba67f1bddf623a60ada8623401f7feb6bccee.tar.gz
Merge remote-tracking branch 'gh/stable' into stable
-rw-r--r--src/messages/MOSDMap.h11
-rw-r--r--src/osd/osd_types.cc22
2 files changed, 30 insertions, 3 deletions
diff --git a/src/messages/MOSDMap.h b/src/messages/MOSDMap.h
index f7838f7b7ae..cd4a9519e1d 100644
--- a/src/messages/MOSDMap.h
+++ b/src/messages/MOSDMap.h
@@ -22,7 +22,7 @@
class MOSDMap : public Message {
- static const int HEAD_VERSION = 2;
+ static const int HEAD_VERSION = 3;
public:
uuid_d fsid;
@@ -85,8 +85,13 @@ public:
void encode_payload(uint64_t features) {
::encode(fsid, payload);
if ((features & CEPH_FEATURE_PGID64) == 0 ||
- (features & CEPH_FEATURE_PGPOOL3) == 0) {
- header.version = 1;
+ (features & CEPH_FEATURE_PGPOOL3) == 0 ||
+ (features & CEPH_FEATURE_OSDENC) == 0) {
+ if ((features & CEPH_FEATURE_PGID64) == 0 ||
+ (features & CEPH_FEATURE_PGPOOL3) == 0)
+ header.version = 1; // old old_client version
+ else
+ header.version = 2; // old pg_pool_t
// reencode maps using old format
//
diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc
index a54910007ea..0a8087933b0 100644
--- a/src/osd/osd_types.cc
+++ b/src/osd/osd_types.cc
@@ -587,6 +587,28 @@ void pg_pool_t::encode(bufferlist& bl, uint64_t features) const
return;
}
+ if ((features & CEPH_FEATURE_OSDENC) == 0) {
+ __u8 struct_v = 4;
+ ::encode(struct_v, bl);
+ ::encode(type, bl);
+ ::encode(size, bl);
+ ::encode(crush_ruleset, bl);
+ ::encode(object_hash, bl);
+ ::encode(pg_num, bl);
+ ::encode(pgp_num, bl);
+ ::encode(lpg_num, bl);
+ ::encode(lpgp_num, bl);
+ ::encode(last_change, bl);
+ ::encode(snap_seq, bl);
+ ::encode(snap_epoch, bl);
+ ::encode(snaps, bl);
+ ::encode(removed_snaps, bl);
+ ::encode(auid, bl);
+ ::encode(flags, bl);
+ ::encode(crash_replay_interval, bl);
+ return;
+ }
+
ENCODE_START(5, 5, bl);
::encode(type, bl);
::encode(size, bl);