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/caps.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/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 775e6f6fc970..d8132b6e770d 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -610,7 +610,6 @@ retry: | |||
610 | cap->issue_seq = seq; | 610 | cap->issue_seq = seq; |
611 | cap->mseq = mseq; | 611 | cap->mseq = mseq; |
612 | cap->cap_gen = session->s_cap_gen; | 612 | cap->cap_gen = session->s_cap_gen; |
613 | cap->recon_gen = session->s_recon_gen; | ||
614 | 613 | ||
615 | if (fmode >= 0) | 614 | if (fmode >= 0) |
616 | __ceph_get_fmode(ci, fmode); | 615 | __ceph_get_fmode(ci, fmode); |
@@ -627,21 +626,13 @@ retry: | |||
627 | static int __cap_is_valid(struct ceph_cap *cap) | 626 | static int __cap_is_valid(struct ceph_cap *cap) |
628 | { | 627 | { |
629 | unsigned long ttl; | 628 | unsigned long ttl; |
630 | u32 gen, recon_gen; | 629 | u32 gen; |
631 | 630 | ||
632 | spin_lock(&cap->session->s_cap_lock); | 631 | spin_lock(&cap->session->s_cap_lock); |
633 | gen = cap->session->s_cap_gen; | 632 | gen = cap->session->s_cap_gen; |
634 | recon_gen = cap->session->s_recon_gen; | ||
635 | ttl = cap->session->s_cap_ttl; | 633 | ttl = cap->session->s_cap_ttl; |
636 | spin_unlock(&cap->session->s_cap_lock); | 634 | spin_unlock(&cap->session->s_cap_lock); |
637 | 635 | ||
638 | if (cap->recon_gen != recon_gen) { | ||
639 | dout("__cap_is_valid %p cap %p issued %s " | ||
640 | "but DEAD (recon_gen %u vs %u)\n", &cap->ci->vfs_inode, | ||
641 | cap, ceph_cap_string(cap->issued), cap->recon_gen, | ||
642 | recon_gen); | ||
643 | return 0; | ||
644 | } | ||
645 | if (cap->cap_gen < gen || time_after_eq(jiffies, ttl)) { | 636 | if (cap->cap_gen < gen || time_after_eq(jiffies, ttl)) { |
646 | dout("__cap_is_valid %p cap %p issued %s " | 637 | dout("__cap_is_valid %p cap %p issued %s " |
647 | "but STALE (gen %u vs %u)\n", &cap->ci->vfs_inode, | 638 | "but STALE (gen %u vs %u)\n", &cap->ci->vfs_inode, |
@@ -2213,7 +2204,6 @@ restart: | |||
2213 | issued |= implemented | __ceph_caps_dirty(ci); | 2204 | issued |= implemented | __ceph_caps_dirty(ci); |
2214 | 2205 | ||
2215 | cap->cap_gen = session->s_cap_gen; | 2206 | cap->cap_gen = session->s_cap_gen; |
2216 | cap->recon_gen = session->s_recon_gen; | ||
2217 | 2207 | ||
2218 | __check_cap_issue(ci, cap, newcaps); | 2208 | __check_cap_issue(ci, cap, newcaps); |
2219 | 2209 | ||