]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: lazy should wait on correct waitlist
authorSage Weil <sage@newdream.net>
Wed, 16 Apr 2008 16:51:32 +0000 (09:51 -0700)
committerSage Weil <sage@newdream.net>
Wed, 16 Apr 2008 16:52:34 +0000 (09:52 -0700)
src/client/Client.cc

index 07cab2c654949e8e70f427dfa2469bac2abf6ed4..8cf6df0a6717becff5152fde88f2039f782274c7 100644 (file)
@@ -3056,7 +3056,10 @@ int Client::_read(Fh *f, off_t offset, off_t size, bufferlist *bl)
       // wait for lazy cap
       if ((in->file_caps() & CEPH_CAP_LAZYIO) == 0) {
        dout(7) << " don't have lazy cap, waiting" << dendl;
-       goto wait;
+       Cond cond;
+       in->waitfor_lazy.push_back(&cond);
+       cond.Wait(client_lock);
+       continue;
       }
     } else {
       // wait for RD cap?