diff options
author | Shilpa Jagannath <smanjara@redhat.com> | 2024-06-27 22:58:53 +0200 |
---|---|---|
committer | Shilpa Jagannath <smanjara@redhat.com> | 2024-06-28 19:06:38 +0200 |
commit | 92002be04ebea3d1ec0d0ddfda4c8624131ad917 (patch) | |
tree | 4fcc4d54b9e6474b16fd3fdc91488cb3a4526129 /src/cls | |
parent | src/test/rgw: Adding a test for check (diff) | |
download | ceph-92002be04ebea3d1ec0d0ddfda4c8624131ad917.tar.xz ceph-92002be04ebea3d1ec0d0ddfda4c8624131ad917.zip |
rgw/multisite: use bilog_flags in cls_rgw_bucket_unlink_instance as well.
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
Diffstat (limited to 'src/cls')
-rw-r--r-- | src/cls/rgw/cls_rgw.cc | 8 | ||||
-rw-r--r-- | src/cls/rgw/cls_rgw_client.cc | 8 | ||||
-rw-r--r-- | src/cls/rgw/cls_rgw_client.h | 4 | ||||
-rw-r--r-- | src/cls/rgw/cls_rgw_ops.h | 9 |
4 files changed, 9 insertions, 20 deletions
diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index 4b9fe1838fc..27a484dd51e 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -2011,18 +2011,12 @@ static int rgw_bucket_unlink_instance(cls_method_context_t hctx, bufferlist *in, rgw_bucket_entry_ver ver; ver.epoch = (op.olh_epoch ? op.olh_epoch : olh.get_epoch()); - if (op.null_verid) { - op.bilog_flags = op.bilog_flags | RGW_BILOG_FLAG_VERSIONED_OP | RGW_BILOG_NULL_VERSION; - } else { - op.bilog_flags = op.bilog_flags | RGW_BILOG_FLAG_VERSIONED_OP; - } - real_time mtime = obj.mtime(); /* mtime has no real meaning in * instance removal context */ ret = log_index_operation(hctx, op.key, CLS_RGW_OP_UNLINK_INSTANCE, op.op_tag, mtime, ver, CLS_RGW_STATE_COMPLETE, header.ver, header.max_marker, - op.bilog_flags, NULL, NULL, &op.zones_trace); + op.bilog_flags | RGW_BILOG_FLAG_VERSIONED_OP, NULL, NULL, &op.zones_trace); if (ret < 0) return ret; diff --git a/src/cls/rgw/cls_rgw_client.cc b/src/cls/rgw/cls_rgw_client.cc index c36d9c232a0..e65dedf14e4 100644 --- a/src/cls/rgw/cls_rgw_client.cc +++ b/src/cls/rgw/cls_rgw_client.cc @@ -536,10 +536,10 @@ void cls_rgw_bucket_link_olh(librados::ObjectWriteOperation& op, const cls_rgw_o int cls_rgw_bucket_unlink_instance(librados::IoCtx& io_ctx, const string& oid, const cls_rgw_obj_key& key, const string& op_tag, const string& olh_tag, uint64_t olh_epoch, bool log_op, - bool null_verid, const rgw_zone_set& zones_trace) + uint16_t bilog_flags, const rgw_zone_set& zones_trace) { librados::ObjectWriteOperation op; - cls_rgw_bucket_unlink_instance(op, key, op_tag, olh_tag, olh_epoch, log_op, null_verid, zones_trace); + cls_rgw_bucket_unlink_instance(op, key, op_tag, olh_tag, olh_epoch, log_op, bilog_flags, zones_trace); int r = io_ctx.operate(oid, &op); if (r < 0) return r; @@ -550,7 +550,7 @@ int cls_rgw_bucket_unlink_instance(librados::IoCtx& io_ctx, const string& oid, void cls_rgw_bucket_unlink_instance(librados::ObjectWriteOperation& op, const cls_rgw_obj_key& key, const string& op_tag, const string& olh_tag, uint64_t olh_epoch, bool log_op, - bool null_verid, const rgw_zone_set& zones_trace) + uint16_t bilog_flags, const rgw_zone_set& zones_trace) { bufferlist in, out; rgw_cls_unlink_instance_op call; @@ -560,7 +560,7 @@ void cls_rgw_bucket_unlink_instance(librados::ObjectWriteOperation& op, call.olh_tag = olh_tag; call.log_op = log_op; call.zones_trace = zones_trace; - call.null_verid = null_verid; + call.bilog_flags = bilog_flags; encode(call, in); op.exec(RGW_CLASS, RGW_BUCKET_UNLINK_INSTANCE, in); } diff --git a/src/cls/rgw/cls_rgw_client.h b/src/cls/rgw/cls_rgw_client.h index c3dec6932e0..365a51fb5d5 100644 --- a/src/cls/rgw/cls_rgw_client.h +++ b/src/cls/rgw/cls_rgw_client.h @@ -381,7 +381,7 @@ void cls_rgw_bucket_link_olh(librados::ObjectWriteOperation& op, uint64_t olh_epoch, ceph::real_time unmod_since, bool high_precision_time, bool log_op, const rgw_zone_set& zones_trace); void cls_rgw_bucket_unlink_instance(librados::ObjectWriteOperation& op, const cls_rgw_obj_key& key, const std::string& op_tag, - const std::string& olh_tag, uint64_t olh_epoch, bool log_op, bool null_verid, const rgw_zone_set& zones_trace); + const std::string& olh_tag, uint64_t olh_epoch, bool log_op, uint16_t bilog_flags, const rgw_zone_set& zones_trace); void cls_rgw_get_olh_log(librados::ObjectReadOperation& op, const cls_rgw_obj_key& olh, uint64_t ver_marker, const std::string& olh_tag, rgw_cls_read_olh_log_ret& log_ret, int& op_ret); void cls_rgw_trim_olh_log(librados::ObjectWriteOperation& op, const cls_rgw_obj_key& olh, uint64_t ver, const std::string& olh_tag); void cls_rgw_clear_olh(librados::ObjectWriteOperation& op, const cls_rgw_obj_key& olh, const std::string& olh_tag); @@ -396,7 +396,7 @@ int cls_rgw_bucket_link_olh(librados::IoCtx& io_ctx, const std::string& oid, int cls_rgw_bucket_unlink_instance(librados::IoCtx& io_ctx, const std::string& oid, const cls_rgw_obj_key& key, const std::string& op_tag, const std::string& olh_tag, uint64_t olh_epoch, bool log_op, - bool null_verid, const rgw_zone_set& zones_trace); + uint16_t bilog_flags, const rgw_zone_set& zones_trace); int cls_rgw_get_olh_log(librados::IoCtx& io_ctx, std::string& oid, const cls_rgw_obj_key& olh, uint64_t ver_marker, const std::string& olh_tag, rgw_cls_read_olh_log_ret& log_ret); int cls_rgw_clear_olh(librados::IoCtx& io_ctx, std::string& oid, const cls_rgw_obj_key& olh, const std::string& olh_tag); diff --git a/src/cls/rgw/cls_rgw_ops.h b/src/cls/rgw/cls_rgw_ops.h index f6ae362f5da..b824c73d3d0 100644 --- a/src/cls/rgw/cls_rgw_ops.h +++ b/src/cls/rgw/cls_rgw_ops.h @@ -239,12 +239,11 @@ struct rgw_cls_unlink_instance_op { uint16_t bilog_flags; std::string olh_tag; rgw_zone_set zones_trace; - bool null_verid; rgw_cls_unlink_instance_op() : olh_epoch(0), log_op(false), bilog_flags(0) {} void encode(ceph::buffer::list& bl) const { - ENCODE_START(4, 1, bl); + ENCODE_START(3, 1, bl); encode(key, bl); encode(op_tag, bl); encode(olh_epoch, bl); @@ -252,12 +251,11 @@ struct rgw_cls_unlink_instance_op { encode(bilog_flags, bl); encode(olh_tag, bl); encode(zones_trace, bl); - encode(null_verid, bl); ENCODE_FINISH(bl); } void decode(ceph::buffer::list::const_iterator& bl) { - DECODE_START(4, bl); + DECODE_START(3, bl); decode(key, bl); decode(op_tag, bl); decode(olh_epoch, bl); @@ -269,9 +267,6 @@ struct rgw_cls_unlink_instance_op { if (struct_v >= 3) { decode(zones_trace, bl); } - if (struct_v >= 4) { - decode(null_verid, bl); - } DECODE_FINISH(bl); } |