Skip to content

Commit 9f1e680

Browse files
authored
Merge pull request ceph#63938 from tchaikov/wip-osd-recalc-decode
osd: recalculate coll_t::_str during decode() to fix stale values Reviewed-by: Samuel Just <[email protected]>
2 parents a5c5757 + d01003e commit 9f1e680

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/osd/osd_types.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,8 @@ void coll_t::decode(ceph::buffer::list::const_iterator& bl)
10511051
type = TYPE_PG;
10521052
}
10531053
removal_seq = 0;
1054+
// recalculate _str, which is not encoded by v1
1055+
calc_str();
10541056
}
10551057
break;
10561058

@@ -1063,6 +1065,8 @@ void coll_t::decode(ceph::buffer::list::const_iterator& bl)
10631065
decode(snap, bl);
10641066
type = (type_t)_type;
10651067
removal_seq = 0;
1068+
// recalculate _str, which is not encoded by v2
1069+
calc_str();
10661070
}
10671071
break;
10681072

0 commit comments

Comments
 (0)