diff options
author | Sage Weil <sage@newdream.net> | 2009-11-18 16:50:41 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-11-20 14:24:27 -0800 |
commit | 0743304d871559cb4c7c066357de2caa60e94c2f (patch) | |
tree | 546510a84c1bda27e71a8a8229544d99f5624252 /fs/ceph/mds_client.c | |
parent | cfea1cf42b614583c02727d5bffd5a2384e92bda (diff) | |
download | blackbird-op-linux-0743304d871559cb4c7c066357de2caa60e94c2f.tar.gz blackbird-op-linux-0743304d871559cb4c7c066357de2caa60e94c2f.zip |
ceph: fix debugfs entry, simplify fsid checks
We may first learn our fsid from any of the mon, osd, or mds maps
(whichever the monitor sends first). Consolidate checks in a single
helper. Initialize the client debugfs entry then, since we need the
fsid (and global_id) for the directory name.
Also remove dead mount code.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r-- | fs/ceph/mds_client.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 8a285158aecc..8d95b0f051e4 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -2782,16 +2782,8 @@ void ceph_mdsc_handle_map(struct ceph_mds_client *mdsc, struct ceph_msg *msg) ceph_decode_need(&p, end, sizeof(fsid)+2*sizeof(u32), bad); ceph_decode_copy(&p, &fsid, sizeof(fsid)); - if (mdsc->client->monc.have_fsid) { - if (ceph_fsid_compare(&fsid, - &mdsc->client->monc.monmap->fsid)) { - pr_err("got mdsmap with wrong fsid\n"); - return; - } - } else { - ceph_fsid_set(&mdsc->client->monc.monmap->fsid, &fsid); - mdsc->client->monc.have_fsid = true; - } + if (ceph_check_fsid(mdsc->client, &fsid) < 0) + return; epoch = ceph_decode_32(&p); maplen = ceph_decode_32(&p); dout("handle_map epoch %u len %d\n", epoch, (int)maplen); |