From: Casey Bodley Date: Mon, 4 Mar 2019 21:45:49 +0000 (-0500) Subject: cls/rgw: don't add prepare ops to bilog X-Git-Tag: v15.1.0~1672^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=713aa306434c081516492ec6377a2d0519f21c52;p=ceph-ci.git cls/rgw: don't add prepare ops to bilog Signed-off-by: Casey Bodley --- diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index 21535eae61a..774a9871d48 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -705,30 +705,10 @@ int rgw_bucket_prepare_op(cls_method_context_t hctx, bufferlist *in, bufferlist info.op = op.op; entry.pending_map.insert(pair(op.tag, info)); - rgw_bucket_dir_header header; - rc = read_bucket_header(hctx, &header); - if (rc < 0) { - CLS_LOG(1, "ERROR: rgw_bucket_prepare_op(): failed to read header\n"); - return rc; - } - - if (op.log_op && !header.syncstopped) { - rc = log_index_operation(hctx, op.key, op.op, op.tag, entry.meta.mtime, - entry.ver, info.state, header.ver, header.max_marker, op.bilog_flags, NULL, NULL, &op.zones_trace); - if (rc < 0) - return rc; - } - // write out new key to disk bufferlist info_bl; encode(entry, info_bl); - rc = cls_cxx_map_set_val(hctx, idx, &info_bl); - if (rc < 0) - return rc; - - if (op.log_op && !header.syncstopped) - return write_bucket_header(hctx, &header); - return 0; + return cls_cxx_map_set_val(hctx, idx, &info_bl); } static void unaccount_entry(rgw_bucket_dir_header& header,