]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: log unlink_instance mtime as object's mtime 21214/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:55:40 +0000 (15:55 +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 564e81d179dc2ba0c0077e6ada781543610b296e..bfdebd1c8e8d866040db495743b57410562bdda9 100644 (file)
@@ -1684,7 +1684,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,