]> git-server-git.apps.pok.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>
Thu, 16 May 2024 11:53:49 +0000 (14:53 +0300)
commit4a38616f4657e12dc5e45647c44e30c04b6a2ca3
treeb1a5559de431203d95fa60f2531990c8a39e95a0
parentfbc03ce4ec06a6eeab31f0c6ba058795231539c4
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>
(cherry picked from commit d8aad5576f67c0e255b42c5d26334c87ba705931)
src/crimson/osd/object_context.cc
src/crimson/osd/object_context_loader.cc
src/crimson/osd/object_context_loader.h