Skip to content

Commit

Permalink
rgw: make subclass dependencies explicit
Browse files Browse the repository at this point in the history
As part of the Zipper project generic back-end code is being teased
apart from rados-specific back-end code. This is a work in progress,
so currently generic code and other subclasses of StoreDriver (and
related high-level classes) depend on the rados-specific declarations.
Some of these dependencies are not always obvious since
src/rgw/driver/rados was put on the include path. That is now removed,
so any includes needing files from that subclass have to give a more
fully specified path.

Signed-off-by: J. Eric Ivancich <[email protected]>
  • Loading branch information
ivancich committed Nov 10, 2023
1 parent 6dca61b commit 78948e7
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/rgw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ target_link_libraries(rgw_common
${FMT_LIB})
target_include_directories(rgw_common
PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw/services"
PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw/driver/rados"
PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw"
PUBLIC "${LUA_INCLUDE_DIR}")

Expand Down
3 changes: 2 additions & 1 deletion src/rgw/driver/dbstore/common/dbstore.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
#include "global/global_context.h"
#include "global/global_init.h"
#include "common/ceph_context.h"
#include "rgw_obj_manifest.h"
#include "rgw_multi.h"

#include "driver/rados/rgw_obj_manifest.h" // FIXME: subclass dependency

namespace rgw { namespace store {

class DB;
Expand Down
3 changes: 2 additions & 1 deletion src/rgw/driver/dbstore/config/sqlite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
#include "include/encoding.h"
#include "common/dout.h"
#include "common/random_string.h"
#include "rgw_zone.h"

#include "driver/rados/rgw_zone.h" // FIXME: subclass dependency

#include "common/connection_pool.h"
#include "sqlite/connection.h"
Expand Down
3 changes: 2 additions & 1 deletion src/rgw/rgw_basic_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
#include "rgw_user_types.h"
#include "rgw_bucket_types.h"
#include "rgw_obj_types.h"
#include "rgw_obj_manifest.h"

#include "driver/rados/rgw_obj_manifest.h" // FIXME: subclass dependency

#include "common/Formatter.h"

Expand Down
3 changes: 2 additions & 1 deletion src/rgw/rgw_multi.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
#include <map>
#include "rgw_xml.h"
#include "rgw_obj_types.h"
#include "rgw_obj_manifest.h"
#include "rgw_compression_types.h"
#include "common/dout.h"
#include "rgw_sal_fwd.h"

#include "driver/rados/rgw_obj_manifest.h" // FIXME: subclass dependency

#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()

Expand Down
6 changes: 4 additions & 2 deletions src/rgw/rgw_sal.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
#include "common/tracer.h"
#include "rgw_sal_fwd.h"
#include "rgw_lua.h"
#include "rgw_user.h"
#include "rgw_notify_event_type.h"
#include "rgw_req_context.h"
#include "rgw_datalog_notify.h"
#include "include/random.h"

// FIXME: following subclass dependencies
#include "driver/rados/rgw_user.h"
#include "driver/rados/rgw_datalog_notify.h"

struct RGWBucketEnt;
class RGWRESTMgr;
class RGWAccessListFilter;
Expand Down
2 changes: 1 addition & 1 deletion src/rgw/services/svc_bucket_sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#pragma once

#include "rgw_service.h"
#include "driver/rados/rgw_service.h" // FIXME: subclass dependency

#include "svc_bucket_types.h"

Expand Down
3 changes: 2 additions & 1 deletion src/rgw/services/svc_mdlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#include "rgw_mdlog.h"
#include "rgw_coroutine.h"
#include "rgw_cr_rados.h"
#include "rgw_zone.h"

#include "driver/rados/rgw_zone.h" // FIXME: subclass dependency

#include "common/errno.h"

Expand Down
3 changes: 2 additions & 1 deletion src/rgw/services/svc_meta_be.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@

#include "svc_meta_be_params.h"

#include "rgw_service.h"
#include "rgw_mdlog_types.h"

#include "driver/rados/rgw_service.h" // FIXME: subclass dependency

class RGWMetadataLogData;

class RGWSI_MDLog;
Expand Down
3 changes: 2 additions & 1 deletion src/rgw/services/svc_user_rados.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@

#include "svc_meta_be.h"
#include "svc_user.h"
#include "rgw_bucket.h"

#include "driver/rados/rgw_bucket.h" // FIXME: subclass dependency

class RGWSI_RADOS;
class RGWSI_Zone;
Expand Down

0 comments on commit 78948e7

Please sign in to comment.