]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/SnapMapper: fix pacific legacy key conversion and introduce test 46908/head
authorManuel Lausch <manuel.lausch@1und1.de>
Thu, 30 Jun 2022 12:29:53 +0000 (14:29 +0200)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 14 Jul 2022 08:09:48 +0000 (08:09 +0000)
commit66bea86ab447b2db8a948c7913dc6c7a4a995c31
tree882515a0d0617a4538bb2f540d3484e1d2beb2ab
parentf3d63b232373c7d3fe9eb2f902d9b6bb8f29ad74
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>
src/osd/SnapMapper.cc
src/osd/SnapMapper.h
src/test/test_snap_mapper.cc