From bef22609de95843008b5d02eb075252bb97fbe90 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 14 Feb 2017 16:18:53 -0800 Subject: [PATCH] rgw: log unlink_instance mtime as object's mtime This is needed so that when squashing entries during data sync we get a consistent mtime for that object. Signed-off-by: Yehuda Sadeh --- src/cls/rgw/cls_rgw.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index ca404ca1e27fe..530edfbec93b9 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -1673,7 +1673,7 @@ 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()); - real_time mtime = real_clock::now(); /* mtime has no real meaning in instance removal context */ + 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,