Project

General

Profile

Actions

Bug #13462

closed

object_info_t::decode() has wrong version

Added by David Zafman over 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
David Zafman
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
hammer, firefly
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The decode version is current 14 when it should be 15 to match the encode version. This is in firefly, hammer and master.

It doesn't break anything now, but if we ever bump the compatv to 15 the decode would throw an exception when it would be a compatible decode.

This problem was introduced in 13b9dc70 when the encode went from 13 -> 14 and the decode wasn't changed. Later changes increased both by 1 but didn't match them up.


void object_info_t::encode(bufferlist& bl) const
{
  object_locator_t myoloc(soid);
  map<entity_name_t, watch_info_t> old_watchers;
  for (map<pair<uint64_t, entity_name_t>, watch_info_t>::const_iterator i =
         watchers.begin();
       i != watchers.end();
       ++i) {
    old_watchers.insert(make_pair(i->first.second, i->second));
  }
  ENCODE_START(15, 8, bl);

void object_info_t::decode(bufferlist::iterator& bl)
{
  object_locator_t myoloc;
  DECODE_START_LEGACY_COMPAT_LEN(14, 8, 8, bl);


Related issues 2 (0 open2 closed)

Copied to Ceph - Backport #13487: object_info_t::decode() has wrong versionRejectedSamuel JustActions
Copied to Ceph - Backport #13488: object_info_t::decode() has wrong versionResolvedAbhishek VarshneyActions
Actions #1

Updated by David Zafman over 8 years ago

  • Backport changed from hammer, firefly to infernalis, hammer, firefly
Actions #2

Updated by David Zafman over 8 years ago

  • Backport changed from infernalis, hammer, firefly to hammer, firefly
Actions #3

Updated by David Zafman over 8 years ago

  • Status changed from 12 to In Progress
Actions #4

Updated by David Zafman over 8 years ago

  • Status changed from In Progress to Pending Backport
Actions #5

Updated by David Zafman over 8 years ago

2b7ddde685213f3908f2dd9545b35f1d97f35a79

Actions #6

Updated by Nathan Cutler over 8 years ago

infernalis PR (containing the commit cited above): https://github.com/ceph/ceph/pull/6235

Actions #7

Updated by Loïc Dachary about 8 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF