]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: resolve_oid() looks in clone_snaps by requested snap ID 48475/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 13 Oct 2022 11:22:32 +0000 (11:22 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 13 Oct 2022 11:30:31 +0000 (11:30 +0000)
Before the patch the method was looking for `lower_bound(oid.snap)`
from `SnapSet::clones` which leads to reading from head instead of
returning the `ENOENT` expected in `TestLibRBD.TestIOToSnapshot`.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/pg.cc

index 2c826bffd0a26585a45bafa9491310a367a596f2..5f88580285360e2947fd2dc854d73ef4f7c5b49e 100644 (file)
@@ -1004,7 +1004,9 @@ std::optional<hobject_t> PG::resolve_oid(
     if (std::find(
          citer->second.begin(),
          citer->second.end(),
-         *clone) == citer->second.end()) {
+         oid.snap) == citer->second.end()) {
+      logger().debug("{} {} does not contain {} -- DNE",
+                     __func__, ss.clone_snaps, oid.snap);
       return std::nullopt;
     } else {
       auto soid = oid;