]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add override in rgw subsystem 13441/head
authorliuchang0812 <liuchang0812@gmail.com>
Wed, 15 Feb 2017 13:15:38 +0000 (21:15 +0800)
committerliuchang0812 <liuchang0812@gmail.com>
Wed, 15 Feb 2017 13:15:38 +0000 (21:15 +0800)
Fixes: http://tracker.ceph.com/issues/18922
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
22 files changed:
src/cls/rgw/cls_rgw_client.cc
src/rgw/librgw.cc
src/rgw/rgw_auth.cc
src/rgw/rgw_bucket.cc
src/rgw/rgw_coroutine.cc
src/rgw/rgw_data_sync.cc
src/rgw/rgw_log.cc
src/rgw/rgw_main.cc
src/rgw/rgw_metadata.cc
src/rgw/rgw_op.cc
src/rgw/rgw_policy_s3.cc
src/rgw/rgw_quota.cc
src/rgw/rgw_rados.cc
src/rgw/rgw_realm_reloader.cc
src/rgw/rgw_rest_bucket.cc
src/rgw/rgw_rest_client.cc
src/rgw/rgw_rest_realm.cc
src/rgw/rgw_rest_s3.cc
src/rgw/rgw_rest_usage.cc
src/rgw/rgw_rest_user.cc
src/rgw/rgw_sync.cc
src/rgw/rgw_user.cc

index 437c888098c70a7065c748a739c47ba59b4ad487..e981abd5624e3aa462f1bc92a98c4747895d2e23 100644 (file)
@@ -25,7 +25,7 @@ private:
 public:
   ClsBucketIndexOpCtx(T* _data, int *_ret_code) : data(_data), ret_code(_ret_code) { assert(data); }
   ~ClsBucketIndexOpCtx() {}
