]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: trigger the completion in _flush when short-cutting
authorGreg Farnum <greg@inktank.com>
Thu, 7 Feb 2013 00:35:49 +0000 (16:35 -0800)
committerGreg Farnum <greg@inktank.com>
Thu, 7 Feb 2013 00:47:51 +0000 (16:47 -0800)
We missed a shortcut return from _flush() when doing
e9a6694d0151b79c3a3b44cee5df8e3d4dcbfc2c, so _fsync() calls
were failing. To fix, if _flush discovers there's nothing to flush,
trigger the completion by calling onfinish->finish().

Fixes #4038

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/client/Client.cc

index 4ff30797284acce4bee1e017ce160f5c0543a8f5..418a46df3a252cf48a2b79550caadab13f149d0c 100644 (file)
@@ -2572,6 +2572,8 @@ bool Client::_flush(Inode *in, Context *onfinish)
 
   if (!in->oset.dirty_or_tx) {
     ldout(cct, 10) << " nothing to flush" << dendl;
+    if (onfinish)
+      onfinish->complete(0);
     return true;
   }