summaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorSage Weil2009-11-09 21:05:48 +0100
committerSage Weil2009-11-09 21:06:07 +0100
commit685f9a5d14194fc35db73e5e7370740ccc14b64a (patch)
tree4c34ac2348149d91ad5e08cd105207810f0afdc9 /fs/ceph/super.h
parentceph: make CRUSH hash function a bucket property (diff)
downloadkernel-qcow2-linux-685f9a5d14194fc35db73e5e7370740ccc14b64a.tar.gz
kernel-qcow2-linux-685f9a5d14194fc35db73e5e7370740ccc14b64a.tar.xz
kernel-qcow2-linux-685f9a5d14194fc35db73e5e7370740ccc14b64a.zip
ceph: do not confuse stale and dead (unreconnected) caps
We were using the cap_gen to track both stale caps (caps that timed out due to temporarily losing touch with the mds) and dead caps that did not reconnect after an MDS failure. Introduce a recon_gen counter to track reconnections to restarted MDSs and kill dead caps based on that instead. Rename gen to cap_gen while we're at it to make it more clear which is which. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r--fs/ceph/super.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 05947b96c524..25793559a2e5 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -169,7 +169,9 @@ struct ceph_cap {
int issued; /* latest, from the mds */
int implemented; /* implemented superset of issued (for revocation) */
int mds_wanted;
- u32 seq, issue_seq, mseq, gen;
+ u32 seq, issue_seq, mseq;
+ u32 cap_gen; /* active/stale cycle */
+ u32 recon_gen; /* mds restart reconnect cycle */
unsigned long last_used;
struct list_head caps_item;
};