-  void handle_completion(int r, bufferlist& outbl) {
+  void handle_completion(int r, bufferlist& outbl) override {
     if (r >= 0) {
       try {
         bufferlist::iterator iter = outbl.begin();
@@ -523,7 +523,7 @@ public:
   ~GetDirHeaderCompletion() {
     ret_ctx->put();
   }
-  void handle_completion(int r, bufferlist& outbl) {
+  void handle_completion(int r, bufferlist& outbl) override {
     struct rgw_cls_list_ret ret;
     try {
       bufferlist::iterator iter = outbl.begin();
index 2ee969267e7debfe9588d6379359819aa9f5c821..4150a6f9dc6b9680bafa1ccf323dda06b6c70b1b 100644 (file)
@@ -70,7 +70,7 @@ namespace rgw {
   class C_InitTimeout : public Context {
   public:
     C_InitTimeout() {}
-    void finish(int r) {
+    void finish(int r) override {
       derr << "Initialization timeout, failed to initialize" << dendl;
       exit(1);
     }
index fb623d6cca6a619da3d0bbd5965ae0fa471a1635..af8ce42cf380d7de0e533989fce09adffa671d2f 100644 (file)
@@ -41,23 +41,23 @@ rgw_auth_transform_old_authinfo(req_state * const s)
         is_admin(is_admin) {
     }
 
-    uint32_t get_perms_from_aclspec(const aclspec_t& aclspec) const {
+    uint32_t get_perms_from_aclspec(const aclspec_t& aclspec) const override {
       return rgw_perms_from_aclspec_default_strategy(id, aclspec);
     }
 
-    bool is_admin_of(const rgw_user& acct_id) const {
+    bool is_admin_of(const rgw_user& acct_id) const override {
       return is_admin;
     }
 
-    bool is_owner_of(const rgw_user& acct_id) const {
+    bool is_owner_of(const rgw_user& acct_id) const override {
       return id == acct_id;
     }
 
-    uint32_t get_perm_mask() const {
+    uint32_t get_perm_mask() const override {
       return perm_mask;
     }
 
-    void to_str(std::ostream& out) const {
+    void to_str(std::ostream& out) const override {
       out << "RGWDummyIdentityApplier(auth_id=" << id
           << ", perm_mask=" << perm_mask
           << ", is_admin=" << is_admin << ")";
index a1ec0f0a0b0907a046428de4db64bd69200e700b..88e8a5d15323543779165dc44d91bff0347fe5cf 100644 (file)
@@ -1924,9 +1924,9 @@ void RGWBucketCompleteInfo::decode_json(JSONObj *obj) {
 class RGWBucketMetadataHandler : public RGWMetadataHandler {
 
 public:
-  string get_type() { return "bucket"; }
+  string get_type() override { return "bucket"; }
 
-  int get(RGWRados *store, string& entry, RGWMetadataObject **obj) {
+  int get(RGWRados *store, string& entry, RGWMetadataObject **obj) override {
     RGWObjVersionTracker ot;
     RGWBucketEntryPoint be;
 
@@ -1948,7 +1948,7 @@ public:
   }
 
   int put(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker,
-          real_time mtime, JSONObj *obj, sync_type_t sync_type) {
+          real_time mtime, JSONObj *obj, sync_type_t sync_type) override {
     RGWBucketEntryPoint be, old_be;
     try {
       decode_json_obj(be, obj);
@@ -1996,7 +1996,7 @@ public:
     RGWListRawObjsCtx ctx;
   };
 
-  int remove(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker) {
+  int remove(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker) override {
     RGWBucketEntryPoint be;
     RGWObjectCtx obj_ctx(store);
 
@@ -2024,12 +2024,12 @@ public:
     return 0;
   }
 
-  void get_pool_and_oid(RGWRados *store, const string& key, rgw_bucket& bucket, string& oid) {
+  void get_pool_and_oid(RGWRados *store, const string& key, rgw_bucket& bucket, string& oid) override {
     oid = key;
     bucket = store->get_zone_params().domain_root;
   }
 
-  int list_keys_init(RGWRados *store, void **phandle)
+  int list_keys_init(RGWRados *store, void **phandle) override
   {
     list_keys_info *info = new list_keys_info;
 
@@ -2040,7 +2040,7 @@ public:
     return 0;
   }
 
-  int list_keys_next(void *handle, int max, list<string>& keys, bool *truncated) {
+  int list_keys_next(void *handle, int max, list<string>& keys, bool *truncated) override {
     list_keys_info *info = static_cast<list_keys_info *>(handle);
 
     string no_filter;
@@ -2074,7 +2074,7 @@ public:
     return 0;
   }
 
-  void list_keys_complete(void *handle) {
+  void list_keys_complete(void *handle) override {
     list_keys_info *info = static_cast<list_keys_info *>(handle);
     delete info;
   }
@@ -2083,9 +2083,9 @@ public:
 class RGWBucketInstanceMetadataHandler : public RGWMetadataHandler {
 
 public:
-  string get_type() { return "bucket.instance"; }
+  string get_type() override { return "bucket.instance"; }
 
-  int get(RGWRados *store, string& oid, RGWMetadataObject **obj) {
+  int get(RGWRados *store, string& oid, RGWMetadataObject **obj) override {
     RGWBucketCompleteInfo bci;
 
     real_time mtime;
@@ -2103,7 +2103,7 @@ public:
   }
 
   int put(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker,
-          real_time mtime, JSONObj *obj, sync_type_t sync_type) {
+          real_time mtime, JSONObj *obj, sync_type_t sync_type) override {
     RGWBucketCompleteInfo bci, old_bci;
     try {
       decode_json_obj(bci, obj);
@@ -2178,7 +2178,7 @@ public:
     RGWListRawObjsCtx ctx;
   };
 
-  int remove(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker) {
+  int remove(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker) override {
     RGWBucketInfo info;
     RGWObjectCtx obj_ctx(store);
 
@@ -2189,13 +2189,13 @@ public:
     return rgw_bucket_instance_remove_entry(store, entry, &info.objv_tracker);
   }
 
-  void get_pool_and_oid(RGWRados *store, const string& key, rgw_bucket& bucket, string& oid) {
+  void get_pool_and_oid(RGWRados *store, const string& key, rgw_bucket& bucket, string& oid) override {
     oid = RGW_BUCKET_INSTANCE_MD_PREFIX + key;
     rgw_bucket_instance_key_to_oid(oid);
     bucket = store->get_zone_params().domain_root;
   }
 
-  int list_keys_init(RGWRados *store, void **phandle)
+  int list_keys_init(RGWRados *store, void **phandle) override
   {
     list_keys_info *info = new list_keys_info;
 
@@ -2206,7 +2206,7 @@ public:
     return 0;
   }
 
-  int list_keys_next(void *handle, int max, list<string>& keys, bool *truncated) {
+  int list_keys_next(void *handle, int max, list<string>& keys, bool *truncated) override {
     list_keys_info *info = static_cast<list_keys_info *>(handle);
 
     string no_filter;
@@ -2243,7 +2243,7 @@ public:
     return 0;
   }
 
-  void list_keys_complete(void *handle) {
+  void list_keys_complete(void *handle) override {
     list_keys_info *info = static_cast<list_keys_info *>(handle);
     delete info;
   }
@@ -2253,7 +2253,7 @@ public:
    * point, so that the log entries end up at the same log shard, so that we process them
    * in order
    */
-  virtual void get_hash_key(const string& section, const string& key, string& hash_key) {
+  void get_hash_key(const string& section, const string& key, string& hash_key) override {
     string k;
     int pos = key.find(':');
     if (pos < 0)
index eccae8b1a8cba65ad45d63aaf3c1f6e8da9ec4bf..85ad290d02018f7f67293243fde36f46b3771bfb 100644 (file)
@@ -14,7 +14,7 @@ class RGWCompletionManager::WaitContext : public Context {
   void *opaque;
 public:
   WaitContext(RGWCompletionManager *_cm, void *_opaque) : manager(_cm), opaque(_opaque) {}
-  void finish(int r) {
+  void finish(int r) override {
     manager->_wakeup(opaque);
   }
 };
index 607cd6be374e44a814f4fdaca4da839d29e160f1..c3c5a2b749c4fdeb1949fccc72d612d72f51885d 100644 (file)
@@ -213,7 +213,7 @@ public:
     }
   }
 
-  int operate() {
+  int operate() override {
     reenter(this) {
       yield {
        char buf[16];
@@ -292,7 +292,7 @@ public:
     }
   }
 
-  int operate() {
+  int operate() override {
     reenter(this) {
       yield {
        char buf[16];
@@ -349,7 +349,7 @@ public:
                      map<int, RGWDataChangesLogInfo> *_datalog_info) : RGWShardCollectCR(_sync_env->cct, READ_DATALOG_MAX_CONCURRENT),
                                                                  sync_env(_sync_env), num_shards(_num_shards),
                                                                  datalog_info(_datalog_info), shard_id(0) {}
-  bool spawn_next();
+  bool spawn_next() override;
 };
 
 bool RGWReadRemoteDataLogInfoCR::spawn_next() {
@@ -377,7 +377,7 @@ public:
     : RGWSimpleCoroutine(env->store->ctx()), sync_env(env), http_op(NULL),
       shard_id(_shard_id), marker(_marker), max_entries(_max_entries), result(_result) {}
 
-  int send_request() {
+  int send_request() override {
     RGWRESTConn *conn = sync_env->conn;
     RGWRados *store = sync_env->store;
 
@@ -411,7 +411,7 @@ public:
     return 0;
   }
 
-  int request_complete() {
+  int request_complete() override {
     int ret = http_op->wait(result);
     http_op->put();
     if (ret < 0 && ret != -ENOENT) {
@@ -442,7 +442,7 @@ public:
     shards.swap(_shards);
     iter = shards.begin();
   }
-  bool spawn_next();
+  bool spawn_next() override;
 };
 
 bool RGWListRemoteDataLogCR::spawn_next() {
@@ -482,7 +482,7 @@ public:
     sync_status_oid = RGWDataSyncStatusManager::sync_status_oid(sync_env->source_zone);
   }
 
-  int operate() {
+  int operate() override {
     int ret;
     reenter(this) {
       yield {
@@ -713,7 +713,7 @@ public:
     delete entries_index;
   }
 
-  int operate() {
+  int operate() override {
     reenter(this) {
       entries_index = new RGWShardedOmapCRManager(sync_env->async_rados, store, this, num_shards,
                                                  store->get_zone_params().log_pool,
@@ -798,7 +798,7 @@ class RGWDataSyncShardMarkerTrack : public RGWSyncShardMarkerTrack<string, strin
   map<string, string> key_to_marker;
   map<string, string> marker_to_key;
 
-  void handle_finish(const string& marker) {
+  void handle_finish(const string& marker) override {
     map<string, string>::iterator iter = marker_to_key.find(marker);
     if (iter == marker_to_key.end()) {
       return;
@@ -816,7 +816,7 @@ public:
                                                                 marker_oid(_marker_oid),
                                                                 sync_marker(_marker) {}
 
-  RGWCoroutine *store_marker(const string& new_marker, uint64_t index_pos, const real_time& timestamp) {
+  RGWCoroutine *store_marker(const string& new_marker, uint64_t index_pos, const real_time& timestamp) override {
     sync_marker.marker = new_marker;
     sync_marker.pos = index_pos;
 
@@ -900,7 +900,7 @@ public:
     }
   }
 
-  int operate();
+  int operate() override;
 };
 
 class RGWDataSyncSingleEntryCR : public RGWCoroutine {
@@ -934,7 +934,7 @@ public:
     set_description() << "data sync single entry (source_zone=" << sync_env->source_zone << ") key=" <<_raw_key << " entry=" << entry_marker;
   }
 
-  int operate() {
+  int operate() override {
     reenter(this) {
       do {
         yield {
@@ -1099,7 +1099,7 @@ public:
     marker_tracker = mt;
   }
 
-  int operate() {
+  int operate() override {
     int r;
     while (true) {
       switch (sync_marker.state) {
@@ -1353,11 +1353,11 @@ public:
                                                      sync_marker(_marker) {
   }
 
-  RGWCoroutine *alloc_cr() {
+  RGWCoroutine *alloc_cr() override {
     return new RGWDataSyncShardCR(sync_env, pool, shard_id, sync_marker, backoff_ptr());
   }
 
-  RGWCoroutine *alloc_finisher_cr() {
+  RGWCoroutine *alloc_finisher_cr() override {
     RGWRados *store = sync_env->store;
     return new RGWSimpleRadosReadCR<rgw_data_sync_marker>(sync_env->async_rados, store, store->get_zone_params().log_pool,
                                                     RGWDataSyncStatusManager::shard_obj_name(sync_env->source_zone, shard_id), &sync_marker);
@@ -1404,7 +1404,7 @@ public:
     }
   }
 
-  int operate() {
+  int operate() override {
     reenter(this) {
 
       /* read sync status */
@@ -1554,7 +1554,7 @@ public:
                                                       sync_env(_sync_env), num_shards(_num_shards) {
   }
 
-  RGWCoroutine *alloc_cr() {
+  RGWCoroutine *alloc_cr() override {
     return new RGWDataSyncCR(sync_env, num_shards, backoff_ptr());
   }
 
@@ -1731,7 +1731,7 @@ public:
     : RGWCoroutine(_sync_env->cct), sync_env(_sync_env),
       instance_key(bs.get_key()), info(_info) {}
 
-  int operate() {
+  int operate() override {
     reenter(this) {
       yield {
         rgw_http_param_pair pairs[] = { { "type" , "bucket-index" },
@@ -1769,7 +1769,7 @@ public:
       status(_status)
   {}
 
-  int operate() {
+  int operate() override {
     reenter(this) {
       /* fetch current position in logs */
       yield call(new RGWReadRemoteBucketIndexLogInfoCR(sync_env, bs, &info));
@@ -1857,7 +1857,7 @@ public:
     : RGWCoroutine(_sync_env->cct), sync_env(_sync_env),
       oid(RGWBucketSyncStatusManager::status_oid(sync_env->source_zone, bs)),
       status(_status) {}
-  int operate();
+  int operate() override;
 };
 
 int RGWReadBucketSyncStatusCoroutine::operate()
@@ -1975,7 +1975,7 @@ public:
       instance_key(bs.get_key()), marker_position(_marker_position),
       result(_result) {}
 
-  int operate() {
+  int operate() override {
     reenter(this) {
       yield {
         rgw_http_param_pair pairs[] = { { "rgwx-bucket-instance", instance_key.c_str() },
@@ -2011,7 +2011,7 @@ public:
     : RGWCoroutine(_sync_env->cct), sync_env(_sync_env),
       instance_key(bs.get_key()), marker(_marker), result(_result) {}
 
-  int operate() {
+  int operate() override {
     reenter(this) {
       yield {
         rgw_http_param_pair pairs[] = { { "bucket-instance", instance_key.c_str() },
@@ -2047,7 +2047,7 @@ public:
                                                                 marker_oid(_marker_oid),
                                                                 sync_marker(_marker) {}
 
-  RGWCoroutine *store_marker(const rgw_obj_key& new_marker, uint64_t index_pos, const real_time& timestamp) {
+  RGWCoroutine *store_marker(const rgw_obj_key& new_marker, uint64_t index_pos, const real_time& timestamp) override {
     sync_marker.position = new_marker;
     sync_marker.count = index_pos;
 
@@ -2071,7 +2071,7 @@ class RGWBucketIncSyncShardMarkerTrack : public RGWSyncShardMarkerTrack<string,
   map<rgw_obj_key, string> key_to_marker;
   map<string, rgw_obj_key> marker_to_key;
 
-  void handle_finish(const string& marker) {
+  void handle_finish(const string& marker) override {
     map<string, rgw_obj_key>::iterator iter = marker_to_key.find(marker);
     if (iter == marker_to_key.end()) {
       return;
@@ -2089,7 +2089,7 @@ public:
                                                                 marker_oid(_marker_oid),
                                                                 sync_marker(_marker) {}
 
-  RGWCoroutine *store_marker(const string& new_marker, uint64_t index_pos, const real_time& timestamp) {
+  RGWCoroutine *store_marker(const string& new_marker, uint64_t index_pos, const real_time& timestamp) override {
     sync_marker.position = new_marker;
 
     map<string, bufferlist> attrs;
@@ -2185,7 +2185,7 @@ public:
     data_sync_module = sync_env->sync_module->get_data_handler();
   }
 
-  int operate() {
+  int operate() override {
     reenter(this) {
       /* skip entries that are not complete */
       if (op_state != CLS_RGW_STATE_COMPLETE) {
@@ -2302,7 +2302,7 @@ public:
     logger.init(sync_env, "BucketFull", bs.get_key());
   }
 
-  int operate();
+  int operate() override;
 };
 
 int RGWBucketShardFullSyncCR::operate()
@@ -2450,7 +2450,7 @@ public:
     logger.init(sync_env, "BucketInc", bs.get_key());
   }
 
-  int operate();
+  int operate() override;
 };
 
 int RGWBucketShardIncrementalSyncCR::operate()
@@ -3045,7 +3045,7 @@ class DataLogTrimPollCR : public RGWCoroutine {
       last_trim(num_shards)
   {}
 
-  int operate();
+  int operate() override;
 };
 
 int DataLogTrimPollCR::operate()
index b8cbcb5ae160661723402e59bcf9a478d0c6dd0b..a6b60ffe5bbe8c8bbfb332dbf0dc863f47250fc1 100644 (file)
@@ -98,7 +98,7 @@ class UsageLogger {
     UsageLogger *logger;
   public:
     explicit C_UsageLogTimeout(UsageLogger *_l) : logger(_l) {}
-    void finish(int r) {
+    void finish(int r) override {
       logger->flush();
       logger->set_timer();
     }
index 437f68e2de76e40741e8f00a3609e576b0b570f3..793ed27afa6a2d0ba3a30b5ddf2dd1970a185059 100644 (file)
@@ -149,7 +149,7 @@ static void check_curl()
 class C_InitTimeout : public Context {
 public:
   C_InitTimeout() {}
-  void finish(int r) {
+  void finish(int r) override {
     derr << "Initialization timeout, failed to initialize" << dendl;
     exit(1);
   }
index 57568873b413898979ee9910721a7d137bd7a540..5c65bcb869d619ed9e51a5d4fc5a22e9be24f550 100644 (file)
@@ -274,17 +274,17 @@ class RGWMetadataTopHandler : public RGWMetadataHandler {
 public:
   RGWMetadataTopHandler() {}
 
-  virtual string get_type() { return string(); }
+  string get_type() override { return string(); }
 
-  virtual int get(RGWRados *store, string& entry, RGWMetadataObject **obj) { return -ENOTSUP; }
-  virtual int put(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker,
-                  real_time mtime, JSONObj *obj, sync_type_t sync_type) { return -ENOTSUP; }
+  int get(RGWRados *store, string& entry, RGWMetadataObject **obj) override { return -ENOTSUP; }
+  int put(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker,
+                  real_time mtime, JSONObj *obj, sync_type_t sync_type) override { return -ENOTSUP; }
 
-  virtual void get_pool_and_oid(RGWRados *store, const string& key, rgw_bucket& bucket, string& oid) {}
+  void get_pool_and_oid(RGWRados *store, const string& key, rgw_bucket& bucket, string& oid) override {}
 
-  virtual int remove(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker) { return -ENOTSUP; }
+  int remove(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker) override { return -ENOTSUP; }
 
-  virtual int list_keys_init(RGWRados *store, void **phandle) {
+  int list_keys_init(RGWRados *store, void **phandle) override {
     iter_data *data = new iter_data;
     store->meta_mgr->get_sections(data->sections);
     data->iter = data->sections.begin();
@@ -293,7 +293,7 @@ public:
 
     return 0;
   }
-  virtual int list_keys_next(void *handle, int max, list<string>& keys, bool *truncated)  {
+  int list_keys_next(void *handle, int max, list<string>& keys, bool *truncated) override  {
     iter_data *data = static_cast<iter_data *>(handle);
     for (int i = 0; i < max && data->iter != data->sections.end(); ++i, ++(data->iter)) {
       keys.push_back(*data->iter);
@@ -303,7 +303,7 @@ public:
 
     return 0;
   }
-  virtual void list_keys_complete(void *handle) {
+  void list_keys_complete(void *handle) override {
     iter_data *data = static_cast<iter_data *>(handle);
 
     delete data;
index dd7fc693c2a82b149a1245e986311eb4f3c12810..6cf90893320803523c05f09bb9d2e067428fd857 100644 (file)
@@ -62,7 +62,7 @@ static int forward_request_to_master(struct req_state *s, obj_version *objv, RGW
 class MultipartMetaFilter : public RGWAccessListFilter {
 public:
   MultipartMetaFilter() {}
-  bool filter(string& name, string& key) {
+  bool filter(string& name, string& key) override {
     int len = name.size();
     if (len < 6)
       return false;
@@ -2576,14 +2576,14 @@ class RGWPutObjProcessor_Multipart : public RGWPutObjProcessor_Atomic
   string upload_id;
 
 protected:
-  int prepare(RGWRados *store, string *oid_rand);
+  int prepare(RGWRados *store, string *oid_rand) override;
   int do_complete(size_t accounted_size, const string& etag, real_time *mtime,
                   real_time set_mtime, map<string, bufferlist>& attrs,
                   real_time delete_at, const char *if_match,
                   const char *if_nomatch) override;
 
 public:
-  bool immutable_head() { return true; }
+  bool immutable_head() override { return true; }
   RGWPutObjProcessor_Multipart(RGWObjectCtx& obj_ctx, RGWBucketInfo& bucket_info, uint64_t _p, req_state *_s) :
                    RGWPutObjProcessor_Atomic(obj_ctx, bucket_info, _s->bucket, _s->object.name, _p, _s->req_id, false), s(_s) {}
 };
@@ -2757,9 +2757,9 @@ class RGWPutObj_CB : public RGWGetDataCB
   RGWPutObj *op;
 public:
   RGWPutObj_CB(RGWPutObj *_op) : op(_op) {}
-  virtual ~RGWPutObj_CB() {}
+  ~RGWPutObj_CB() {}
 
-  int handle_data(bufferlist& bl, off_t bl_ofs, off_t bl_len) {
+  int handle_data(bufferlist& bl, off_t bl_ofs, off_t bl_len) override {
     return op->get_data_cb(bl, bl_ofs, bl_len);
   }
 };
index de5d97ae3dddd0c43fcfbdb9361c8ec7c9a85610..b242142ed32afcb3c788c4d1b5cf88fc2d9b6a33 100644 (file)
@@ -47,7 +47,7 @@ public:
 
 class RGWPolicyCondition_StrEqual : public RGWPolicyCondition {
 protected:
-  bool check(const string& first, const string& second, string& msg) {
+  bool check(const string& first, const string& second, string& msg) override {
     bool ret = first.compare(second) == 0;
     if (!ret) {
       msg = "Policy condition failed: eq";
@@ -58,7 +58,7 @@ protected:
 
 class RGWPolicyCondition_StrStartsWith : public RGWPolicyCondition {
 protected:
-  bool check(const string& first, const string& second, string& msg) {
+  bool check(const string& first, const string& second, string& msg) override {
     bool ret = first.compare(0, second.size(), second) == 0;
     if (!ret) {
       msg = "Policy condition failed: starts-with";
index c364c27cbcaeaa4b23f44dbbdab7660a6437e5d1..d1dd9e812c278b5643b9a75d836fc9eac19beeff 100644 (file)
@@ -49,7 +49,7 @@ protected:
     uint64_t removed_bytes;
   public:
     StatsAsyncTestSet() : objs_delta(0), added_bytes(0), removed_bytes(0) {}
-    bool update(RGWQuotaCacheStats *entry) {
+    bool update(RGWQuotaCacheStats *entry) override {
       if (entry->async_refresh_time.sec() == 0)
         return false;
 
@@ -258,9 +258,9 @@ public:
                                       RGWQuotaCache<rgw_bucket>::AsyncRefreshHandler(_store, _cache),
                                       RGWGetBucketStats_CB(_bucket), user(_user) {}
 
-  void drop_reference() { put(); }
-  void handle_response(int r);
-  int init_fetch();
+  void drop_reference() override { put(); }
+  void handle_response(int r) override;
+  int init_fetch() override;
 };
 
 int BucketAsyncRefreshHandler::init_fetch()
@@ -300,25 +300,25 @@ void BucketAsyncRefreshHandler::handle_response(const int r)
 
 class RGWBucketStatsCache : public RGWQuotaCache<rgw_bucket> {
 protected:
-  bool map_find(const rgw_user& user, rgw_bucket& bucket, RGWQuotaCacheStats& qs) {
+  bool map_find(const rgw_user& user, rgw_bucket& bucket, RGWQuotaCacheStats& qs) override {
     return stats_map.find(bucket, qs);
   }
 
-  bool map_find_and_update(const rgw_user& user, rgw_bucket& bucket, lru_map<rgw_bucket, RGWQuotaCacheStats>::UpdateContext *ctx) {
+  bool map_find_and_update(const rgw_user& user, rgw_bucket& bucket, lru_map<rgw_bucket, RGWQuotaCacheStats>::UpdateContext *ctx) override {
     return stats_map.find_and_update(bucket, NULL, ctx);
   }
 
-  void map_add(const rgw_user& user, rgw_bucket& bucket, RGWQuotaCacheStats& qs) {
+  void map_add(const rgw_user& user, rgw_bucket& bucket, RGWQuotaCacheStats& qs) override {
     stats_map.add(bucket, qs);
   }
 
-  int fetch_stats_from_storage(const rgw_user& user, rgw_bucket& bucket, RGWStorageStats& stats);
+  int fetch_stats_from_storage(const rgw_user& user, rgw_bucket& bucket, RGWStorageStats& stats) override;
 
 public:
   explicit RGWBucketStatsCache(RGWRados *_store) : RGWQuotaCache<rgw_bucket>(_store, _store->ctx()->_conf->rgw_bucket_quota_cache_size) {
   }
 
-  AsyncRefreshHandler *allocate_refresh_handler(const rgw_user& user, rgw_bucket& bucket) {
+  AsyncRefreshHandler *allocate_refresh_handler(const rgw_user& user, rgw_bucket& bucket) override {
     return new BucketAsyncRefreshHandler(store, this, user, bucket);
   }
 };
@@ -362,9 +362,9 @@ public:
                           RGWGetUserStats_CB(_user),
                           bucket(_bucket) {}
 
-  void drop_reference() { put(); }
-  int init_fetch();
-  void handle_response(int r);
+  void drop_reference() override { put(); }
+  int init_fetch() override;
+  void handle_response(int r) override;
 };
 
 int UserAsyncRefreshHandler::init_fetch()
@@ -407,7 +407,7 @@ class RGWUserStatsCache : public RGWQuotaCache<rgw_user> {
 
     BucketsSyncThread(CephContext *_cct, RGWUserStatsCache *_s) : cct(_cct), stats(_s), lock("RGWUserStatsCache::BucketsSyncThread") {}
 
-    void *entry() {
+    void *entry() override {
       ldout(cct, 20) << "BucketsSyncThread: start" << dendl;
       do {
         map<rgw_bucket, rgw_user> buckets;
@@ -459,7 +459,7 @@ class RGWUserStatsCache : public RGWQuotaCache<rgw_user> {
 
     UserSyncThread(CephContext *_cct, RGWUserStatsCache *_s) : cct(_cct), stats(_s), lock("RGWUserStatsCache::UserSyncThread") {}
 
-    void *entry() {
+    void *entry() override {
       ldout(cct, 20) << "UserSyncThread: start" << dendl;
       do {
         int ret = stats->sync_all_users();
@@ -485,24 +485,24 @@ class RGWUserStatsCache : public RGWQuotaCache<rgw_user> {
   BucketsSyncThread *buckets_sync_thread;
   UserSyncThread *user_sync_thread;
 protected:
-  bool map_find(const rgw_user& user, rgw_bucket& bucket, RGWQuotaCacheStats& qs) {
+  bool map_find(const rgw_user& user, rgw_bucket& bucket, RGWQuotaCacheStats& qs) override {
     return stats_map.find(user, qs);
   }
 
-  bool map_find_and_update(const rgw_user& user, rgw_bucket& bucket, lru_map<rgw_user, RGWQuotaCacheStats>::UpdateContext *ctx) {
+  bool map_find_and_update(const rgw_user& user, rgw_bucket& bucket, lru_map<rgw_user, RGWQuotaCacheStats>::UpdateContext *ctx) override {
     return stats_map.find_and_update(user, NULL, ctx);
   }
 
-  void map_add(const rgw_user& user, rgw_bucket& bucket, RGWQuotaCacheStats& qs) {
+  void map_add(const rgw_user& user, rgw_bucket& bucket, RGWQuotaCacheStats& qs) override {
     stats_map.add(user, qs);
   }
 
-  int fetch_stats_from_storage(const rgw_user& user, rgw_bucket& bucket, RGWStorageStats& stats);
+  int fetch_stats_from_storage(const rgw_user& user, rgw_bucket& bucket, RGWStorageStats& stats) override;
   int sync_bucket(const rgw_user& rgw_user, rgw_bucket& bucket);
   int sync_user(const rgw_user& user);
   int sync_all_users();
 
-  void data_modified(const rgw_user& user, rgw_bucket& bucket);
+  void data_modified(const rgw_user& user, rgw_bucket& bucket) override;
 
   void swap_modified_buckets(map<rgw_bucket, rgw_user>& out) {
     rwlock.get_write();
@@ -539,11 +539,11 @@ public:
     stop();
   }
 
-  AsyncRefreshHandler *allocate_refresh_handler(const rgw_user& user, rgw_bucket& bucket) {
+  AsyncRefreshHandler *allocate_refresh_handler(const rgw_user& user, rgw_bucket& bucket) override {
     return new UserAsyncRefreshHandler(store, this, user, bucket);
   }
 
-  bool can_use_cached_stats(RGWQuotaInfo& quota, RGWStorageStats& stats) {
+  bool can_use_cached_stats(RGWQuotaInfo& quota, RGWStorageStats& stats) override {
     /* in the user case, the cached stats may contain a better estimation of the totals, as
      * the backend is only periodically getting updated.
      */
@@ -697,28 +697,28 @@ public:
 
 class RGWQuotaInfoDefApplier : public RGWQuotaInfoApplier {
 public:
-  virtual bool is_size_exceeded(const char * const entity,
+  bool is_size_exceeded(const char * const entity,
                                 const RGWQuotaInfo& qinfo,
                                 const RGWStorageStats& stats,
-                                const uint64_t size) const;
+                                const uint64_t size) const override;
 
-  virtual bool is_num_objs_exceeded(const char * const entity,
+  bool is_num_objs_exceeded(const char * const entity,
                                     const RGWQuotaInfo& qinfo,
                                     const RGWStorageStats& stats,
-                                    const uint64_t num_objs) const;
+                                    const uint64_t num_objs) const override;
 };
 
 class RGWQuotaInfoRawApplier : public RGWQuotaInfoApplier {
 public:
-  virtual bool is_size_exceeded(const char * const entity,
+  bool is_size_exceeded(const char * const entity,
                                 const RGWQuotaInfo& qinfo,
                                 const RGWStorageStats& stats,
-                                const uint64_t size) const;
+                                const uint64_t size) const override;
 
-  virtual bool is_num_objs_exceeded(const char * const entity,
+  bool is_num_objs_exceeded(const char * const entity,
                                     const RGWQuotaInfo& qinfo,
                                     const RGWStorageStats& stats,
-                                    const uint64_t num_objs) const;
+                                    const uint64_t num_objs) const override;
 };
 
 
@@ -860,7 +860,7 @@ public:
                                     bucket_stats_cache(_store),
                                     user_stats_cache(_store, quota_threads) {}
 
-  virtual int check_quota(const rgw_user& user,
+  int check_quota(const rgw_user& user,
                           rgw_bucket& bucket,
                           RGWQuotaInfo& user_quota,
                           RGWQuotaInfo& bucket_quota,
@@ -905,7 +905,7 @@ public:
     return 0;
   }
 
-  virtual void update_stats(const rgw_user& user, rgw_bucket& bucket, int obj_delta, uint64_t added_bytes, uint64_t removed_bytes) {
+  void update_stats(const rgw_user& user, rgw_bucket& bucket, int obj_delta, uint64_t added_bytes, uint64_t removed_bytes) override {
     bucket_stats_cache.adjust_stats(user, bucket, obj_delta, added_bytes, removed_bytes);
     user_stats_cache.adjust_stats(user, bucket, obj_delta, added_bytes, removed_bytes);
   }
index 45ffb6d5beb5c4877c286254d99066c8bd8de309..3885143762381566201b6de610e7911ea2a57277 100644 (file)
@@ -2640,7 +2640,7 @@ class RGWWatcher : public librados::WatchCtx2 {
     RGWWatcher *watcher;
     public:
       explicit C_ReinitWatch(RGWWatcher *_watcher) : watcher(_watcher) {}
-      void finish(int r) {
+      void finish(int r) override {
         watcher->reinit();
       }
   };
@@ -2649,7 +2649,7 @@ public:
   void handle_notify(uint64_t notify_id,
                     uint64_t cookie,
                     uint64_t notifier_id,
-                    bufferlist& bl) {
+                    bufferlist& bl) override {
     ldout(rados->ctx(), 10) << "RGWWatcher::handle_notify() "
                            << " notify_id " << notify_id
                            << " cookie " << cookie
@@ -2660,7 +2660,7 @@ public:
     bufferlist reply_bl; // empty reply payload
     rados->control_pool_ctx.notify_ack(oid, notify_id, cookie, reply_bl);
   }
-  void handle_error(uint64_t cookie, int err) {
+  void handle_error(uint64_t cookie, int err) override {
     lderr(rados->ctx()) << "RGWWatcher::handle_error cookie " << cookie
                        << " err " << cpp_strerror(err) << dendl;
     rados->remove_watcher(index);
@@ -2832,7 +2832,7 @@ class RGWRadosThread {
 
   public:
     Worker(CephContext *_cct, RGWRadosThread *_p) : cct(_cct), processor(_p), lock("RGWRadosThread::Worker") {}
-    void *entry();
+    void *entry() override;
     void stop() {
       Mutex::Locker l(lock);
       cond.Signal();
@@ -2928,14 +2928,14 @@ class RGWMetaNotifier : public RGWRadosThread {
   RGWMetaNotifierManager notify_mgr;
   RGWMetadataLog *const log;
 
-  uint64_t interval_msec() {
+  uint64_t interval_msec() override {
     return cct->_conf->rgw_md_notify_interval_msec;
   }
 public:
   RGWMetaNotifier(RGWRados *_store, RGWMetadataLog* log)
     : RGWRadosThread(_store), notify_mgr(_store), log(log) {}
 
-  int process();
+  int process() override;
 };
 
 int RGWMetaNotifier::process()
@@ -2960,13 +2960,13 @@ int RGWMetaNotifier::process()
 class RGWDataNotifier : public RGWRadosThread {
   RGWDataNotifierManager notify_mgr;
 
-  uint64_t interval_msec() {
+  uint64_t interval_msec() override {
     return cct->_conf->rgw_md_notify_interval_msec;
   }
 public:
   RGWDataNotifier(RGWRados *_store) : RGWRadosThread(_store), notify_mgr(_store) {}
 
-  int process();
+  int process() override;
 };
 
 int RGWDataNotifier::process()
@@ -2995,19 +2995,19 @@ int RGWDataNotifier::process()
 class RGWSyncProcessorThread : public RGWRadosThread {
 public:
   RGWSyncProcessorThread(RGWRados *_store) : RGWRadosThread(_store) {}
-  virtual ~RGWSyncProcessorThread() {}
-  virtual int init() = 0 ;
-  virtual int process() = 0;
+  ~RGWSyncProcessorThread() {}
+  int init() override = 0 ;
+  int process() override = 0;
 };
 
 class RGWMetaSyncProcessorThread : public RGWSyncProcessorThread
 {
   RGWMetaSyncStatusManager sync;
 
-  uint64_t interval_msec() {
+  uint64_t interval_msec() override {
     return 0; /* no interval associated, it'll run once until stopped */
   }
-  void stop_process() {
+  void stop_process() override {
     sync.stop();
   }
 public:
@@ -3021,7 +3021,7 @@ public:
   }
   RGWMetaSyncStatusManager* get_manager() { return &sync; }
 
-  int init() {
+  int init() override {
     int ret = sync.init();
     if (ret < 0) {
       ldout(store->ctx(), 0) << "ERROR: sync.init() returned " << ret << dendl;
@@ -3030,7 +3030,7 @@ public:
     return 0;
   }
 
-  int process() {
+  int process() override {
     sync.run();
     return 0;
   }
@@ -3041,7 +3041,7 @@ class RGWDataSyncProcessorThread : public RGWSyncProcessorThread
   RGWDataSyncStatusManager sync;
   bool initialized;
 
-  uint64_t interval_msec() {
+  uint64_t interval_msec() override {
     if (initialized) {
       return 0; /* no interval associated, it'll run once until stopped */
     } else {
@@ -3049,7 +3049,7 @@ class RGWDataSyncProcessorThread : public RGWSyncProcessorThread
       return DATA_SYNC_INIT_WAIT_SEC * 1000;
     }
   }
-  void stop_process() {
+  void stop_process() override {
     sync.stop();
   }
 public:
@@ -3065,11 +3065,11 @@ public:
   }
   RGWDataSyncStatusManager* get_manager() { return &sync; }
 
-  int init() {
+  int init() override {
     return 0;
   }
 
-  int process() {
+  int process() override {
     while (!initialized) {
       if (going_down()) {
         return 0;
@@ -6767,7 +6767,7 @@ public:
                        progress_data(_progress_data),
                        extra_data_len(0),
                        data_len(0) {}
-  int handle_data(bufferlist& bl, off_t ofs, off_t len) {
+  int handle_data(bufferlist& bl, off_t ofs, off_t len) override {
     if (progress_cb) {
       progress_cb(ofs, progress_data);
     }
@@ -6826,7 +6826,7 @@ public:
 
   bufferlist& get_extra_data() { return extra_data_bl; }
 
-  void set_extra_data_len(uint64_t len) {
+  void set_extra_data_len(uint64_t len) override {
     extra_data_len = len;
   }
 
@@ -6972,7 +6972,7 @@ class RGWGetExtraDataCB : public RGWGetDataCB {
   bufferlist extra_data;
 public:
   RGWGetExtraDataCB() {}
-  int handle_data(bufferlist& bl, off_t bl_ofs, off_t bl_len) {
+  int handle_data(bufferlist& bl, off_t bl_ofs, off_t bl_len) override {
     if (extra_data.length() < extra_data_len) {
       off_t max = extra_data_len - extra_data.length();
       if (max > bl_len) {
@@ -9700,7 +9700,7 @@ struct get_obj_data : public RefCountedObject {
       total_read(0), lock("get_obj_data"), data_lock("get_obj_data::data_lock"),
       client_cb(NULL),
       throttle(cct, "get_obj_data", cct->_conf->rgw_get_obj_window_size, false) {}
-  virtual ~get_obj_data() { } 
+  ~get_obj_data() { } 
   void set_cancelled(int r) {
     cancelled.set(1);
     err_code.set(r);
@@ -10983,7 +10983,7 @@ public:
     : cb(_cb), pendings(_pendings), stats(), ret_code(0), should_cb(true),
     lock("RGWGetBucketStatsContext") {}
 
-  void handle_response(int r, rgw_bucket_dir_header& header) {
+  void handle_response(int r, rgw_bucket_dir_header& header) override {
     Mutex::Locker l(lock);
     if (should_cb) {
       if ( r >= 0) {
@@ -11039,7 +11039,7 @@ public:
   explicit RGWGetUserStatsContext(RGWGetUserStats_CB * const cb)
     : cb(cb) {}
 
-  void handle_response(int r, cls_user_header& header) {
+  void handle_response(int r, cls_user_header& header) override {
     const cls_user_stats& hs = header.stats;
     if (r >= 0) {
       RGWStorageStats stats;
@@ -11580,7 +11580,7 @@ struct RGWAccessListFilterPrefix : public RGWAccessListFilter {
   string prefix;
 
   explicit RGWAccessListFilterPrefix(const string& _prefix) : prefix(_prefix) {}
-  virtual bool filter(string& name, string& key) {
+  bool filter(string& name, string& key) override {
     return (prefix.compare(key.substr(0, prefix.size())) == 0);
   }
 };
index 4edf347742b8516b158d28128af68844f77d11da..a1d178317982ce6536eb83bf4022e3a6ebac6cfc 100644 (file)
@@ -41,7 +41,7 @@ class RGWRealmReloader::C_Reload : public Context {
   RGWRealmReloader* reloader;
  public:
   C_Reload(RGWRealmReloader* reloader) : reloader(reloader) {}
-  void finish(int r) { reloader->reload(); }
+  void finish(int r) override { reloader->reload(); }
 };
 
 void RGWRealmReloader::handle_notify(RGWRealmNotify type,
index bf14b1ee52e8bc24ecdf4199ae913b9d45c967dc..62252ca6cc3a5290b9a910a7f228da84b3e54ba2 100644 (file)
@@ -14,13 +14,13 @@ class RGWOp_Bucket_Info : public RGWRESTOp {
 public:
   RGWOp_Bucket_Info() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("buckets", RGW_CAP_READ);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "get_bucket_info"; }
+  const string name() override { return "get_bucket_info"; }
 };
 
 void RGWOp_Bucket_Info::execute()
@@ -51,13 +51,13 @@ class RGWOp_Get_Policy : public RGWRESTOp {
 public:
   RGWOp_Get_Policy() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("buckets", RGW_CAP_READ);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "get_policy"; }
+  const string name() override { return "get_policy"; }
 };
 
 void RGWOp_Get_Policy::execute()
@@ -81,13 +81,13 @@ class RGWOp_Check_Bucket_Index : public RGWRESTOp {
 public:
   RGWOp_Check_Bucket_Index() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("buckets", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "check_bucket_index"; }
+  const string name() override { return "check_bucket_index"; }
 };
 
 void RGWOp_Check_Bucket_Index::execute()
@@ -115,13 +115,13 @@ class RGWOp_Bucket_Link : public RGWRESTOp {
 public:
   RGWOp_Bucket_Link() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("buckets", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "link_bucket"; }
+  const string name() override { return "link_bucket"; }
 };
 
 void RGWOp_Bucket_Link::execute()
@@ -149,13 +149,13 @@ class RGWOp_Bucket_Unlink : public RGWRESTOp {
 public:
   RGWOp_Bucket_Unlink() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("buckets", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "unlink_bucket"; }
+  const string name() override { return "unlink_bucket"; }
 };
 
 void RGWOp_Bucket_Unlink::execute()
@@ -181,13 +181,13 @@ class RGWOp_Bucket_Remove : public RGWRESTOp {
 public:
   RGWOp_Bucket_Remove() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("buckets", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "remove_bucket"; }
+  const string name() override { return "remove_bucket"; }
 };
 
 void RGWOp_Bucket_Remove::execute()
@@ -211,13 +211,13 @@ class RGWOp_Object_Remove: public RGWRESTOp {
 public:
   RGWOp_Object_Remove() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("buckets", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "remove_object"; }
+  const string name() override { return "remove_object"; }
 };
 
 void RGWOp_Object_Remove::execute()
index f02b17a97a569a7a210b0ba8513e0da10317f750..907640a98403eea7cb53d1e296fbc5bbd3969ae6 100644 (file)
@@ -319,7 +319,7 @@ class RGWRESTStreamOutCB : public RGWGetDataCB {
   RGWRESTStreamWriteRequest *req;
 public:
   explicit RGWRESTStreamOutCB(RGWRESTStreamWriteRequest *_req) : req(_req) {}
-  int handle_data(bufferlist& bl, off_t bl_ofs, off_t bl_len); /* callback for object iteration when sending data */
+  int handle_data(bufferlist& bl, off_t bl_ofs, off_t bl_len) override; /* callback for object iteration when sending data */
 };
 
 int RGWRESTStreamOutCB::handle_data(bufferlist& bl, off_t bl_ofs, off_t bl_len)
@@ -797,7 +797,7 @@ class StreamIntoBufferlist : public RGWGetDataCB {
   bufferlist& bl;
 public:
   StreamIntoBufferlist(bufferlist& _bl) : bl(_bl) {}
-  int handle_data(bufferlist& inbl, off_t bl_ofs, off_t bl_len) {
+  int handle_data(bufferlist& inbl, off_t bl_ofs, off_t bl_len) override {
     bl.claim_append(inbl);
     return bl_len;
   }
index 99fd60b1d06f9309cb3c98a25975849a6786844f..b4cde344c8ed212cf8bc2fefd0d799c20e0e3be9 100644 (file)
@@ -242,7 +242,7 @@ public:
   int verify_permission() override { return 0; }
   void execute() override;
   void send_response() override;
-  const string name() { return "get_realm"; }
+  const string name() override { return "get_realm"; }
 };
 
 void RGWOp_Realm_Get::execute()
@@ -277,7 +277,7 @@ void RGWOp_Realm_Get::send_response()
 
 class RGWHandler_Realm : public RGWHandler_Auth_S3 {
 protected:
-  RGWOp *op_get() { return new RGWOp_Realm_Get; }
+  RGWOp *op_get() override { return new RGWOp_Realm_Get; }
 };
 
 RGWRESTMgr_Realm::RGWRESTMgr_Realm()
index 7acaab32d5fa8f0b54fd5b91a563af304fdbb3a7..0174c123fae48df5db4ef5bea0b588329ec088ac 100644 (file)
@@ -698,7 +698,7 @@ void RGWGetBucketVersioning_ObjStore_S3::send_response()
 
 class RGWSetBucketVersioningParser : public RGWXMLParser
 {
-  XMLObj *alloc_obj(const char *el) {
+  XMLObj *alloc_obj(const char *el) override {
     return new XMLObj;
   }
 
@@ -901,7 +901,7 @@ class RGWLocationConstraint : public XMLObj
 public:
   RGWLocationConstraint() {}
   ~RGWLocationConstraint() {}
-  bool xml_end(const char *el) {
+  bool xml_end(const char *el) override {
     if (!el)
       return false;
 
@@ -922,7 +922,7 @@ public:
 
 class RGWCreateBucketParser : public RGWXMLParser
 {
-  XMLObj *alloc_obj(const char *el) {
+  XMLObj *alloc_obj(const char *el) override {
     return new XMLObj;
   }
 
@@ -2545,7 +2545,7 @@ void RGWGetRequestPayment_ObjStore_S3::send_response()
 
 class RGWSetRequestPaymentParser : public RGWXMLParser
 {
-  XMLObj *alloc_obj(const char *el) {
+  XMLObj *alloc_obj(const char *el) override {
     return new XMLObj;
   }
 
index 6073429256aeb55ec36e8087f35f50d2a3247a8d..ea4430e3c11c37e1dfb0395bd3b8448bae01bf83 100644 (file)
@@ -14,12 +14,12 @@ class RGWOp_Usage_Get : public RGWRESTOp {
 public:
   RGWOp_Usage_Get() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("usage", RGW_CAP_READ);
   }
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "get_usage"; }
+  const string name() override { return "get_usage"; }
 };
 
 void RGWOp_Usage_Get::execute() {
@@ -58,12 +58,12 @@ class RGWOp_Usage_Delete : public RGWRESTOp {
 public:
   RGWOp_Usage_Delete() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("usage", RGW_CAP_WRITE);
   }
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "trim_usage"; }
+  const string name() override { return "trim_usage"; }
 };
 
 void RGWOp_Usage_Delete::execute() {
index ec869d6638d13b1eeaa5841ba106a017779d325d..e92cef009c5289a85c95f17f284863f66cf44daf 100644 (file)
@@ -17,13 +17,13 @@ class RGWOp_User_Info : public RGWRESTOp {
 public:
   RGWOp_User_Info() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("users", RGW_CAP_READ);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "get_user_info"; }
+  const string name() override { return "get_user_info"; }
 };
 
 void RGWOp_User_Info::execute()
@@ -58,13 +58,13 @@ class RGWOp_User_Create : public RGWRESTOp {
 public:
   RGWOp_User_Create() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("users", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "create_user"; }
+  const string name() override { return "create_user"; }
 };
 
 void RGWOp_User_Create::execute()
@@ -191,13 +191,13 @@ class RGWOp_User_Modify : public RGWRESTOp {
 public:
   RGWOp_User_Modify() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("users", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "modify_user"; }
+  const string name() override { return "modify_user"; }
 };
 
 void RGWOp_User_Modify::execute()
@@ -287,13 +287,13 @@ class RGWOp_User_Remove : public RGWRESTOp {
 public:
   RGWOp_User_Remove() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("users", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "remove_user"; }
+  const string name() override { return "remove_user"; }
 };
 
 void RGWOp_User_Remove::execute()
@@ -322,13 +322,13 @@ class RGWOp_Subuser_Create : public RGWRESTOp {
 public:
   RGWOp_Subuser_Create() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("users", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "create_subuser"; }
+  const string name() override { return "create_subuser"; }
 };
 
 void RGWOp_Subuser_Create::execute()
@@ -401,13 +401,13 @@ class RGWOp_Subuser_Modify : public RGWRESTOp {
 public:
   RGWOp_Subuser_Modify() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("users", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "modify_subuser"; }
+  const string name() override { return "modify_subuser"; }
 };
 
 void RGWOp_Subuser_Modify::execute()
@@ -466,13 +466,13 @@ class RGWOp_Subuser_Remove : public RGWRESTOp {
 public:
   RGWOp_Subuser_Remove() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("users", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "remove_subuser"; }
+  const string name() override { return "remove_subuser"; }
 };
 
 void RGWOp_Subuser_Remove::execute()
@@ -507,13 +507,13 @@ class RGWOp_Key_Create : public RGWRESTOp {
 public:
   RGWOp_Key_Create() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("users", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "create_access_key"; }
+  const string name() override { return "create_access_key"; }
 };
 
 void RGWOp_Key_Create::execute()
@@ -571,13 +571,13 @@ class RGWOp_Key_Remove : public RGWRESTOp {
 public:
   RGWOp_Key_Remove() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("users", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "remove_access_key"; }
+  const string name() override { return "remove_access_key"; }
 };
 
 void RGWOp_Key_Remove::execute()
@@ -624,13 +624,13 @@ class RGWOp_Caps_Add : public RGWRESTOp {
 public:
   RGWOp_Caps_Add() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("users", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "add_user_caps"; }
+  const string name() override { return "add_user_caps"; }
 };
 
 void RGWOp_Caps_Add::execute()
@@ -660,13 +660,13 @@ class RGWOp_Caps_Remove : public RGWRESTOp {
 public:
   RGWOp_Caps_Remove() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("users", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "remove_user_caps"; }
+  const string name() override { return "remove_user_caps"; }
 };
 
 void RGWOp_Caps_Remove::execute()
@@ -715,13 +715,13 @@ class RGWOp_Quota_Info : public RGWRESTOp {
 public:
   RGWOp_Quota_Info() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("users", RGW_CAP_READ);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "get_quota_info"; }
+  const string name() override { return "get_quota_info"; }
 };
 
 
@@ -782,13 +782,13 @@ class RGWOp_Quota_Set : public RGWRESTOp {
 public:
   RGWOp_Quota_Set() {}
 
-  int check_caps(RGWUserCaps& caps) {
+  int check_caps(RGWUserCaps& caps) override {
     return caps.check_cap("users", RGW_CAP_WRITE);
   }
 
-  void execute();
+  void execute() override;
 
-  virtual const string name() { return "set_quota_info"; }
+  const string name() override { return "set_quota_info"; }
 };
 
 /**
index d7d83eb659a7d101df67b362fa7adc4fccc0115b..e6da6e8c88086540b6cf99d8b3df33db20932517 100644 (file)
@@ -195,7 +195,7 @@ public:
                                                                  sync_env(_sync_env),
                                                                  period(period), num_shards(_num_shards),
                                                                  mdlog_info(_mdlog_info), shard_id(0) {}
-  bool spawn_next();
+  bool spawn_next() override;
 };
 
 class RGWListRemoteMDLogCR : public RGWShardCollectCR {
@@ -220,7 +220,7 @@ public:
     shards.swap(_shards);
     iter = shards.begin();
   }
-  bool spawn_next();
+  bool spawn_next() override;
 };
 
 RGWRemoteMetaLog::~RGWRemoteMetaLog()
@@ -377,7 +377,7 @@ class RGWAsyncReadMDLogEntries : public RGWAsyncRadosRequest {
   bool *truncated;
 
 protected:
-  int _send_request() {
+  int _send_request() override {
     real_time from_time;
     real_time end_time;
 
@@ -427,7 +427,7 @@ public:
     }
   }
 
-  int send_request() {
+  int send_request() override {
     marker = *pmarker;
     req = new RGWAsyncReadMDLogEntries(this, stack->create_completion_notifier(),
                                        sync_env->store, mdlog, shard_id, &marker,
@@ -436,7 +436,7 @@ public:
     return 0;
   }
 
-  int request_complete() {
+  int request_complete() override {
     int ret = req->get_ret_status();
     if (ret >= 0 && !entries->empty()) {
      *pmarker = marker;
@@ -460,7 +460,7 @@ public:
     : RGWCoroutine(env->store->ctx()), env(env), http_op(NULL),
       period(period), shard_id(_shard_id), shard_info(_shard_info) {}
 
-  int operate() {
+  int operate() override {
     auto store = env->store;
     RGWRESTConn *conn = store->rest_master_conn;
     reenter(this) {
@@ -520,7 +520,7 @@ public:
     : RGWSimpleCoroutine(env->store->ctx()), sync_env(env), http_op(NULL),
       period(period), shard_id(_shard_id), marker(_marker), max_entries(_max_entries), result(_result) {}
 
-  int send_request() {
+  int send_request() override {
     RGWRESTConn *conn = sync_env->conn;
     RGWRados *store = sync_env->store;
 
@@ -555,7 +555,7 @@ public:
     return 0;
   }
 
-  int request_complete() {
+  int request_complete() override {
     int ret = http_op->wait(result);
     http_op->put();
     if (ret < 0 && ret != -ENOENT) {
@@ -606,7 +606,7 @@ public:
     }
   }
 
-  int operate() {
+  int operate() override {
     int ret;
     reenter(this) {
       yield {
@@ -702,7 +702,7 @@ public:
 
   }
 
-  int handle_data(rgw_meta_sync_info& data);
+  int handle_data(rgw_meta_sync_info& data) override;
 };
 
 int RGWReadSyncStatusCoroutine::handle_data(rgw_meta_sync_info& data)
@@ -781,7 +781,7 @@ public:
               std::back_inserter(sections));
   }
 
-  int operate() {
+  int operate() override {
     RGWRESTConn *conn = sync_env->conn;
 
     reenter(this) {
@@ -928,7 +928,7 @@ public:
                                                      pbl(_pbl) {
   }
 
-  int operate() {
+  int operate() override {
     RGWRESTConn *conn = sync_env->conn;
     reenter(this) {
       yield {
@@ -969,7 +969,7 @@ class RGWAsyncMetaStoreEntry : public RGWAsyncRadosRequest {
   string raw_key;
   bufferlist bl;
 protected:
-  int _send_request() {
+  int _send_request() override {
     int ret = store->meta_mgr->put(raw_key, bl, RGWMetadataHandler::APPLY_ALWAYS);
     if (ret < 0) {
       ldout(store->ctx(), 0) << "ERROR: can't store key: " << raw_key << " ret=" << ret << dendl;
@@ -1005,14 +1005,14 @@ public:
     }
   }
 
-  int send_request() {
+  int send_request() override {
     req = new RGWAsyncMetaStoreEntry(this, stack->create_completion_notifier(),
                                   sync_env->store, raw_key, bl);
     sync_env->async_rados->queue(req);
     return 0;
   }
 
-  int request_complete() {
+  int request_complete() override {
     return req->get_ret_status();
   }
 };
@@ -1021,7 +1021,7 @@ class RGWAsyncMetaRemoveEntry : public RGWAsyncRadosRequest {
   RGWRados *store;
   string raw_key;
 protected:
-  int _send_request() {
+  int _send_request() override {
     int ret = store->meta_mgr->remove(raw_key);
     if (ret < 0) {
       ldout(store->ctx(), 0) << "ERROR: can't remove key: " << raw_key << " ret=" << ret << dendl;
@@ -1054,14 +1054,14 @@ public:
     }
   }
 
-  int send_request() {
+  int send_request() override {
     req = new RGWAsyncMetaRemoveEntry(this, stack->create_completion_notifier(),
                                   sync_env->store, raw_key);
     sync_env->async_rados->queue(req);
     return 0;
   }
 
-  int request_complete() {
+  int request_complete() override {
     int r = req->get_ret_status();
     if (r == -ENOENT) {
       r = 0;
@@ -1087,7 +1087,7 @@ public:
                                                                 marker_oid(_marker_oid),
                                                                 sync_marker(_marker) {}
 
-  RGWCoroutine *store_marker(const string& new_marker, uint64_t index_pos, const real_time& timestamp) {
+  RGWCoroutine *store_marker(const string& new_marker, uint64_t index_pos, const real_time& timestamp) override {
     sync_marker.marker = new_marker;
     if (index_pos > 0) {
       sync_marker.pos = index_pos;
@@ -1220,7 +1220,7 @@ public:
     }
   }
 
-  int operate();
+  int operate() override;
 
   int state_init();
   int state_read_shard_status();
@@ -1305,7 +1305,7 @@ public:
     marker_tracker = mt;
   }
 
-  int operate() {
+  int operate() override {
     int r;
     while (true) {
       switch (sync_marker.state) {
@@ -1654,12 +1654,12 @@ public:
       pool(_pool), period(period), mdlog(mdlog), shard_id(_shard_id),
       sync_marker(_marker), period_marker(std::move(period_marker)) {}
 
-  RGWCoroutine *alloc_cr() {
+  RGWCoroutine *alloc_cr() override {
     return new RGWMetaSyncShardCR(sync_env, pool, period, mdlog, shard_id,
                                   sync_marker, period_marker, backoff_ptr());
   }
 
-  RGWCoroutine *alloc_finisher_cr() {
+  RGWCoroutine *alloc_finisher_cr() override {
     RGWRados *store = sync_env->store;
     return new RGWSimpleRadosReadCR<rgw_meta_sync_marker>(sync_env->async_rados, store, pool,
                                                                sync_env->shard_obj_name(shard_id), &sync_marker);
@@ -1691,7 +1691,7 @@ public:
       pool(sync_env->store->get_zone_params().log_pool),
       cursor(cursor), sync_status(_sync_status) {}
 
-  int operate() {
+  int operate() override {
     reenter(this) {
       // loop through one period at a time
       for (;;) {
index ef490a8923f960257da9274d32478c41828ca28a..7ee8eb7813cb8e573bc4f08133a26c057f324cbb 100644 (file)
@@ -2616,16 +2616,16 @@ public:
     mtime = m;
   }
 
-  void dump(Formatter *f) const {
+  void dump(Formatter *f) const override {
     uci.dump(f);
   }
 };
 
 class RGWUserMetadataHandler : public RGWMetadataHandler {
 public:
-  string get_type() { return "user"; }
+  string get_type() override { return "user"; }
 
-  int get(RGWRados *store, string& entry, RGWMetadataObject **obj) {
+  int get(RGWRados *store, string& entry, RGWMetadataObject **obj) override {
     RGWUserCompleteInfo uci;
     RGWObjVersionTracker objv_tracker;
     real_time mtime;
@@ -2645,7 +2645,7 @@ public:
   }
 
   int put(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker,
-          real_time mtime, JSONObj *obj, sync_type_t sync_mode) {
+          real_time mtime, JSONObj *obj, sync_type_t sync_mode) override {
     RGWUserCompleteInfo uci;
 
     try {
@@ -2687,7 +2687,7 @@ public:
     RGWListRawObjsCtx ctx;
   };
 
-  int remove(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker) {
+  int remove(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker) override {
     RGWUserInfo info;
 
     rgw_user uid(entry);
@@ -2699,12 +2699,12 @@ public:
     return rgw_delete_user(store, info, objv_tracker);
   }
 
-  void get_pool_and_oid(RGWRados *store, const string& key, rgw_bucket& bucket, string& oid) {
+  void get_pool_and_oid(RGWRados *store, const string& key, rgw_bucket& bucket, string& oid) override {
     oid = key;
     bucket = store->get_zone_params().user_uid_pool;
   }
 
-  int list_keys_init(RGWRados *store, void **phandle)
+  int list_keys_init(RGWRados *store, void **phandle) override
   {
     list_keys_info *info = new list_keys_info;
 
@@ -2715,7 +2715,7 @@ public:
     return 0;
   }
 
-  int list_keys_next(void *handle, int max, list<string>& keys, bool *truncated) {
+  int list_keys_next(void *handle, int max, list<string>& keys, bool *truncated) override {
     list_keys_info *info = static_cast<list_keys_info *>(handle);
 
     string no_filter;
@@ -2749,7 +2749,7 @@ public:
     return 0;
   }
 
-  void list_keys_complete(void *handle) {
+  void list_keys_complete(void *handle) override {
     list_keys_info *info = static_cast<list_keys_info *>(handle);
     delete info;
   }