From 6ff23bb9e3996cf034f0f4ccaa17f21c4e737425 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh <yehuda@inktank.com> Date: Wed, 12 Sep 2012 14:47:11 -0700 Subject: [PATCH] cls_rgw: client api for bucket index init create a client api function for bucket index init. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> --- src/cls/rgw/cls_rgw_client.cc | 6 ++++++ src/cls/rgw/cls_rgw_client.h | 2 ++ src/rgw/rgw_rados.cc | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) 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; }