]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: log unlink_instance mtime as object's mtime 20016/head
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 15 Feb 2017 00:18:53 +0000 (16:18 -0800)
committerCasey Bodley <cbodley@redhat.com>
Thu, 18 Jan 2018 19:39:56 +0000 (14:39 -0500)
This is needed so that when squashing entries during data
sync we get a consistent mtime for that object.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/cls/rgw/cls_rgw.cc

index ca404ca1e27fee8094f6152d25195f5582f80688..530edfbec93b9aff29c2e4ec1ea49f7da2b058bd 100644 (file)
@@ -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,