]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
librbd: modify flush interface of RO
authorshangdehao1 <dehao.shang@intel.com>
Wed, 17 Apr 2019 18:09:18 +0000 (02:09 +0800)
committerJason Dillaman <dillaman@redhat.com>
Mon, 24 Jun 2019 21:35:40 +0000 (17:35 -0400)
Add to journal_tid parameter to flush interface
Delete LibrbdWriteback head file

Signed-off-by: Dehao Shang <dehao.shang@intel.com>
src/librbd/cache/SharedReadOnlyObjectDispatch.cc
src/librbd/cache/SharedReadOnlyObjectDispatch.h
src/test/librbd/cache/test_mock_ParentImageCache.cc

index f2523b69e41ad1cd1cef294a4e6a6ae742ddc284..d7887192b3d46070ed9b6b2eaf1d8bb784b3cc4e 100644 (file)
@@ -5,7 +5,6 @@
 #include "librbd/ImageCtx.h"
 #include "librbd/Journal.h"
 #include "librbd/Utils.h"
-#include "librbd/LibrbdWriteback.h"
 #include "librbd/io/ObjectDispatchSpec.h"
 #include "librbd/io/ObjectDispatcher.h"
 #include "librbd/io/Utils.h"
index 4b1771a99a0a42435b671cd1d2bbac6b96d55e96..792f5fce6fc398fdb0a6f5c5f6a199170dcfb731 100644 (file)
@@ -86,8 +86,8 @@ public:
 
   bool flush(
       io::FlushSource flush_source, const ZTracer::Trace &parent_trace,
-      io::DispatchResult* dispatch_result, Context** on_finish,
-      Context* on_dispatched) {
+      uint64_t* journal_id, io::DispatchResult* dispatch_result,
+      Context** on_finish, Context* on_dispatched) {
     return false;
   }
 
index ff09a8e406c06e7729370e061c688c2e4b82694e..1566bc5a1544ed866de07230c1d4e41f67d0765f 100644 (file)
@@ -6,11 +6,9 @@
 #include "test/librbd/mock/MockImageCtx.h"
 #include "gmock/gmock.h"
 #include "gtest/gtest.h"
-
 #include "include/Context.h"
 #include "tools/immutable_object_cache/CacheClient.h"
 #include "test/immutable_object_cache/MockCacheDaemon.h"
-
 #include "librbd/cache/SharedReadOnlyObjectDispatch.h"
 #include "librbd/cache/SharedPersistentObjectCacher.h"
 #include "test/librbd/test_mock_fixture.h"
@@ -255,7 +253,7 @@ TEST_F(TestMockParentImageCache, test_disble_interface) {
   ASSERT_EQ(mock_parent_image_cache->compare_and_write(temp_oid, 0, 0, std::move(temp_bl), std::move(temp_bl), 
             *temp_snapc, 0, *temp_trace, temp_journal_tid, temp_op_flags, temp_journal_tid, 
             temp_dispatch_result, temp_on_finish, temp_on_dispatched), false);
-  ASSERT_EQ(mock_parent_image_cache->flush(temp_flush_source, *temp_trace, 
+  ASSERT_EQ(mock_parent_image_cache->flush(temp_flush_source, *temp_trace, temp_journal_tid,
             temp_dispatch_result, temp_on_finish, temp_on_dispatched), false);
   ASSERT_EQ(mock_parent_image_cache->invalidate_cache(nullptr), false);
   ASSERT_EQ(mock_parent_image_cache->reset_existence_cache(nullptr), false);