]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/SnapMapper: fix pacific legacy key conversion and introduce test
authorManuel Lausch <manuel.lausch@1und1.de>
Thu, 30 Jun 2022 12:29:53 +0000 (14:29 +0200)
committerVikhyat Umrao <vikhyat@redhat.com>
Mon, 22 Aug 2022 11:19:30 +0000 (16:49 +0530)
commit729916b39a702d78b3a4b8a8931695656c76f67c
tree8252e362d8fc7406ea8df93c4781d0514f82a4f1
parentda381011c1d0867f6851f6c8ae7d8b5baf6544d8
osd/SnapMapper: fix pacific legacy key conversion and introduce test

Octopus modified the SnapMapper key format from

  <LEGACY_MAPPING_PREFIX><snapid>_<shardid>_<hobject_t::to_str()>

to

  <MAPPING_PREFIX><pool>_<snapid>_<shardid>_<hobject_t::to_str()>

When this change was introduced, 94ebe0ea also introduced a conversion
with a crucial bug which essentially destroyed legacy keys by mapping them
to

  <MAPPING_PREFIX><poolid>_<snapid>_

without the object-unique suffix.  This commit fixes this conversion going
forward, but a fix for existing clusters still needs to be developed.

Fixes: https://tracker.ceph.com/issues/56147
Signed-off-by: Manuel Lausch <manuel.lausch@1und1.de>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 66bea86ab447b2db8a948c7913dc6c7a4a995c31)
(cherry picked from commit 9b5fbb8cb80c1d606f138bdbdce62686c084207a)

Resolves: rhbz#2107404
src/osd/SnapMapper.cc
src/osd/SnapMapper.h
src/test/test_snap_mapper.cc