diff options
author | Sage Weil <sage@newdream.net> | 2010-03-17 19:30:21 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-17 18:25:34 -0400 |
commit | aab53dd9e81ccefa7b8d88eec5138dd73639a783 (patch) | |
tree | b61a95b826507b403a84177436ff83a999e10c4c /fs/ceph | |
parent | e01a594646ebbf964b6058e3bf28125379063439 (diff) |
ceph: only send cap releases when mds is OPEN|HUNG
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>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/mds_client.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index a4d9e5b0fd3d..d45787470fb5 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -2647,7 +2647,9 @@ static void delayed_work(struct work_struct *work) | |||
2647 | else | 2647 | else |
2648 | ceph_con_keepalive(&s->s_con); | 2648 | ceph_con_keepalive(&s->s_con); |
2649 | add_cap_releases(mdsc, s, -1); | 2649 | add_cap_releases(mdsc, s, -1); |
2650 | send_cap_releases(mdsc, s); | 2650 | if (s->s_state == CEPH_MDS_SESSION_OPEN || |
2651 | s->s_state == CEPH_MDS_SESSION_HUNG) | ||
2652 | send_cap_releases(mdsc, s); | ||
2651 | mutex_unlock(&s->s_mutex); | 2653 | mutex_unlock(&s->s_mutex); |
2652 | ceph_put_mds_session(s); | 2654 | ceph_put_mds_session(s); |
2653 | 2655 | ||