]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
librbd: change RO hook naming.
authorshangdehao1 <dehao.shang@intel.com>
Wed, 8 May 2019 05:10:23 +0000 (13:10 +0800)
committerJason Dillaman <dillaman@redhat.com>
Mon, 24 Jun 2019 21:35:40 +0000 (17:35 -0400)
change SharedReadOnlyCache to ParentCache

Signed-off-by: Dehao Shang <dehao.shang@intel.com>
src/common/options.cc
src/librbd/ImageCtx.cc
src/librbd/ImageCtx.h
src/librbd/image/OpenRequest.cc

index 304f513f72109c73add9bd55854ffd25e9291912..5c631b0fac95cfb4ea4c0d9a954858e90e565d3c 100644 (file)
@@ -7148,7 +7148,7 @@ static std::vector<Option> get_rbd_options() {
     .set_default(false)
     .set_description("whether to block writes to the cache before the aio_write call completes"),
 
-    Option("rbd_shared_cache_enabled", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+    Option("rbd_parent_cache_enabled", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
     .set_default(false)
     .set_description("whether to enable rbd shared ro cache"),
 
index 4830aa4c82a34f0386f684bb4319fe8605925a27..2772c836e2bdb348bd35d6f96d7c1cfb2563fe90 100644 (file)
@@ -769,7 +769,7 @@ public:
     ASSIGN_OPTION(skip_partial_discard, bool);
     ASSIGN_OPTION(discard_granularity_bytes, uint64_t);
     ASSIGN_OPTION(blkin_trace_all, bool);
-    ASSIGN_OPTION(shared_cache_enabled, bool);
+    ASSIGN_OPTION(parent_cache_enabled, bool);
 
 #undef ASSIGN_OPTION
 
index f0ae7a1c14057c5752ee9db45cc97148dc8aeab1..7864e9a157c642a705ab9c1b64ecf829f4c53469 100644 (file)
@@ -195,7 +195,7 @@ namespace librbd {
     uint64_t mtime_update_interval;
     uint64_t atime_update_interval;
 
-    bool shared_cache_enabled;
+    bool parent_cache_enabled;
     std::string shared_cache_path;
 
     LibrbdAdminSocketHook *asok_hook;
index c50145587e986df29a0ff926e189508e0829e81f..f4cf7a7bf63951836084b8cb81813520e3b3c6dd 100644 (file)
@@ -523,7 +523,7 @@ Context *OpenRequest<I>::send_init_cache(int *result) {
 
   if (!m_image_ctx->cache || m_image_ctx->child != nullptr) {
      // enable Shared Read-only cache for parent image
-    if (m_image_ctx->child != nullptr && m_image_ctx->shared_cache_enabled ) {
+    if (m_image_ctx->child != nullptr && m_image_ctx->parent_cache_enabled ) {
       ldout(cct, 10) << this << " " << "setting up parent cache"<< dendl;
       auto sro_cache = cache::SharedReadOnlyObjectDispatch<I>::create(m_image_ctx);
       sro_cache->init();