]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd/object_context_loader: fix with_clone_obc on resolve_oid case
authorMatan Breizman <mbreizma@redhat.com>
Sun, 7 Apr 2024 09:38:06 +0000 (09:38 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Mon, 22 Apr 2024 08:33:26 +0000 (08:33 +0000)
commitd8aad5576f67c0e255b42c5d26334c87ba705931
treed14681eaa1bc07a5d5abbd5ad5ac79f18e5bea1c
parent5de3da0edaeb3b415cfc9359efb06cd0d7fb58d0
crimson/osd/object_context_loader: fix with_clone_obc on resolve_oid case

Resolve_oid on a clone object may actually return the head:
```
    // Because oid.snap > ss.seq, we are trying to read from a snapshot
    // taken after the most recent write to this object. Read from head.
```

In this case, with_clone_obc should apply `func` same as with_head_obc would have.

Note: previously, with_clone_obc_only was called on the resolved head object.
While it didn't cause any errors, using the head_obc as clone is wrong.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/crimson/osd/object_context.cc
src/crimson/osd/object_context_loader.cc
src/crimson/osd/object_context_loader.h