From: Sage Weil Date: Tue, 21 Apr 2009 22:12:06 +0000 (-0700) Subject: kclient: queue cap or delayed check if we get unwanted WR|EXCL caps X-Git-Tag: v0.7.3~84 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=22d2987972a3ca7eaccd30df2260dfa347b6ca7d;p=ceph.git kclient: queue cap or delayed check if we get unwanted WR|EXCL caps This ensures we eventually release unwanted WR|EXCL caps. --- diff --git a/src/kernel/caps.c b/src/kernel/caps.c index 255f60b8362..6d7aa08caf8 100644 --- a/src/kernel/caps.c +++ b/src/kernel/caps.c @@ -510,13 +510,16 @@ retry: } /* - * If we are issued caps we don't want, queue a check so we'll - * update the mds wanted value. + * If we are issued caps we don't want, or the mds' wanted + * value appears to be off, queue a check so we'll release + * later and/or update the mds wanted value. */ actual_wanted = __ceph_caps_wanted(ci); - if (wanted & ~actual_wanted) { - dout(10, " mds wanted %s, actual wanted %s, queueing\n", - ceph_cap_string(wanted), ceph_cap_string(actual_wanted)); + if ((wanted & ~actual_wanted) || + (issued & ~actual_wanted & CEPH_CAP_ANY_WR)) { + dout(10, " issued %s, mds wanted %s, actual %s, queueing\n", + ceph_cap_string(issued), ceph_cap_string(wanted), + ceph_cap_string(actual_wanted)); __cap_set_timeouts(mdsc, ci); __cap_delay_requeue(mdsc, ci); }