diff options
author | Sage Weil <sage@newdream.net> | 2009-11-10 19:02:23 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-11-10 19:03:53 -0500 |
commit | cdac830313fa6bf2831693af80fefe4aaac11b7d (patch) | |
tree | cf5004237a084779ca84130c3303e42e9ea9fa35 /fs/ceph/mds_client.c | |
parent | eed0ef2caf928327332da54d23579debe629d5bc (diff) |
ceph: remove recon_gen logic
We don't get an explicit affirmative confirmation that our caps reconnect,
nor do we necessarily want to pay that cost. So, take all this code out
for now.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r-- | fs/ceph/mds_client.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 828417ae16f9..aad10d90feee 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -329,7 +329,6 @@ static struct ceph_mds_session *register_session(struct ceph_mds_client *mdsc, | |||
329 | ceph_con_open(&s->s_con, ceph_mdsmap_get_addr(mdsc->mdsmap, mds)); | 329 | ceph_con_open(&s->s_con, ceph_mdsmap_get_addr(mdsc->mdsmap, mds)); |
330 | 330 | ||
331 | spin_lock_init(&s->s_cap_lock); | 331 | spin_lock_init(&s->s_cap_lock); |
332 | s->s_recon_gen = 0; | ||
333 | s->s_cap_gen = 0; | 332 | s->s_cap_gen = 0; |
334 | s->s_cap_ttl = 0; | 333 | s->s_cap_ttl = 0; |
335 | s->s_renew_requested = 0; | 334 | s->s_renew_requested = 0; |
@@ -736,25 +735,14 @@ static void remove_session_caps(struct ceph_mds_session *session) | |||
736 | static int wake_up_session_cb(struct inode *inode, struct ceph_cap *cap, | 735 | static int wake_up_session_cb(struct inode *inode, struct ceph_cap *cap, |
737 | void *arg) | 736 | void *arg) |
738 | { | 737 | { |
739 | struct ceph_mds_session *session = arg; | ||
740 | |||
741 | spin_lock(&inode->i_lock); | ||
742 | if (cap->recon_gen != session->s_recon_gen) { | ||
743 | pr_err("failed reconnect %p %llx.%llx cap %p " | ||
744 | "(recon_gen %d < session %d)\n", inode, | ||
745 | ceph_vinop(inode), cap, | ||
746 | cap->recon_gen, session->s_recon_gen); | ||
747 | __ceph_remove_cap(cap, NULL); | ||
748 | } | ||
749 | wake_up(&ceph_inode(inode)->i_cap_wq); | 738 | wake_up(&ceph_inode(inode)->i_cap_wq); |
750 | spin_unlock(&inode->i_lock); | ||
751 | return 0; | 739 | return 0; |
752 | } | 740 | } |
753 | 741 | ||
754 | static void wake_up_session_caps(struct ceph_mds_session *session) | 742 | static void wake_up_session_caps(struct ceph_mds_session *session) |
755 | { | 743 | { |
756 | dout("wake_up_session_caps %p mds%d\n", session, session->s_mds); | 744 | dout("wake_up_session_caps %p mds%d\n", session, session->s_mds); |
757 | iterate_session_caps(session, wake_up_session_cb, session); | 745 | iterate_session_caps(session, wake_up_session_cb, NULL); |
758 | } | 746 | } |
759 | 747 | ||
760 | /* | 748 | /* |
@@ -2052,7 +2040,6 @@ static void send_mds_reconnect(struct ceph_mds_client *mdsc, int mds) | |||
2052 | 2040 | ||
2053 | session->s_state = CEPH_MDS_SESSION_RECONNECTING; | 2041 | session->s_state = CEPH_MDS_SESSION_RECONNECTING; |
2054 | session->s_seq = 0; | 2042 | session->s_seq = 0; |
2055 | session->s_recon_gen++; | ||
2056 | 2043 | ||
2057 | ceph_con_open(&session->s_con, | 2044 | ceph_con_open(&session->s_con, |
2058 | ceph_mdsmap_get_addr(mdsc->mdsmap, mds)); | 2045 | ceph_mdsmap_get_addr(mdsc->mdsmap, mds)); |