From: Greg Farnum Date: Mon, 28 Jan 2013 19:55:03 +0000 (-0800) Subject: client: Wait for caps to flush when flushing metadata. X-Git-Tag: v0.58~142^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7cd4e50ddf103d93308715218ec2735d93d493ac;p=ceph.git client: Wait for caps to flush when flushing metadata. Embarrassingly, this conditional has been backwards since I committed it in 818e7939. But we want to do the wait when we did do the flush and are syncing metadata. As the code previously stood, we only did the wait when we didn't care, and it didn't wait anyway since it was waiting for 0. So, bad all around. Signed-off-by: Greg Farnum --- diff --git a/src/client/Client.cc b/src/client/Client.cc index feb3beb8a312..705c162da3b4 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -5900,7 +5900,7 @@ int Client::_fsync(Fh *f, bool syncdataonly) wait_on_list(in->waitfor_commit); } - if (!flushed_metadata) wait_sync_caps(wait_on_flush); //this could wait longer than strictly necessary, + if (flushed_metadata) wait_sync_caps(wait_on_flush); //this could wait longer than strictly necessary, //but on a sync the user can put up with it ldout(cct, 10) << "ino " << in->ino << " has no uncommitted writes" << dendl;