From: Kefu Chai Date: Wed, 10 Mar 2021 11:18:38 +0000 (+0800) Subject: rgw: do not include RWLock.h unless RWLock is used X-Git-Tag: v17.1.0~2644^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2c118094e59429161aada57c70f69f72eb158e0a;p=ceph.git rgw: do not include RWLock.h unless RWLock is used Signed-off-by: Kefu Chai --- diff --git a/src/rgw/rgw_coroutine.h b/src/rgw/rgw_coroutine.h index 0d0b48bddc83..da5681d68cee 100644 --- a/src/rgw/rgw_coroutine.h +++ b/src/rgw/rgw_coroutine.h @@ -21,7 +21,6 @@ #include "common/debug.h" #include "common/Timer.h" #include "common/admin_socket.h" -#include "common/RWLock.h" #include "rgw_common.h" #include "rgw_http_client_types.h" diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index e6436043b9da..0412a6b9a3f3 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -2,7 +2,6 @@ // vim: ts=8 sw=2 smarttab ft=cpp #include "common/ceph_json.h" -#include "common/RWLock.h" #include "common/RefCountedObj.h" #include "common/WorkQueue.h" #include "common/Throttle.h" diff --git a/src/rgw/rgw_data_sync.h b/src/rgw/rgw_data_sync.h index 25db8da2fc80..7ecac3f56944 100644 --- a/src/rgw/rgw_data_sync.h +++ b/src/rgw/rgw_data_sync.h @@ -6,7 +6,6 @@ #include "include/encoding.h" -#include "common/RWLock.h" #include "common/ceph_json.h" #include "rgw_coroutine.h" diff --git a/src/rgw/rgw_frontend.h b/src/rgw/rgw_frontend.h index 50519b21deac..546cfef0e4e4 100644 --- a/src/rgw/rgw_frontend.h +++ b/src/rgw/rgw_frontend.h @@ -7,6 +7,8 @@ #include #include +#include "common/RWLock.h" + #include "rgw_request.h" #include "rgw_process.h" #include "rgw_realm_reloader.h" diff --git a/src/rgw/rgw_http_client.cc b/src/rgw/rgw_http_client.cc index 06559a4790ff..761f6f24c5a4 100644 --- a/src/rgw/rgw_http_client.cc +++ b/src/rgw/rgw_http_client.cc @@ -661,7 +661,7 @@ static int clear_signal(int fd) // since we're in non-blocking mode, we can try to read a lot more than // one signal from signal_thread() to avoid later wakeups. non-blocking reads // are also required to support the curl_multi_wait bug workaround - std::array buf; + std::array buf{}; int ret = ::read(fd, (void *)buf.data(), buf.size()); if (ret < 0) { ret = -errno; diff --git a/src/rgw/rgw_http_client.h b/src/rgw/rgw_http_client.h index 840ff88fe97d..010537ac656d 100644 --- a/src/rgw/rgw_http_client.h +++ b/src/rgw/rgw_http_client.h @@ -5,7 +5,6 @@ #define CEPH_RGW_HTTP_CLIENT_H #include "common/async/yield_context.h" -#include "common/RWLock.h" #include "common/Cond.h" #include "rgw_common.h" #include "rgw_string.h" diff --git a/src/rgw/rgw_mdlog.h b/src/rgw/rgw_mdlog.h index 9064f8c04178..53f5df762b96 100644 --- a/src/rgw/rgw_mdlog.h +++ b/src/rgw/rgw_mdlog.h @@ -16,6 +16,8 @@ #pragma once +#include "common/RWLock.h" + #include "rgw_metadata.h" #include "rgw_mdlog_types.h" diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h index f4564104c4b1..e45125984db4 100644 --- a/src/rgw/rgw_rados.h +++ b/src/rgw/rgw_rados.h @@ -10,7 +10,6 @@ #include "include/rados/librados.hpp" #include "include/Context.h" #include "common/RefCountedObj.h" -#include "common/RWLock.h" #include "common/ceph_time.h" #include "rgw_common.h" #include "cls/rgw/cls_rgw_types.h" diff --git a/src/rgw/rgw_sync.cc b/src/rgw/rgw_sync.cc index 078786d69839..5b9b9e94a387 100644 --- a/src/rgw/rgw_sync.cc +++ b/src/rgw/rgw_sync.cc @@ -4,7 +4,6 @@ #include #include "common/ceph_json.h" -#include "common/RWLock.h" #include "common/RefCountedObj.h" #include "common/WorkQueue.h" #include "common/Throttle.h" diff --git a/src/rgw/rgw_sync.h b/src/rgw/rgw_sync.h index 4d0d72c9839f..5938de233fcd 100644 --- a/src/rgw/rgw_sync.h +++ b/src/rgw/rgw_sync.h @@ -7,7 +7,6 @@ #include #include "include/stringify.h" -#include "common/RWLock.h" #include "rgw_coroutine.h" #include "rgw_http_client.h" diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc index 07822c48189a..4ab78e25a5a9 100644 --- a/src/rgw/rgw_user.cc +++ b/src/rgw/rgw_user.cc @@ -10,7 +10,6 @@ #include "common/errno.h" #include "common/Formatter.h" #include "common/ceph_json.h" -#include "common/RWLock.h" #include "rgw_sal_rados.h" #include "rgw_zone.h" #include "rgw_acl.h" diff --git a/src/rgw/services/svc_rados.h b/src/rgw/services/svc_rados.h index 57b4cd54209f..c167019e241f 100644 --- a/src/rgw/services/svc_rados.h +++ b/src/rgw/services/svc_rados.h @@ -7,7 +7,6 @@ #include "include/rados/librados.hpp" #include "common/async/yield_context.h" -#include "common/RWLock.h" class RGWAsyncRadosProcessor; diff --git a/src/rgw/services/svc_sys_obj_cache.h b/src/rgw/services/svc_sys_obj_cache.h index a0184e89df2b..c4ca6b21be6c 100644 --- a/src/rgw/services/svc_sys_obj_cache.h +++ b/src/rgw/services/svc_sys_obj_cache.h @@ -3,6 +3,7 @@ #pragma once +#include "common/RWLock.h" #include "rgw/rgw_service.h" #include "rgw/rgw_cache.h"