diff options
author | Yehuda Sadeh <yehuda@redhat.com> | 2015-01-06 23:12:06 +0100 |
---|---|---|
committer | Yehuda Sadeh <yehuda@redhat.com> | 2015-01-20 00:58:01 +0100 |
commit | dd7ffdb638da705584d64e9d929439a2c340be4c (patch) | |
tree | 54c93712ffa40583dba16eb18515ac03d8b693ee /src/cls/rgw/cls_rgw_client.cc | |
parent | cls_rgw: cleanup, add read_bucket_header() (diff) | |
download | ceph-dd7ffdb638da705584d64e9d929439a2c340be4c.tar.xz ceph-dd7ffdb638da705584d64e9d929439a2c340be4c.zip |
rgw, cls_rgw: log versioned operations in bucket index log
Add the following log ops:
- link_olh
- link_olh_del
- unlink_instance
Log operations if needed. Use current version field in the log entries
to specify versioned epoch.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Diffstat (limited to 'src/cls/rgw/cls_rgw_client.cc')
-rw-r--r-- | src/cls/rgw/cls_rgw_client.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cls/rgw/cls_rgw_client.cc b/src/cls/rgw/cls_rgw_client.cc index be447172c2d..5d8e6102be6 100644 --- a/src/cls/rgw/cls_rgw_client.cc +++ b/src/cls/rgw/cls_rgw_client.cc @@ -182,7 +182,7 @@ int cls_rgw_bi_list(librados::IoCtx& io_ctx, const string oid, int cls_rgw_bucket_link_olh(librados::IoCtx& io_ctx, const string& oid, const cls_rgw_obj_key& key, bufferlist& olh_tag, bool delete_marker, const string& op_tag, struct rgw_bucket_dir_entry_meta *meta, - uint64_t olh_epoch) + uint64_t olh_epoch, bool log_op) { bufferlist in, out; struct rgw_cls_link_olh_op call; @@ -194,6 +194,7 @@ int cls_rgw_bucket_link_olh(librados::IoCtx& io_ctx, const string& oid, const cl call.meta = *meta; } call.olh_epoch = olh_epoch; + call.log_op = log_op; ::encode(call, in); int r = io_ctx.exec(oid, "rgw", "bucket_link_olh", in, out); if (r < 0) @@ -204,13 +205,14 @@ int cls_rgw_bucket_link_olh(librados::IoCtx& io_ctx, const string& oid, const cl int cls_rgw_bucket_unlink_instance(librados::IoCtx& io_ctx, const string& oid, const cls_rgw_obj_key& key, const string& op_tag, - uint64_t olh_epoch) + uint64_t olh_epoch, bool log_op) { bufferlist in, out; struct rgw_cls_unlink_instance_op call; call.key = key; call.op_tag = op_tag; call.olh_epoch = olh_epoch; + call.log_op = log_op; ::encode(call, in); int r = io_ctx.exec(oid, "rgw", "bucket_unlink_instance", in, out); if (r < 0) |