Bug #13462
object_info_t::decode() has wrong version
0%
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
Associated revisions
osd: Correct the object_info_t::decode() version
Caused by: 13b9dc70
Fixes: #13462
Backport: Hammer, Firefly
Signed-off-by: David Zafman <dzafman@redhat.com>
osd: Correct the object_info_t::decode() version
Caused by: 13b9dc70
Fixes: #13462
Backport: Hammer, Firefly
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 2b7ddde685213f3908f2dd9545b35f1d97f35a79)
osd: Correct the object_info_t::decode() version
Caused by: 13b9dc70
Fixes: #13462
Backport: Hammer, Firefly
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 2b7ddde685213f3908f2dd9545b35f1d97f35a79)
Conflicts:
src/osd/osd_types.cc
In firefly we need 14 to match object_info_t::encode(), whereas
in hammer and master the right value is 15.
History
#1 Updated by David Zafman over 8 years ago
- Backport changed from hammer, firefly to infernalis, hammer, firefly
#2 Updated by David Zafman over 8 years ago
- Backport changed from infernalis, hammer, firefly to hammer, firefly
#3 Updated by David Zafman over 8 years ago
- Status changed from 12 to In Progress
#4 Updated by David Zafman over 8 years ago
- Status changed from In Progress to Pending Backport
#5 Updated by David Zafman over 8 years ago
2b7ddde685213f3908f2dd9545b35f1d97f35a79
#6 Updated by Nathan Cutler over 8 years ago
infernalis PR (containing the commit cited above): https://github.com/ceph/ceph/pull/6235
#7 Updated by Loïc Dachary about 8 years ago
- Status changed from Pending Backport to Resolved