summaryrefslogtreecommitdiffstats
path: root/src/librbd/cache/ParentCacheObjectDispatch.cc
diff options
context:
space:
mode:
authorshangdehao1 <dehao.shang@intel.com>2019-06-09 21:47:24 +0200
committerJason Dillaman <dillaman@redhat.com>2019-06-24 23:35:40 +0200
commitf50e084e09eeeb51a75a32cd6e89917eecac7892 (patch)
tree761ab8d99ba5ff8a0ee6842414eae914bf1a8a6f /src/librbd/cache/ParentCacheObjectDispatch.cc
parentdoc: updating doc for rbd shared parent cache (diff)
downloadceph-f50e084e09eeeb51a75a32cd6e89917eecac7892.tar.xz
ceph-f50e084e09eeeb51a75a32cd6e89917eecac7892.zip
librbd: modify Parent cache interface
follow the recent ObjectDispatchInterface to adjust parent cache hook Signed-off-by: Dehao Shang <dehao.shang@intel.com>
Diffstat (limited to 'src/librbd/cache/ParentCacheObjectDispatch.cc')
-rw-r--r--src/librbd/cache/ParentCacheObjectDispatch.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librbd/cache/ParentCacheObjectDispatch.cc b/src/librbd/cache/ParentCacheObjectDispatch.cc
index daa1c1f707f..c2c772b3a1f 100644
--- a/src/librbd/cache/ParentCacheObjectDispatch.cc
+++ b/src/librbd/cache/ParentCacheObjectDispatch.cc
@@ -20,6 +20,7 @@
<< this << " " << __func__ << ": "
using namespace ceph::immutable_obj_cache;
+using librbd::util::data_object_name;
namespace librbd {
namespace cache {
@@ -63,7 +64,7 @@ void ParentCacheObjectDispatch<I>::init() {
template <typename I>
bool ParentCacheObjectDispatch<I>::read(
- const std::string &oid, uint64_t object_no, uint64_t object_off,
+ uint64_t object_no, uint64_t object_off,
uint64_t object_len, librados::snap_t snap_id, int op_flags,
const ZTracer::Trace &parent_trace, ceph::bufferlist* read_data,
io::ExtentMap* extent_map, int* object_dispatch_flags,
@@ -73,6 +74,7 @@ bool ParentCacheObjectDispatch<I>::read(
ldout(cct, 20) << "object_no=" << object_no << " " << object_off << "~"
<< object_len << dendl;
ceph_assert(m_initialized);
+ string oid = data_object_name(m_image_ctx, object_no);
/* if RO daemon still don't startup, or RO daemon crash,
* or session have any error, try to re-connect daemon.*/