diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/rgw/driver/rados/rgw_lc_tier.h | |
parent | Initial commit. (diff) | |
download | ceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/rgw/driver/rados/rgw_lc_tier.h')
-rw-r--r-- | src/rgw/driver/rados/rgw_lc_tier.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/rgw/driver/rados/rgw_lc_tier.h b/src/rgw/driver/rados/rgw_lc_tier.h new file mode 100644 index 000000000..729c4c304 --- /dev/null +++ b/src/rgw/driver/rados/rgw_lc_tier.h @@ -0,0 +1,51 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab ft=cpp + +#pragma once + +#include "rgw_lc.h" +#include "rgw_rest_conn.h" +#include "rgw_rados.h" +#include "rgw_zone.h" +#include "rgw_sal_rados.h" +#include "rgw_cr_rest.h" + +#define DEFAULT_MULTIPART_SYNC_PART_SIZE (32 * 1024 * 1024) +#define MULTIPART_MIN_POSSIBLE_PART_SIZE (5 * 1024 * 1024) + +struct RGWLCCloudTierCtx { + CephContext *cct; + const DoutPrefixProvider *dpp; + + /* Source */ + rgw_bucket_dir_entry& o; + rgw::sal::Driver *driver; + RGWBucketInfo& bucket_info; + std::string storage_class; + + rgw::sal::Object *obj; + + /* Remote */ + RGWRESTConn& conn; + std::string target_bucket_name; + std::string target_storage_class; + + std::map<std::string, RGWTierACLMapping> acl_mappings; + uint64_t multipart_min_part_size; + uint64_t multipart_sync_threshold; + + bool is_multipart_upload{false}; + bool target_bucket_created{true}; + + RGWLCCloudTierCtx(CephContext* _cct, const DoutPrefixProvider *_dpp, + rgw_bucket_dir_entry& _o, rgw::sal::Driver *_driver, + RGWBucketInfo &_binfo, rgw::sal::Object *_obj, + RGWRESTConn& _conn, std::string& _bucket, + std::string& _storage_class) : + cct(_cct), dpp(_dpp), o(_o), driver(_driver), bucket_info(_binfo), + obj(_obj), conn(_conn), target_bucket_name(_bucket), + target_storage_class(_storage_class) {} +}; + +/* Transition object to cloud endpoint */ +int rgw_cloud_tier_transfer_object(RGWLCCloudTierCtx& tier_ctx, std::set<std::string>& cloud_targets); |