From: Jianpeng Ma Date: Tue, 9 Jun 2015 02:57:28 +0000 (+0800) Subject: osd/ReplicatedPG: For prmote object, if met error, delete the tmp obj. X-Git-Tag: v9.0.3~57^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cbf1d34f538addbf951199039cac7f6929087ead;p=ceph.git osd/ReplicatedPG: For prmote object, if met error, delete the tmp obj. If promote large object, it need copy some times, if not the first time met EIO, it should romove the tmp object Signed-off-by: Jianpeng Ma --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index fa367fcf7c8..4b12bb9ba3b 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -6609,7 +6609,7 @@ void ReplicatedPG::finish_promote(int r, CopyResults *results, } } - if (r == -ENOENT && results->started_temp_obj) { + if (r < 0 && results->started_temp_obj) { dout(10) << __func__ << " abort; will clean up partial work" << dendl; ObjectContextRef tempobc = get_object_context(results->temp_oid, true); RepGather *repop = simple_repop_create(tempobc);