From: Greg Farnum Date: Thu, 7 Feb 2013 00:35:49 +0000 (-0800) Subject: client: trigger the completion in _flush when short-cutting X-Git-Tag: v0.58~133 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=46d7dbd3472f26926c6d048bfc3c150074bfd283;p=ceph.git client: trigger the completion in _flush when short-cutting 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 Reviewed-by: Sage Weil --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 4ff30797284..418a46df3a2 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -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; }