summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Farnum <greg@inktank.com>2013-10-07 13:11:21 -0700
committerGreg Farnum <greg@inktank.com>2013-10-07 13:50:30 -0700
commit4b911cf81773d43f3574724a0ac97c79e1ab2b22 (patch)
tree43621652bb9ae03f864f575bdd91f1704824000a
parent6da4b91c07878e07f23eee563cf1d2422f348c2f (diff)
downloadceph-4b911cf81773d43f3574724a0ac97c79e1ab2b22.tar.gz
ReplicatedPG: copy: use aggregate return code instead of individual Op returnwip-rval
It appears that the OSD is not filling in the individual return codes, and they should be equivalent for all purposes we care about here (the only Op we are doing is the copy-get, and if it fails we are getting its failure code). Reported-by: Sage Weil <sage@inktank.com> Signed-off-by: Greg Farnum <greg@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/osd/ReplicatedPG.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index d02a9c9cc48..6c8b092ca01 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);