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>
if (!in->oset.dirty_or_tx) {
ldout(cct, 10) << " nothing to flush" << dendl;
+ if (onfinish)
+ onfinish->complete(0);
return true;
}