]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
RGW - Zipper - Add rgw_sal_fwd.h
authorDaniel Gryniewicz <dang@redhat.com>
Fri, 13 May 2022 16:57:12 +0000 (12:57 -0400)
committerDaniel Gryniewicz <dang@redhat.com>
Tue, 28 Jun 2022 16:10:31 +0000 (12:10 -0400)
Add a header that forward declares the SAL objects.  This can be used in
various headers in RGW.

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
18 files changed:
src/rgw/rgw_acl_s3.h
src/rgw/rgw_common.h
src/rgw/rgw_log.h
src/rgw/rgw_lua.h
src/rgw/rgw_lua_request.h
src/rgw/rgw_metadata.h
src/rgw/rgw_multi.h
src/rgw/rgw_otp.h
src/rgw/rgw_period_pusher.h
src/rgw/rgw_quota.h
src/rgw/rgw_rados.h
src/rgw/rgw_realm_reloader.h
src/rgw/rgw_rest_conn.h
src/rgw/rgw_sal.h
src/rgw/rgw_sal_fwd.h [new file with mode: 0644]
src/rgw/rgw_tools.h
src/rgw/rgw_usage.h
src/rgw/rgw_user.h

index 907bcc17676e773e3dcc33cf0c033603a6b4623a..09cc7c39a1d342ecafa234d9b1a0e97c2f05f78a 100644 (file)
@@ -12,9 +12,9 @@
 #include "include/str_list.h"
 #include "rgw_xml.h"
 #include "rgw_acl.h"
+#include "rgw_sal_fwd.h"
 
 class RGWUserCtl;
