diff options
-rw-r--r-- | src/os/FileStore.cc | 4 | ||||
-rw-r--r-- | src/osd/ReplicatedPG.cc | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 514ff022bee..3506c4a4ccd 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -3464,6 +3464,8 @@ int FileStore::getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr> dout(10) << __func__ << " could not get omap_attrs r = " << r << dendl; goto out; } + if (r == -ENOENT) + r = 0; assert(omap_attrs.size() == omap_aset.size()); for (map<string, bufferlist>::iterator i = omap_aset.begin(); i != omap_aset.end(); @@ -3651,6 +3653,8 @@ int FileStore::_rmattrs(coll_t cid, const ghobject_t& oid, dout(10) << __func__ << " could not remove omap_attrs r = " << r << dendl; return r; } + if (r == -ENOENT) + r = 0; out: dout(10) << "rmattrs " << cid << "/" << oid << " = " << r << dendl; return r; diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 93540f4fc81..f466eb8ccdc 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -4412,14 +4412,13 @@ void ReplicatedPG::process_copy_chunk(hobject_t oid, tid_t tid, int r) dout(10) << __func__ << " fetching more" << dendl; _copy_some(obc, cop); return; - } else { - _build_finish_copy_transaction(cop, results.get<3>()); - results.get<1>() = cop->temp_cursor.data_offset; } + _build_finish_copy_transaction(cop, results.get<3>()); + results.get<1>() = cop->temp_cursor.data_offset; } dout(20) << __func__ << " complete; committing" << dendl; - results.get<0>() = cop->rval; + results.get<0>() = r; cop->cb->complete(results); copy_ops.erase(obc->obs.oi.soid); |