]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: For prmote object, if met error, delete the tmp obj.
authorJianpeng Ma <jianpeng.ma@intel.com>
Tue, 9 Jun 2015 02:57:28 +0000 (10:57 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Tue, 9 Jun 2015 02:57:28 +0000 (10:57 +0800)
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 <jianpeng.ma@intel.com>
src/osd/ReplicatedPG.cc

index fa367fcf7c8f698debae97feb0d0eb7438427dbf..4b12bb9ba3b728f001da020e9dd091c4b560d70f 100644 (file)
@@ -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);