]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls_rgw: reset dirent flag appropriately
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 8 Oct 2015 23:43:05 +0000 (16:43 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:12:58 +0000 (16:12 -0800)
Need to mark dirent as versioned if it has instance.

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

index 66524d9692037cc80dc81749f6189424fca97137..9414d338ef11f35b8f7f9a5071d77e3d02cbe2d2 100644 (file)
@@ -814,7 +814,7 @@ int rgw_bucket_complete_op(cls_method_context_t hctx, bufferlist *in, bufferlist
   }
 
   entry.index_ver = header.ver;
-  entry.flags = 0; /* resetting entry flags, entry might have been previously a delete marker */
+  entry.flags = (entry.key.instance.empty() ? 0 : RGW_BUCKET_DIRENT_FLAG_VER); /* resetting entry flags, entry might have been previously a delete marker */
 
   if (op.tag.size()) {
     map<string, struct rgw_bucket_pending_info>::iterator pinter = entry.pending_map.find(op.tag);