]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: also check the exsistence of clone obc for "CEPH_SNAPDIR" requests 17707/head
authorXuehan Xu <xuxuehan@360.cn>
Wed, 16 Aug 2017 11:08:33 +0000 (19:08 +0800)
committerSage Weil <sage@redhat.com>
Wed, 13 Sep 2017 21:52:31 +0000 (17:52 -0400)
If the incoming request's snapid is CEPH_SNAPDIR and the object context
of clones of its targeting object doesn't exist, also promote those clones

This cannot be cherry-picked from master because ReplicatedPG::do_op()
in "master" branch has been completely reconstructed.

Fixes: http://tracker.ceph.com/issues/17445
Signed-off-by: Xuehan Xu <xuxuehan@360.cn>
src/osd/ReplicatedPG.cc

index 2d0f23da3e8a59b18bc6f8b5fa835762f0c70c24..9a63fb7bc199f1d10fe717c320e600494ab9212d 100644 (file)
@@ -2054,7 +2054,7 @@ void ReplicatedPG::do_op(OpRequestRef& op)
        }
 
        ObjectContextRef sobc = get_object_context(clone_oid, false);
-       if (!sobc) {
+       if (!sobc || !sobc->obs.exists) {
          if (!maybe_handle_cache(op, write_ordered, sobc, -ENOENT, clone_oid, true))
            osd->reply_op_error(op, -ENOENT);
          return;