]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools: immutable_object_cache code format cleanup
authorYuan Zhou <yuan.zhou@intel.com>
Wed, 16 Jan 2019 16:02:48 +0000 (00:02 +0800)
committerYuan Zhou <yuan.zhou@intel.com>
Thu, 21 Mar 2019 16:16:27 +0000 (00:16 +0800)
Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
src/tools/immutable_object_cache/CacheController.cc
src/tools/immutable_object_cache/ObjectCacheStore.cc

index b657a101655d09d5f2c0db49df23cc7d3ff0da6a..9b439f6c980ab276a80004e16d07b3997debeb3f 100644 (file)
@@ -84,8 +84,9 @@ void CacheController::handle_request(uint64_t session_id, ObjectCacheRequest* re
 
       break;
     }
-    ldout(m_cct, 5) << "can't recongize request" << dendl;
-    ceph_assert(0); // TODO replace it.
+    default:
+      ldout(m_cct, 5) << "can't recongize request" << dendl;
+      ceph_assert(0);
   }
 }
 
index 5a5666dbcbc188ef69d15c17b0cfea9cc3cca933..ea066e6d7f9ba1d38e919c88d8e352e09d767736 100644 (file)
@@ -99,7 +99,7 @@ int ObjectCacheStore::do_promote(std::string pool_name, std::string object_name)
     }
   }
 
-  assert(m_ioctxs.find(pool_name) != m_ioctxs.end());
+  ceph_assert(m_ioctxs.find(pool_name) != m_ioctxs.end());
 
   librados::IoCtx* ioctx = m_ioctxs[pool_name];
 
@@ -150,9 +150,9 @@ int ObjectCacheStore::handle_promote_callback(int ret, bufferlist* read_buf,
   }
 
   // update metadata
-  assert(OBJ_CACHE_SKIP == m_policy->get_status(cache_file_name));
+  ceph_assert(OBJ_CACHE_SKIP == m_policy->get_status(cache_file_name));
   m_policy->update_status(cache_file_name, OBJ_CACHE_PROMOTED);
-  assert(OBJ_CACHE_PROMOTED == m_policy->get_status(cache_file_name));
+  ceph_assert(OBJ_CACHE_PROMOTED == m_policy->get_status(cache_file_name));
 
   delete read_buf;
 
@@ -183,7 +183,7 @@ int ObjectCacheStore::lookup_object(std::string pool_name,
       return -1;
     default:
       lderr(m_cct) << "unrecognized object cache status." << dendl;
-      assert(0);
+      ceph_assert(0);
   }
 }