]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: Wait for caps to flush when flushing metadata.
authorGreg Farnum <greg@inktank.com>
Mon, 28 Jan 2013 19:55:03 +0000 (11:55 -0800)
committerGreg Farnum <greg@inktank.com>
Tue, 29 Jan 2013 18:51:48 +0000 (10:51 -0800)
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 <greg@inktank.com>
src/client/Client.cc

index feb3beb8a312b3659c63a74be4e81886cd20c445..705c162da3b4dfeafaa0473a12d39af328971317 100644 (file)
@@ -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;