summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-10-07 05:14:02 -0700
committerSage Weil <sage@inktank.com>2013-10-07 05:22:41 -0700
commit21119e7ed1bfd5db82610283304081ba410b597d (patch)
treea95045323f981b922eecbd38e20bc4057c3d2dc2
parent02da1a1d79d97570f682ab84b289cdff0bc800d4 (diff)
downloadceph-21119e7ed1bfd5db82610283304081ba410b597d.tar.gz
osd/ReplicatedPG: fix copy_from error path
This broke somewhere in the refactor merged in commit c95d0a164fe9406e85be0033ace3ebc91f7b2dc6. Drop the else block so that the flow is a bit easier to follow. Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/osd/ReplicatedPG.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index d02a9c9cc48..2e68116b3e2 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -4412,16 +4412,16 @@ 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<0>() = cop->rval;
+ results.get<1>() = cop->temp_cursor.data_offset;
+ dout(20) << __func__ << " complete; committing" << dendl;
+ } else {
+ results.get<0>() = r;
}
- dout(20) << __func__ << " complete; committing" << dendl;
- results.get<0>() = cop->rval;
cop->cb->complete(results);
-
copy_ops.erase(obc->obs.oi.soid);
--obc->copyfrom_readside;
kick_object_context_blocked(obc);