From f96d2d8f1bd10dfbc38decceda7a2b7037609532 Mon Sep 17 00:00:00 2001 From: Xuehan Xu Date: Wed, 16 Aug 2017 19:08:33 +0800 Subject: [PATCH] OSD: also check the exsistence of clone obc for "CEPH_SNAPDIR" requests 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 --- src/osd/ReplicatedPG.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 2d0f23da3e8a5..9a63fb7bc199f 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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; -- 2.39.5