From 87459c23aa057049d87c53e03d4562db4fe7610d Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 10 Mar 2021 19:22:23 +0800 Subject: [PATCH] librbd,rbd_mirror: do not include RWLock.h unless it is used Signed-off-by: Kefu Chai --- src/librbd/AsyncObjectThrottle.cc | 1 - src/librbd/ObjectMap.h | 1 - src/librbd/object_map/ResizeRequest.h | 1 - src/librbd/operation/Request.h | 1 - src/test/librbd/mock/MockImageCtx.h | 1 - src/test/librbd/mock/MockObjectMap.h | 3 --- src/tools/rbd_mirror/image_map/Policy.h | 1 - 7 files changed, 9 deletions(-) diff --git a/src/librbd/AsyncObjectThrottle.cc b/src/librbd/AsyncObjectThrottle.cc index 6adba21666ebb..e0fcefff18a03 100644 --- a/src/librbd/AsyncObjectThrottle.cc +++ b/src/librbd/AsyncObjectThrottle.cc @@ -1,7 +1,6 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "librbd/AsyncObjectThrottle.h" -#include "common/RWLock.h" #include "librbd/AsyncRequest.h" #include "librbd/ImageCtx.h" #include "librbd/Utils.h" diff --git a/src/librbd/ObjectMap.h b/src/librbd/ObjectMap.h index 7577d267f4406..8b5b352ef8aa4 100644 --- a/src/librbd/ObjectMap.h +++ b/src/librbd/ObjectMap.h @@ -10,7 +10,6 @@ #include "include/rbd/object_map_types.h" #include "common/AsyncOpTracker.h" #include "common/bit_vector.hpp" -#include "common/RWLock.h" #include "common/RefCountedObj.h" #include "librbd/Utils.h" #include diff --git a/src/librbd/object_map/ResizeRequest.h b/src/librbd/object_map/ResizeRequest.h index dccdef133cee0..5d933bb53d7b6 100644 --- a/src/librbd/object_map/ResizeRequest.h +++ b/src/librbd/object_map/ResizeRequest.h @@ -9,7 +9,6 @@ #include "common/bit_vector.hpp" class Context; -class RWLock; namespace librbd { diff --git a/src/librbd/operation/Request.h b/src/librbd/operation/Request.h index e32b49644cebb..a36d208575f51 100644 --- a/src/librbd/operation/Request.h +++ b/src/librbd/operation/Request.h @@ -6,7 +6,6 @@ #include "librbd/AsyncRequest.h" #include "include/Context.h" -#include "common/RWLock.h" #include "librbd/Utils.h" #include "librbd/Journal.h" diff --git a/src/test/librbd/mock/MockImageCtx.h b/src/test/librbd/mock/MockImageCtx.h index 80307962eb4fd..03033c9a09da1 100644 --- a/src/test/librbd/mock/MockImageCtx.h +++ b/src/test/librbd/mock/MockImageCtx.h @@ -16,7 +16,6 @@ #include "test/librbd/mock/MockReadahead.h" #include "test/librbd/mock/io/MockImageDispatcher.h" #include "test/librbd/mock/io/MockObjectDispatcher.h" -#include "common/RWLock.h" #include "common/WorkQueue.h" #include "common/zipkin_trace.h" #include "librbd/ImageCtx.h" diff --git a/src/test/librbd/mock/MockObjectMap.h b/src/test/librbd/mock/MockObjectMap.h index d72408403e8e9..2a1adbcaebab3 100644 --- a/src/test/librbd/mock/MockObjectMap.h +++ b/src/test/librbd/mock/MockObjectMap.h @@ -4,7 +4,6 @@ #ifndef CEPH_TEST_LIBRBD_MOCK_OBJECT_MAP_H #define CEPH_TEST_LIBRBD_MOCK_OBJECT_MAP_H -#include "common/RWLock.h" #include "librbd/Utils.h" #include "gmock/gmock.h" @@ -16,8 +15,6 @@ struct MockObjectMap { return at(object_no); } - MOCK_CONST_METHOD1(enabled, bool(const RWLock &object_map_lock)); - MOCK_CONST_METHOD0(size, uint64_t()); MOCK_METHOD1(open, void(Context *on_finish)); diff --git a/src/tools/rbd_mirror/image_map/Policy.h b/src/tools/rbd_mirror/image_map/Policy.h index 0617bb9eef0d4..b256e2f1d8ff1 100644 --- a/src/tools/rbd_mirror/image_map/Policy.h +++ b/src/tools/rbd_mirror/image_map/Policy.h @@ -8,7 +8,6 @@ #include #include -#include "common/RWLock.h" #include "cls/rbd/cls_rbd_types.h" #include "include/rados/librados.hpp" #include "tools/rbd_mirror/image_map/StateTransition.h" -- 2.39.5