]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: a small set of clean-ups 42127/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Wed, 30 Jun 2021 19:39:33 +0000 (15:39 -0400)
committerJ. Eric Ivancich <ivancich@redhat.com>
Wed, 30 Jun 2021 20:08:51 +0000 (16:08 -0400)
Small items noticed along the way and addressed collectively in this
small "omnibus" PR.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
src/cls/rgw/cls_rgw.cc
src/cls/rgw/cls_rgw_client.h
src/cls/rgw/cls_rgw_const.h
src/cls/rgw/cls_rgw_ops.h
src/cls/rgw/cls_rgw_types.h
src/cls/rgw_gc/cls_rgw_gc.cc
src/cls/rgw_gc/cls_rgw_gc_client.h
src/cls/rgw_gc/cls_rgw_gc_const.h
src/cls/rgw_gc/cls_rgw_gc_ops.h
src/cls/rgw_gc/cls_rgw_gc_types.h
src/rgw/rgw_rados.cc

index ea16422f519199c2d4c7dbbb225086672e054225..cbf55ae86e2f537dc1e4cd81c0c07d2072850dbd 100644 (file)
@@ -563,7 +563,7 @@ int rgw_bucket_list(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
                __func__, key.name.c_str(), key.instance.c_str());
         continue;
       }
