From: Casey Bodley Date: Tue, 1 May 2018 14:40:20 +0000 (-0400) Subject: rgw: expose struct bucket_index_marker_info in header X-Git-Tag: v13.2.0~36^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=de1d2f9816886d0e334c275116a3d37a8ffac95c;p=ceph.git rgw: expose struct bucket_index_marker_info in header Signed-off-by: Casey Bodley (cherry picked from commit 6274368d9cc6566e85b52e53d6949a7814a5ea27) --- diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index cc1bbabb4f39..1833d5d42030 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -1920,30 +1920,16 @@ int RGWRemoteBucketLog::init(const string& _source_zone, RGWRESTConn *_conn, return 0; } -struct bucket_index_marker_info { - string bucket_ver; - string master_ver; - string max_marker; - bool syncstopped{false}; - - void decode_json(JSONObj *obj) { - JSONDecoder::decode_json("bucket_ver", bucket_ver, obj); - JSONDecoder::decode_json("master_ver", master_ver, obj); - JSONDecoder::decode_json("max_marker", max_marker, obj); - JSONDecoder::decode_json("syncstopped", syncstopped, obj); - } -}; - class RGWReadRemoteBucketIndexLogInfoCR : public RGWCoroutine { RGWDataSyncEnv *sync_env; const string instance_key; - bucket_index_marker_info *info; + rgw_bucket_index_marker_info *info; public: RGWReadRemoteBucketIndexLogInfoCR(RGWDataSyncEnv *_sync_env, const rgw_bucket_shard& bs, - bucket_index_marker_info *_info) + rgw_bucket_index_marker_info *_info) : RGWCoroutine(_sync_env->cct), sync_env(_sync_env), instance_key(bs.get_key()), info(_info) {} @@ -1956,7 +1942,7 @@ public: { NULL, NULL } }; string p = "/admin/log/"; - call(new RGWReadRESTResourceCR(sync_env->cct, sync_env->conn, sync_env->http_manager, p, pairs, info)); + call(new RGWReadRESTResourceCR(sync_env->cct, sync_env->conn, sync_env->http_manager, p, pairs, info)); } if (retcode < 0) { return set_cr_error(retcode); @@ -1975,7 +1961,7 @@ class RGWInitBucketShardSyncStatusCoroutine : public RGWCoroutine { rgw_bucket_shard_sync_info& status; - bucket_index_marker_info info; + rgw_bucket_index_marker_info info; public: RGWInitBucketShardSyncStatusCoroutine(RGWDataSyncEnv *_sync_env, const rgw_bucket_shard& bs, diff --git a/src/rgw/rgw_data_sync.h b/src/rgw/rgw_data_sync.h index 613dd9e37ac6..8c6b7e2a8885 100644 --- a/src/rgw/rgw_data_sync.h +++ b/src/rgw/rgw_data_sync.h @@ -475,6 +475,20 @@ struct rgw_bucket_shard_sync_info { }; WRITE_CLASS_ENCODER(rgw_bucket_shard_sync_info) +struct rgw_bucket_index_marker_info { + string bucket_ver; + string master_ver; + string max_marker; + bool syncstopped{false}; + + void decode_json(JSONObj *obj) { + JSONDecoder::decode_json("bucket_ver", bucket_ver, obj); + JSONDecoder::decode_json("master_ver", master_ver, obj); + JSONDecoder::decode_json("max_marker", max_marker, obj); + JSONDecoder::decode_json("syncstopped", syncstopped, obj); + } +}; + class RGWRemoteBucketLog : public RGWCoroutinesManager { RGWRados *store;