X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Frgw%2Frgw_meta_sync_status.h;fp=src%2Fceph%2Fsrc%2Frgw%2Frgw_meta_sync_status.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=e34bb05be1d7cca43b999fdd038befa7b3628a48;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/rgw/rgw_meta_sync_status.h b/src/ceph/src/rgw/rgw_meta_sync_status.h deleted file mode 100644 index e34bb05..0000000 --- a/src/ceph/src/rgw/rgw_meta_sync_status.h +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef RGW_META_SYNC_STATUS_H -#define RGW_META_SYNC_STATUS_H - -#include - -#include "common/ceph_time.h" - -struct rgw_meta_sync_info { - enum SyncState { - StateInit = 0, - StateBuildingFullSyncMaps = 1, - StateSync = 2, - }; - - uint16_t state; - uint32_t num_shards; - std::string period; //< period id of current metadata log - epoch_t realm_epoch = 0; //< realm epoch of period - - void encode(bufferlist& bl) const { - ENCODE_START(2, 1, bl); - ::encode(state, bl); - ::encode(num_shards, bl); - ::encode(period, bl); - ::encode(realm_epoch, bl); - ENCODE_FINISH(bl); - } - - void decode(bufferlist::iterator& bl) { - DECODE_START(1, bl); - ::decode(state, bl); - ::decode(num_shards, bl); - if (struct_v >= 2) { - ::decode(period, bl); - ::decode(realm_epoch, bl); - } - DECODE_FINISH(bl); - } - - void decode_json(JSONObj *obj); - void dump(Formatter *f) const; - - rgw_meta_sync_info() : state((int)StateInit), num_shards(0) {} -}; -WRITE_CLASS_ENCODER(rgw_meta_sync_info) - -struct rgw_meta_sync_marker { - enum SyncState { - FullSync = 0, - IncrementalSync = 1, - }; - uint16_t state; - string marker; - string next_step_marker; - uint64_t total_entries; - uint64_t pos; - real_time timestamp; - epoch_t realm_epoch{0}; //< realm_epoch of period marker - - rgw_meta_sync_marker() : state(FullSync), total_entries(0), pos(0) {} - - void encode(bufferlist& bl) const { - ENCODE_START(2, 1, bl); - ::encode(state, bl); - ::encode(marker, bl); - ::encode(next_step_marker, bl); - ::encode(total_entries, bl); - ::encode(pos, bl); - ::encode(timestamp, bl); - ::encode(realm_epoch, bl); - ENCODE_FINISH(bl); - } - - void decode(bufferlist::iterator& bl) { - DECODE_START(2, bl); - ::decode(state, bl); - ::decode(marker, bl); - ::decode(next_step_marker, bl); - ::decode(total_entries, bl); - ::decode(pos, bl); - ::decode(timestamp, bl); - if (struct_v >= 2) { - ::decode(realm_epoch, bl); - } - DECODE_FINISH(bl); - } - - void decode_json(JSONObj *obj); - void dump(Formatter *f) const; -}; -WRITE_CLASS_ENCODER(rgw_meta_sync_marker) - -struct rgw_meta_sync_status { - rgw_meta_sync_info sync_info; - map sync_markers; - - rgw_meta_sync_status() {} - - void encode(bufferlist& bl) const { - ENCODE_START(1, 1, bl); - ::encode(sync_info, bl); - ::encode(sync_markers, bl); - ENCODE_FINISH(bl); - } - - void decode(bufferlist::iterator& bl) { - DECODE_START(1, bl); - ::decode(sync_info, bl); - ::decode(sync_markers, bl); - DECODE_FINISH(bl); - } - - void dump(Formatter *f) const; - void decode_json(JSONObj *obj); -}; -WRITE_CLASS_ENCODER(rgw_meta_sync_status) - -#endif