diff --git a/src/cls/rgw/cls_rgw_client.cc b/src/cls/rgw/cls_rgw_client.cc index 1e7c7d01c39..81e2f41061d 100644 --- a/src/cls/rgw/cls_rgw_client.cc +++ b/src/cls/rgw/cls_rgw_client.cc @@ -6,6 +6,12 @@ using namespace librados; +void cls_rgw_bucket_init(ObjectWriteOperation& o) +{ + bufferlist in; + o.exec("rgw", "bucket_init_index", in); +} + void cls_rgw_bucket_prepare_op(ObjectWriteOperation& o, uint8_t op, string& tag, string& name, string& locator) diff --git a/src/cls/rgw/cls_rgw_client.h b/src/cls/rgw/cls_rgw_client.h index fec37da53ed..9c4103cb005 100644 --- a/src/cls/rgw/cls_rgw_client.h +++ b/src/cls/rgw/cls_rgw_client.h @@ -6,6 +6,8 @@ #include "cls_rgw_types.h" /* bucket index */ +void cls_rgw_bucket_init(librados::ObjectWriteOperation& o); + void cls_rgw_bucket_prepare_op(librados::ObjectWriteOperation& o, uint8_t op, string& tag, string& name, string& locator); diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 3864bdd07f2..0767434d743 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -2715,7 +2715,7 @@ int RGWRados::process_gc() int RGWRados::cls_rgw_init_index(librados::IoCtx& io_ctx, librados::ObjectWriteOperation& op, string& oid) { bufferlist in; - op.exec("rgw", "bucket_init_index", in); + cls_rgw_bucket_init(op); int r = io_ctx.operate(oid, &op); return r; }