Transaction::iterator i = transaction.begin();
uint64_t op_num = 0;
+ bool exist_clone = false;
while (i.have_op()) {
if (handle)
coll_t cid = i.decode_cid();
ghobject_t oid = i.decode_oid();
ghobject_t noid = i.decode_oid();
+ exist_clone = true;
r = _clone(cid, oid, noid, t);
}
break;
ghobject_t noid = i.decode_oid();
uint64_t off = i.decode_length();
uint64_t len = i.decode_length();
+ exist_clone = true;
r = _clone_range(cid, oid, noid, off, len, off, t);
}
break;
uint64_t srcoff = i.decode_length();
uint64_t len = i.decode_length();
uint64_t dstoff = i.decode_length();
+ exist_clone = true;
r = _clone_range(cid, oid, noid, srcoff, len, dstoff, t);
}
break;
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 (op == Transaction::OP_CLONERANGE ||
- op == Transaction::OP_CLONE ||
- op == Transaction::OP_CLONERANGE2) {
+ if (exist_clone) {
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)