From: shangdehao1 Date: Wed, 17 Apr 2019 18:09:18 +0000 (+0800) Subject: librbd: modify flush interface of RO X-Git-Tag: v15.1.0~2379^2~23 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=24d4bcd165e977f17d82acb0154757f3fa4a4378;p=ceph-ci.git librbd: modify flush interface of RO Add to journal_tid parameter to flush interface Delete LibrbdWriteback head file Signed-off-by: Dehao Shang --- diff --git a/src/librbd/cache/SharedReadOnlyObjectDispatch.cc b/src/librbd/cache/SharedReadOnlyObjectDispatch.cc index f2523b69e41..d7887192b3d 100644 --- a/src/librbd/cache/SharedReadOnlyObjectDispatch.cc +++ b/src/librbd/cache/SharedReadOnlyObjectDispatch.cc @@ -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" diff --git a/src/librbd/cache/SharedReadOnlyObjectDispatch.h b/src/librbd/cache/SharedReadOnlyObjectDispatch.h index 4b1771a99a0..792f5fce6fc 100644 --- a/src/librbd/cache/SharedReadOnlyObjectDispatch.h +++ b/src/librbd/cache/SharedReadOnlyObjectDispatch.h @@ -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; } diff --git a/src/test/librbd/cache/test_mock_ParentImageCache.cc b/src/test/librbd/cache/test_mock_ParentImageCache.cc index ff09a8e406c..1566bc5a154 100644 --- a/src/test/librbd/cache/test_mock_ParentImageCache.cc +++ b/src/test/librbd/cache/test_mock_ParentImageCache.cc @@ -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);