-namespace rgw { namespace sal { class Store; } }
 
 class ACLPermission_S3 : public ACLPermission, public XMLObj
 {
index eafa25806e98871c046fe4d0e2585b0cd3e4020c..c9a831df53eb09f3b30f0d4cf5e9160343ced397 100644 (file)
 #include "include/rados/librados.hpp"
 #include "rgw_public_access.h"
 #include "common/tracer.h"
+#include "rgw_sal_fwd.h"
 
 namespace ceph {
   class Formatter;
 }
 
 namespace rgw::sal {
-  class User;
-  class Bucket;
-  class Object;
   using Attrs = std::map<std::string, ceph::buffer::list>;
 }
 
index f798941a13ce416e16fc031096df95bcb17cac5e..7cba7d1e1a7bd2b123c59061ff4c39242a079bc8 100644 (file)
@@ -9,10 +9,9 @@
 #include "common/OutputDataSocket.h"
 #include <vector>
 #include <fstream>
+#include "rgw_sal_fwd.h"
 
-namespace rgw { namespace sal {
-  class Store;
-} }
+#define dout_subsys ceph_subsys_rgw
 
 struct rgw_log_entry {
 
index 2fd920a36e79b339660e816fcbbde758b5d066f8..1eb14c605ffd44c8940a6ed3fb294b1c02c02cb6 100644 (file)
@@ -2,11 +2,11 @@
 
 #include <string>
 #include "common/async/yield_context.h"
+#include "rgw_sal_fwd.h"
 
 class lua_State;
 class rgw_user;
 namespace rgw::sal {
-  class Store;
   class RadosStore;
 }
 
index e49989e32e3a3d92f1338ebdfbe92fdaaed90328..f7569a3e764d7c4ad8c012a30936c7a9b21bef77 100644 (file)
@@ -2,13 +2,11 @@
 
 #include <string>
 #include "include/common_fwd.h"
+#include "rgw_sal_fwd.h"
 
 struct req_state;
 class RGWREST;
 class OpsLogSink;
-namespace rgw::sal {
-  class Store;
-}
 namespace rgw::lua {
   class Background;
 }
index 9dece2dc1d25f753afb6b70a462f59892fca13b6..a3bb634c4740679495999bc4b2d53d89f40a03c1 100644 (file)
 #include "common/RefCountedObj.h"
 #include "common/ceph_time.h"
 #include "services/svc_meta_be.h"
+#include "rgw_sal_fwd.h"
 
 
-namespace rgw { namespace sal {
-class Store;
-} }
 class RGWCoroutine;
 class JSONObj;
 struct RGWObjVersionTracker;
index 668b12080194b46e945bf49318027e0991643dac..8070455f835f53618651f1d56578f46e977017e8 100644 (file)
@@ -9,10 +9,7 @@
 #include "rgw_obj_manifest.h"
 #include "rgw_compression_types.h"
 #include "common/dout.h"
-
-namespace rgw { namespace sal {
-  class Store;
-} }
+#include "rgw_sal_fwd.h"
 
 #define MULTIPART_UPLOAD_ID_PREFIX_LEGACY "2/"
 #define MULTIPART_UPLOAD_ID_PREFIX "2~" // must contain a unique char that may not come up in gen_rand_alpha()
index 9bd17e6aff9834fdfd15fd0f7380e3140df34568..eacff15314c21d2fb9c31bcafe4392ee5a7c4f50 100644 (file)
@@ -4,10 +4,7 @@
 #ifndef CEPH_RGW_OTP_H
 #define CEPH_RGW_OTP_H
 
-namespace rgw { namespace sal {
-class Store;
-} }
-
+#include "rgw_sal_fwd.h"
 #include "cls/otp/cls_otp_types.h"
 #include "services/svc_meta_be_otp.h"
 
index 7f88e4e968f20cd3db402d66c8706288ea04734f..975cf380131441c322add336e09048844e7f7c75 100644 (file)
 
 #include "common/async/yield_context.h"
 #include "rgw_realm_reloader.h"
-
-namespace rgw {
-namespace sal {
-class Store;
-}
-}
+#include "rgw_sal_fwd.h"
 
 class RGWPeriod;
 
index 2a63dab4905383b2fe0a1a72bcd30fab118cc63b..5978721098c48a66b83193c35cdb0cd36a1555d5 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "rgw/rgw_basic_types.h"
 #include "common/async/yield_context.h"
+#include "rgw_sal_fwd.h"
 
 static inline int64_t rgw_rounded_kb(int64_t bytes)
 {
@@ -31,10 +32,6 @@ static inline int64_t rgw_rounded_kb(int64_t bytes)
 }
 
 class JSONObj;
-namespace rgw { namespace sal {
-  class Store;
-} }
-
 
 struct RGWQuotaInfo {
   template<class T> friend class RGWQuotaCache;
index 597ee89bd138583a2fb8750ea25f7536f2910dc9..2051b0a027c5ee12e05de240d689210198421d16 100644 (file)
@@ -38,6 +38,7 @@
 #include "common/Throttle.h"
 #include "common/ceph_mutex.h"
 #include "rgw_cache.h"
+#include "rgw_sal_fwd.h"
 
 struct D3nDataCache;
 
@@ -303,7 +304,6 @@ class RGWCoroutinesManagerRegistry;
 class RGWGetDirHeader_CB;
 class RGWGetUserHeader_CB;
 namespace rgw { namespace sal {
-  class Store;
   class RadosStore;
   class MPRadosSerializer;
   class LCRadosSerializer;
index 221f840b92ffba254c01c892734386f7055faeea..baf8dce97050a59d52de6bfce97a554ea1bec49e 100644 (file)
@@ -6,12 +6,7 @@
 
 #include "rgw_realm_watcher.h"
 #include "common/Cond.h"
-
-namespace rgw {
-namespace sal {
-class Store;
-}
-}
+#include "rgw_sal_fwd.h"
 
 /**
  * RGWRealmReloader responds to new period notifications by recreating RGWRados
index f697c58220eded69596fd80b60cfcfc0a0812a62..a612cf0cc3051b8ea572735ad623892c92af53d9 100644 (file)
@@ -7,13 +7,10 @@
 #include "common/ceph_json.h"
 #include "common/RefCountedObj.h"
 #include "include/common_fwd.h"
+#include "rgw_sal_fwd.h"
 
 #include <atomic>
 
-namespace rgw { namespace sal {
-  class Store;
-} }
-
 class RGWSI_Zone;
 
 template<class T>
index 0fcb6b005d09605d5d5840ea462d86d9831f0d35..b308389992e599f8c4f98041feff58d61161fc3a 100644 (file)
@@ -15,6 +15,7 @@
 
 #pragma once
 
+#include "rgw_sal_fwd.h"
 #include "rgw_user.h"
 #include "rgw_notify_event_type.h"
 #include "common/tracer.h"
@@ -201,22 +202,10 @@ namespace rgw { namespace sal {
 
 #define RGW_SAL_VERSION 1
 
-class User;
-class Bucket;
-class Object;
-class BucketList;
-class MultipartUpload;
 struct MPSerializer;
-class Lifecycle;
-class Notification;
 class GCChain;
-class Writer;
-class Zone;
-class LuaScriptManager;
 class RGWOIDCProvider;
 class RGWRole;
-class PlacementTier;
-struct RGWRoleInfo;
 
 enum AttrsMod {
   ATTRSMOD_NONE    = 0,
@@ -269,7 +258,7 @@ class Completions {
 };
 
 /** A list of key-value attributes */
-using Attrs = std::map<std::string, ceph::buffer::list>;
+  using Attrs = std::map<std::string, ceph::buffer::list>;
 
 /**
  * @brief Base singleton representing a Store or stacking layer
diff --git a/src/rgw/rgw_sal_fwd.h b/src/rgw/rgw_sal_fwd.h
new file mode 100644 (file)
index 0000000..bb78ed6
--- /dev/null
@@ -0,0 +1,36 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab ft=cpp
+
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2022 Red Hat, Inc.
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software
+ * Foundation. See file COPYING.
+ *
+ */
+
+#pragma once
+
+
+namespace rgw { namespace sal {
+
+  class Store;
+  class User;
+  class Bucket;
+  class BucketList;
+  class Object;
+  class MultipartUpload;
+  class Lifecycle;
+  class Notification;
+  class Writer;
+  class PlacementTier;
+  class ZoneGroup;
+  class Zone;
+  class LuaScriptManager;
+  struct RGWRoleInfo;
+
+} } // namespace rgw::sal
index 8e3ea8a91ef52f77ec08a7fd134c9ca87ccfab85..3e14805e1100f68796a6bf9cd0528f8df544e078 100644 (file)
@@ -12,6 +12,7 @@
 #include "common/ceph_time.h"
 
 #include "rgw_common.h"
+#include "rgw_sal_fwd.h"
 
 class RGWSI_SysObj;
 
@@ -19,9 +20,6 @@ class RGWRados;
 class RGWSysObjectCtx;
 struct RGWObjVersionTracker;
 class optional_yield;
-namespace rgw { namespace sal {
-  class Store;
-} }
 
 struct obj_version;
 
index 1faaf35ba328826daceebea10f83ee4e66de52fa..474b45e7cb8e7f87ef990f691fdfd9c6cc9fc637 100644 (file)
@@ -11,8 +11,7 @@
 #include "common/dout.h"
 #include "rgw_formats.h"
 #include "rgw_user.h"
-
-namespace rgw { namespace sal { class Store; } }
+#include "rgw_sal_fwd.h"
 
 
 class RGWUsage
index 732a7827f37ff8b733abd8488629d3dc09f3ed8e..710c61c30622e15a226990b1337ee237d7f99bc7 100644 (file)
@@ -17,6 +17,7 @@
 #include "common/Formatter.h"
 #include "rgw_formats.h"
 #include "rgw_metadata.h"
+#include "rgw_sal_fwd.h"
 
 #define RGW_USER_ANON_ID "anonymous"
 
@@ -31,9 +32,6 @@ class RGWBucketCtl;
 class RGWUserBuckets;
 
 class RGWGetUserStats_CB;
-namespace rgw { namespace sal {
-class Store;
-} }
 
 /**
  * A string wrapper that includes encode/decode functions