]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
uclient: be more careful about sending caps.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 11 May 2011 00:05:12 +0000 (17:05 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Thu, 12 May 2011 21:34:56 +0000 (14:34 -0700)
This should prevent us from "losing" caps off the dirty list. See
#1063. If we have dirty caps we don't want to short-circuit out
of sending caps just because what we're issued matches what we want.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/client/Client.cc

index 6ab4643b6c6f7daee2c39247cf56127b8431bef8..d7af2b68fb73203f7f2f88cfe2c352922c4a378d 100644 (file)
@@ -1987,8 +1987,9 @@ void Client::check_caps(Inode *in, bool is_delayed)
       goto ack;
 
     if (wanted == cap->wanted &&         // mds knows what we want.
-       (cap->issued & ~retain) == 0)    // and we don't have anything we wouldn't like
-      continue;   
+       ((cap->issued & ~retain) == 0) &&// and we don't have anything we wouldn't like
+       !in->dirty_caps)                 // and we have no dirty caps
+      continue;
 
     if (now < in->hold_caps_until) {
       dout(10) << "delaying cap release" << dendl;