]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/CInode: fix potential fin hanging 9773/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 17 Jun 2016 08:13:31 +0000 (16:13 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 17 Jun 2016 23:33:26 +0000 (07:33 +0800)
The behaviour of handle_write_error() process is configurable
and therefore is  non-deterministic. Thus we'd better to finish
the context here anyway.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mds/CInode.cc

index ea58d3831536d06545522ef8b4c050b6a6c2637a..95027555366a4195de64744af68bc932e9a4fc34 100644 (file)
@@ -995,6 +995,7 @@ void CInode::_stored(int r, version_t v, Context *fin)
     mdcache->mds->clog->error() << "failed to store ino " << ino() << " object,"
                                << " errno " << r << "\n";
     mdcache->mds->handle_write_error(r);
+    fin->complete(r);
     return;
   }
 
@@ -1211,6 +1212,8 @@ void CInode::_stored_backtrace(int r, version_t v, Context *fin)
                                 << ", pool " << get_backtrace_pool()
                                 << ", errno " << r << "\n";
     mdcache->mds->handle_write_error(r);
+    if (fin)
+      fin->complete(r);
     return;
   }