]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rgw/cls_rgw.cc: fix multiple lastest version problem 38085/head
authorRuan Zitao <ruanzitao@kuaishou.com>
Wed, 21 Oct 2020 03:06:40 +0000 (11:06 +0800)
committerRuan Zitao <ruanzitao@kuaishou.com>
Wed, 2 Dec 2020 03:08:55 +0000 (11:08 +0800)
Fixes: https://tracker.ceph.com/issues/47919
Signed-off-by: Ruan Zitao <ruanzitao@kuaishou.com>
Signed-off-by: Yang Honggang <yanghonggang@kuaishou.com>
(cherry picked from commit f60f9ace1a4bceeda256373cf4603058e1947fa8)

Conflicts:
      src/cls/rgw/cls_rgw.cc
- nautilus does not have "rgw_bucket_dir_entry::FLAG_VER"; use "RGW_BUCKET_DIRENT_FLAG_VER" instead

src/cls/rgw/cls_rgw.cc

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