Skip to content

Commit 658098b

Browse files
committed
cls/rgw: remove unused cls_rgw_bi_get_vals()
Signed-off-by: Casey Bodley <[email protected]>
1 parent a86f97b commit 658098b

File tree

5 files changed

+0
-115
lines changed

5 files changed

+0
-115
lines changed

src/cls/rgw/cls_rgw.cc

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -2785,72 +2785,6 @@ static int rgw_bi_get_op(cls_method_context_t hctx, bufferlist *in, bufferlist *
27852785
return 0;
27862786
}
27872787

2788-
/* gain bi_entry based on reshard log */
2789-
static int rgw_bi_get_vals_op(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
2790-
{
2791-
// decode request
2792-
rgw_cls_bi_get_vals_op op;
2793-
auto bl_iter = in->cbegin();
2794-
try {
2795-
decode(op, bl_iter);
2796-
} catch (ceph::buffer::error& err) {
2797-
CLS_LOG(0, "ERROR: %s: failed to decode request", __func__);
2798-
return -EINVAL;
2799-
}
2800-
2801-
map<string, bufferlist> keys;
2802-
int ret = cls_cxx_map_get_vals_by_keys(hctx, op.log_entries_wanted, &keys);
2803-
if (ret < 0) {
2804-
return ret;
2805-
}
2806-
2807-
rgw_cls_bi_list_ret op_ret;
2808-
std::map<string, bufferlist>::iterator iter;
2809-
for (iter = keys.begin(); iter != keys.end(); ++iter) {
2810-
2811-
rgw_cls_bi_entry entry;
2812-
entry.idx = iter->first;
2813-
entry.type = bi_type(iter->first);
2814-
entry.data = iter->second;
2815-
2816-
auto biter = entry.data.cbegin();
2817-
2818-
switch (entry.type) {
2819-
case BIIndexType::Plain:
2820-
case BIIndexType::Instance: {
2821-
rgw_bucket_dir_entry e;
2822-
try {
2823-
decode(e, biter);
2824-
} catch (ceph::buffer::error& err) {
2825-
CLS_LOG(0, "ERROR: %s: failed to decode buffer", __func__);
2826-
return -EIO;
2827-
}
2828-
break;
2829-
}
2830-
case BIIndexType::OLH: {
2831-
rgw_bucket_olh_entry e;
2832-
try {
2833-
decode(e, biter);
2834-
} catch (ceph::buffer::error& err) {
2835-
CLS_LOG(0, "ERROR: %s: failed to decode buffer (size=%d)", __func__, entry.data.length());
2836-
return -EIO;
2837-
}
2838-
break;
2839-
}
2840-
default:
2841-
CLS_LOG(0, "%s: invalid entry type: %d", __func__, int(entry.type));
2842-
return -EINVAL;
2843-
}
2844-
CLS_LOG(20, "%s: entry.idx=%s", __func__, escape_str(entry.idx).c_str());
2845-
2846-
op_ret.entries.push_back(entry);
2847-
}
2848-
2849-
encode(op_ret, *out);
2850-
2851-
return 0;
2852-
}
2853-
28542788
static int rgw_bi_put_op(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
28552789
{
28562790
CLS_LOG(10, "entered %s", __func__);
@@ -5080,7 +5014,6 @@ CLS_INIT(rgw)
50805014
cls_method_handle_t h_rgw_obj_check_attrs_prefix;
50815015
cls_method_handle_t h_rgw_obj_check_mtime;
50825016
cls_method_handle_t h_rgw_bi_get_op;
5083-
cls_method_handle_t h_rgw_bi_get_vals_op;
50845017
cls_method_handle_t h_rgw_bi_put_op;
50855018
cls_method_handle_t h_rgw_bi_put_entries_op;
50865019
cls_method_handle_t h_rgw_bi_list_op;
@@ -5139,7 +5072,6 @@ CLS_INIT(rgw)
51395072
cls_register_cxx_method(h_class, RGW_OBJ_CHECK_MTIME, CLS_METHOD_RD, rgw_obj_check_mtime, &h_rgw_obj_check_mtime);
51405073

51415074
cls_register_cxx_method(h_class, RGW_BI_GET, CLS_METHOD_RD, rgw_bi_get_op, &h_rgw_bi_get_op);
5142-
cls_register_cxx_method(h_class, RGW_BI_GET_VALS, CLS_METHOD_RD, rgw_bi_get_vals_op, &h_rgw_bi_get_vals_op);
51435075
cls_register_cxx_method(h_class, RGW_BI_PUT, CLS_METHOD_RD | CLS_METHOD_WR, rgw_bi_put_op, &h_rgw_bi_put_op);
51445076
cls_register_cxx_method(h_class, RGW_BI_PUT_ENTRIES, CLS_METHOD_RD | CLS_METHOD_WR, rgw_bi_put_entries, &h_rgw_bi_put_entries_op);
51455077
cls_register_cxx_method(h_class, RGW_BI_LIST, CLS_METHOD_RD, rgw_bi_list_op, &h_rgw_bi_list_op);

src/cls/rgw/cls_rgw_client.cc

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -475,32 +475,6 @@ int cls_rgw_bi_get(librados::IoCtx& io_ctx, const string oid,
475475
return 0;
476476
}
477477

478-
int cls_rgw_bi_get_vals(librados::IoCtx& io_ctx, const std::string oid,
479-
std::set<std::string>& log_entries_wanted,
480-
std::list<rgw_cls_bi_entry> *entries)
481-
{
482-
bufferlist in, out;
483-
struct rgw_cls_bi_get_vals_op call;
484-
call.log_entries_wanted = std::move(log_entries_wanted);
485-
encode(call, in);
486-
int r = io_ctx.exec(oid, RGW_CLASS, RGW_BI_GET_VALS, in, out);
487-
if (r < 0)
488-
return r;
489-
490-
struct rgw_cls_bi_list_ret op_ret;
491-
auto iter = out.cbegin();
492-
try {
493-
decode(op_ret, iter);
494-
} catch (ceph::buffer::error& err) {
495-
return -EIO;
496-
}
497-
498-
if (entries)
499-
entries->swap(op_ret.entries);
500-
501-
return 0;
502-
}
503-
504478
int cls_rgw_bi_put(librados::IoCtx& io_ctx, const string oid, const rgw_cls_bi_entry& entry)
505479
{
506480
bufferlist in, out;

src/cls/rgw/cls_rgw_client.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,6 @@ void cls_rgw_obj_check_mtime(librados::ObjectOperation& o, const ceph::real_time
384384
int cls_rgw_bi_get(librados::IoCtx& io_ctx, const std::string oid,
385385
BIIndexType index_type, const cls_rgw_obj_key& key,
386386
rgw_cls_bi_entry *entry);
387-
int cls_rgw_bi_get_vals(librados::IoCtx& io_ctx, const std::string oid,
388-
std::set<std::string>& log_entries_wanted,
389-
std::list<rgw_cls_bi_entry> *entries);
390387
int cls_rgw_bi_put(librados::IoCtx& io_ctx, const std::string oid, const rgw_cls_bi_entry& entry);
391388
void cls_rgw_bi_put(librados::ObjectWriteOperation& op, const std::string oid, const rgw_cls_bi_entry& entry);
392389
// Write the given array of index entries and update bucket stats accordingly.

src/cls/rgw/cls_rgw_const.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ constexpr int RGWBIAdvanceAndRetryError = -EFBIG;
3333
#define RGW_OBJ_CHECK_MTIME "obj_check_mtime"
3434

3535
#define RGW_BI_GET "bi_get"
36-
#define RGW_BI_GET_VALS "bi_get_vals"
3736
#define RGW_BI_PUT "bi_put"
3837
#define RGW_BI_PUT_ENTRIES "bi_put_entries"
3938
#define RGW_BI_LIST "bi_list"

src/cls/rgw/cls_rgw_ops.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -731,23 +731,6 @@ struct rgw_cls_bi_get_ret {
731731
};
732732
WRITE_CLASS_ENCODER(rgw_cls_bi_get_ret)
733733

734-
struct rgw_cls_bi_get_vals_op {
735-
std::set<std::string> log_entries_wanted;
736-
737-
void encode(ceph::buffer::list& bl) const {
738-
ENCODE_START(1, 1, bl);
739-
encode(log_entries_wanted, bl);
740-
ENCODE_FINISH(bl);
741-
}
742-
743-
void decode(ceph::buffer::list::const_iterator& bl) {
744-
DECODE_START(1, bl);
745-
decode(log_entries_wanted, bl);
746-
DECODE_FINISH(bl);
747-
}
748-
};
749-
WRITE_CLASS_ENCODER(rgw_cls_bi_get_vals_op)
750-
751734
struct rgw_cls_bi_put_op {
752735
rgw_cls_bi_entry entry;
753736

0 commit comments

Comments
 (0)