summaryrefslogtreecommitdiff
path: root/fs/ceph/mdsmap.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-06-17 14:19:01 -0700
committerSage Weil <sage@newdream.net>2010-08-01 20:11:40 -0700
commit0deb01c9998f8112c5e478e3fe3a930131abbc0a (patch)
tree1b98a08ce630949268c4f26d5f232d07acb5c7ba /fs/ceph/mdsmap.c
parentcd84db6e4051a9fb7941d49d31a0193a3371fd61 (diff)
downloadkernel-common-0deb01c9998f8112c5e478e3fe3a930131abbc0a.tar.gz
kernel-common-0deb01c9998f8112c5e478e3fe3a930131abbc0a.tar.bz2
kernel-common-0deb01c9998f8112c5e478e3fe3a930131abbc0a.zip
ceph: track laggy state of mds from mdsmap
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mdsmap.c')
-rw-r--r--fs/ceph/mdsmap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ceph/mdsmap.c b/fs/ceph/mdsmap.c
index c4c498e6dfef..040be6d1150b 100644
--- a/fs/ceph/mdsmap.c
+++ b/fs/ceph/mdsmap.c
@@ -85,6 +85,7 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
struct ceph_entity_addr addr;
u32 num_export_targets;
void *pexport_targets = NULL;
+ struct ceph_timespec laggy_since;
ceph_decode_need(p, end, sizeof(u64)*2 + 1 + sizeof(u32), bad);
global_id = ceph_decode_64(p);
@@ -103,7 +104,7 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
state_seq = ceph_decode_64(p);
ceph_decode_copy(p, &addr, sizeof(addr));
ceph_decode_addr(&addr);
- *p += sizeof(struct ceph_timespec);
+ ceph_decode_copy(p, &laggy_since, sizeof(laggy_since));
*p += sizeof(u32);
ceph_decode_32_safe(p, end, namelen, bad);
*p += namelen;
@@ -122,6 +123,9 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
m->m_info[mds].global_id = global_id;
m->m_info[mds].state = state;
m->m_info[mds].addr = addr;
+ m->m_info[mds].laggy =
+ (laggy_since.tv_sec != 0 ||
+ laggy_since.tv_nsec != 0);
m->m_info[mds].num_export_targets = num_export_targets;
if (num_export_targets) {
m->m_info[mds].export_targets =