From: Haomai Wang Date: Mon, 13 Oct 2014 02:14:25 +0000 (+0800) Subject: KeyValueStore: Make clone error message more friendly X-Git-Tag: v0.88~51^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fbf4d4763084450c674e81aa2c7af876125619dd;p=ceph.git KeyValueStore: Make clone error message more friendly Signed-off-by: Haomai Wang --- diff --git a/src/os/KeyValueStore.cc b/src/os/KeyValueStore.cc index 0f8c4f7276823..daa8b059bcae3 100644 --- a/src/os/KeyValueStore.cc +++ b/src/os/KeyValueStore.cc @@ -1514,22 +1514,19 @@ unsigned KeyValueStore::_do_transaction(Transaction& transaction, if (r < 0) { bool ok = false; - if (r == -ENOENT && !(op == Transaction::OP_CLONERANGE || - op == Transaction::OP_CLONE || - op == Transaction::OP_CLONERANGE2)) - // -ENOENT is normally okay - // ...including on a replayed OP_RMCOLL with checkpoint mode - ok = true; if (r == -ENODATA) ok = true; if (!ok) { const char *msg = "unexpected error code"; - if (r == -ENOENT && (op == Transaction::OP_CLONERANGE || - op == Transaction::OP_CLONE || - op == Transaction::OP_CLONERANGE2)) - msg = "ENOENT on clone suggests osd bug"; + if (op == Transaction::OP_CLONERANGE || + op == Transaction::OP_CLONE || + op == Transaction::OP_CLONERANGE2) { + dout(0) << "BUG: clone failed will lead to paritial transaction applied" << dendl; + if (r == -ENOENT) + msg = "ENOENT on clone suggests osd bug"; + } if (r == -ENOSPC) // For now, if we hit _any_ ENOSPC, crash, before we do any damage