]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ceph: only send cap releases when mds is OPEN|HUNG
authorSage Weil <sage@newdream.net>
Wed, 17 Mar 2010 23:30:21 +0000 (16:30 -0700)
committerSage Weil <sage@newdream.net>
Mon, 17 May 2010 22:25:34 +0000 (15:25 -0700)
On OPENING we shouldn't have any caps (or releases).
On CLOSING, we should wait until we succeed (and throw it all out), or
don't (and are OPEN again).
On RECONNECTING we can wait until we are OPEN.

Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/mds_client.c

index a4d9e5b0fd3db3b11729866488a798023a27d67c..d45787470fb5af40074fb7e866b48dc244c9ccc6 100644 (file)
@@ -2647,7 +2647,9 @@ static void delayed_work(struct work_struct *work)
                else
                        ceph_con_keepalive(&s->s_con);
                add_cap_releases(mdsc, s, -1);
-               send_cap_releases(mdsc, s);
+               if (s->s_state == CEPH_MDS_SESSION_OPEN ||
+                   s->s_state == CEPH_MDS_SESSION_HUNG)
+                       send_cap_releases(mdsc, s);
                mutex_unlock(&s->s_mutex);
                ceph_put_mds_session(s);