Skip to content

Commit

Permalink
crush: only encode class info if SERVER_LUMINOUS
Browse files Browse the repository at this point in the history
This fixes OSDMap reencode crc mismatches on jewel to
luminous upgrades.

Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Mar 24, 2017
1 parent 543ba8b commit 0822464
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/crush/CrushWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1386,10 +1386,12 @@ void CrushWrapper::encode(bufferlist& bl, uint64_t features) const
::encode(crush->chooseleaf_stable, bl);
}

// device classes
::encode(class_map, bl);
::encode(class_name, bl);
::encode(class_bucket, bl);
if (HAVE_FEATURE(features, SERVER_LUMINOUS)) {
// device classes
::encode(class_map, bl);
::encode(class_name, bl);
::encode(class_bucket, bl);
}
}

static void decode_32_or_64_string_map(map<int32_t,string>& m, bufferlist::iterator& blp)
Expand Down

0 comments on commit 0822464

Please sign in to comment.