]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: log unlink_instance mtime as object's mtime 21213/head
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 15 Feb 2017 00:18:53 +0000 (16:18 -0800)
committerNathan Cutler <ncutler@suse.com>
Tue, 3 Apr 2018 13:54:00 +0000 (15:54 +0200)
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>
(cherry picked from commit bef22609de95843008b5d02eb075252bb97fbe90)

src/cls/rgw/cls_rgw.cc

index f7bfd48da8887edfdfcd014e9bd4fdd26d0561fd..dff3cc065f43d92a2f4f7cf5fe0ba585a6c7b829 100644 (file)
@@ -1710,7 +1710,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,