-      
+
       // filter out noncurrent versions, delete markers, and initial marker
       if (!op.list_versions &&
          (!entry.is_visible() || op.start_obj.name == key.name)) {
@@ -3676,7 +3676,7 @@ static int rgw_cls_gc_list(cls_method_context_t hctx, bufferlist *in, bufferlist
 
   cls_rgw_gc_list_ret op_ret;
 #define GC_LIST_ENTRIES_DEFAULT 128
-  int ret = gc_list_entries(hctx, op.marker, (op.max ? op.max : GC_LIST_ENTRIES_DEFAULT), op.expired_only, 
+  int ret = gc_list_entries(hctx, op.marker, (op.max ? op.max : GC_LIST_ENTRIES_DEFAULT), op.expired_only,
    op_ret.entries, &op_ret.truncated, op_ret.next_marker);
   if (ret < 0)
     return ret;
index 0eca7345dc65044e971acfabbd54222bb19ae473..d95e7d489d939d71a9ffe8f9c68652bff3854bfe 100644 (file)
@@ -1,8 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
-#ifndef CEPH_CLS_RGW_CLIENT_H
-#define CEPH_CLS_RGW_CLIENT_H
+#pragma once
 
 #include "include/str_list.h"
 #include "include/rados/librados.hpp"
@@ -640,5 +639,3 @@ int cls_rgw_clear_bucket_resharding(librados::IoCtx& io_ctx, const std::string&
 int cls_rgw_get_bucket_resharding(librados::IoCtx& io_ctx, const std::string& oid,
                                   cls_rgw_bucket_instance_entry *entry);
 #endif
-
-#endif
index f39919d24b60b3fc5b4f8fa073a3560eb9ae0c26..63f7517334488cc2e1d8f2b717f87f75a2a15e08 100644 (file)
@@ -1,8 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
-#ifndef CEPH_CLS_RGW_CONST_H
-#define CEPH_CLS_RGW_CONST_H
+#pragma once
 
 #define RGW_CLASS "rgw"
 
@@ -71,5 +70,3 @@
 #define RGW_CLEAR_BUCKET_RESHARDING "clear_bucket_resharding"
 #define RGW_GUARD_BUCKET_RESHARDING "guard_bucket_resharding"
 #define RGW_GET_BUCKET_RESHARDING "get_bucket_resharding"
-
-#endif
index a1800a834b4eb79b18cc80c52ebe4d314527204a..bf1ba5c5499e459a1f243cd0089e02cbc202ebde 100644 (file)
@@ -1,8 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
-#ifndef CEPH_CLS_RGW_OPS_H
-#define CEPH_CLS_RGW_OPS_H
+#pragma once
 
 #include "cls/rgw/cls_rgw_types.h"
 
@@ -1484,5 +1483,3 @@ struct cls_rgw_get_bucket_resharding_ret  {
   void dump(ceph::Formatter *f) const;
 };
 WRITE_CLASS_ENCODER(cls_rgw_get_bucket_resharding_ret)
-
-#endif /* CEPH_CLS_RGW_OPS_H */
index 19303120a7530198d9765c5bcb7c7f334ef442e1..ccf19c1824ecff586892bc0a80337900c141b116 100644 (file)
@@ -1,8 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
-#ifndef CEPH_CLS_RGW_TYPES_H
-#define CEPH_CLS_RGW_TYPES_H
+#pragma once
 
 #include <boost/container/flat_map.hpp>
 #include "common/ceph_time.h"
@@ -1283,5 +1282,3 @@ struct cls_rgw_reshard_entry
   void get_key(std::string *key) const;
 };
 WRITE_CLASS_ENCODER(cls_rgw_reshard_entry)
-
-#endif
index d6cd7767a1395523af61fb2683a36973cc918ced..44a5d7b33832bee437d0fc561c395f9148568b40 100644 (file)
@@ -17,8 +17,6 @@
 #include "common/ceph_context.h"
 #include "global/global_context.h"
 
-#define dout_context g_ceph_context
-#define dout_subsys ceph_subsys_rgw
 
 #define GC_LIST_DEFAULT_MAX 128
 
index 88a042fc945bc7afbd58374f7b6df023d2ebd76b..bce510b9c534b114c58d162554b3991ef9c6887d 100644 (file)
@@ -1,8 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
-#ifndef CEPH_CLS_RGW_GC_CLIENT_H
-#define CEPH_CLS_RGW_GC_CLIENT_H
+#pragma once
 
 #include "include/rados/librados.hpp"
 
@@ -19,5 +18,3 @@ int cls_rgw_gc_queue_list_entries(librados::IoCtx& io_ctx, const std::string& oi
                                  std::list<cls_rgw_gc_obj_info>& entries, bool *truncated, std::string& next_marker);
 void cls_rgw_gc_queue_remove_entries(librados::ObjectWriteOperation& op, uint32_t num_entries);
 void cls_rgw_gc_queue_defer_entry(librados::ObjectWriteOperation& op, uint32_t expiration_secs, const cls_rgw_gc_obj_info& info);
-
-#endif
index 5a3d2b1d19eb6b24f10129b71d453de0746073d5..ae33e3ff0e1f78a477ca1fc4ce0effa4e49c3261 100644 (file)
@@ -1,5 +1,7 @@
-#ifndef CEPH_CLS_RGW_GC_CONSTS_H
-#define CEPH_CLS_RGW_GC_CONSTS_H
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#pragma once
 
 #define RGW_GC_CLASS "rgw_gc"
 
@@ -8,5 +10,3 @@
 #define RGW_GC_QUEUE_LIST_ENTRIES "rgw_gc_queue_list_entries"
 #define RGW_GC_QUEUE_REMOVE_ENTRIES "rgw_gc_queue_remove_entries"
 #define RGW_GC_QUEUE_UPDATE_ENTRY "rgw_gc_queue_update_entry"
-
-#endif
\ No newline at end of file
index 95f791c09b942be46ba9e8beb8f3c104afdd5203..22ddbad06d1dab9162990d999911d03066363b22 100644 (file)
@@ -1,8 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
-#ifndef CEPH_CLS_RGW_GC_OPS_H
-#define CEPH_CLS_RGW_GC_OPS_H
+#pragma once
 
 #include "cls/rgw/cls_rgw_types.h"
 
@@ -68,4 +67,3 @@ struct cls_rgw_gc_queue_defer_entry_op {
   }
 };
 WRITE_CLASS_ENCODER(cls_rgw_gc_queue_defer_entry_op)
-#endif /* CEPH_CLS_RGW_GC_OPS_H */
index da9d08036e6b651f4c20ddcfa0653c8faba43068..885bf14b99387f0d21f3c8fa24e01db9d25af56c 100644 (file)
@@ -1,8 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
-#ifndef CEPH_CLS_RGW_GC_TYPES_H
-#define CEPH_CLS_RGW_GC_TYPES_H
+#pragma once
 
 #include "include/types.h"
 #include <unordered_map>
@@ -33,5 +32,3 @@ struct cls_rgw_gc_urgent_data
   }
 };
 WRITE_CLASS_ENCODER(cls_rgw_gc_urgent_data)
-
-#endif
index 3f20271933db111a29ed1e4fd6bd17bbc5e1aae4..b62e3a8a6098f024b8e8c7ee802573dd238a88eb 100644 (file)
@@ -107,8 +107,6 @@ static string default_storage_extra_pool_suffix = "rgw.buckets.non-ec";
 static RGWObjCategory main_category = RGWObjCategory::Main;
 #define RGW_USAGE_OBJ_PREFIX "usage."
 
-#define dout_subsys ceph_subsys_rgw
-
 
 static bool rgw_get_obj_data_pool(const RGWZoneGroup& zonegroup, const RGWZoneParams& zone_params,
                                   const rgw_placement_rule& head_placement_rule,