diff options
author | Sage Weil <sage@newdream.net> | 2009-11-18 19:50:41 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-11-20 17:24:27 -0500 |
commit | 0743304d871559cb4c7c066357de2caa60e94c2f (patch) | |
tree | 546510a84c1bda27e71a8a8229544d99f5624252 /fs/ceph/osd_client.c | |
parent | cfea1cf42b614583c02727d5bffd5a2384e92bda (diff) |
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/osd_client.c')
-rw-r--r-- | fs/ceph/osd_client.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c index ca0ee68c322a..d63f192999ee 100644 --- a/fs/ceph/osd_client.c +++ b/fs/ceph/osd_client.c | |||
@@ -882,16 +882,8 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg) | |||
882 | /* verify fsid */ | 882 | /* verify fsid */ |
883 | ceph_decode_need(&p, end, sizeof(fsid), bad); | 883 | ceph_decode_need(&p, end, sizeof(fsid), bad); |
884 | ceph_decode_copy(&p, &fsid, sizeof(fsid)); | 884 | ceph_decode_copy(&p, &fsid, sizeof(fsid)); |
885 | if (osdc->client->monc.have_fsid) { | 885 | if (ceph_check_fsid(osdc->client, &fsid) < 0) |
886 | if (ceph_fsid_compare(&fsid, | 886 | return; |
887 | &osdc->client->monc.monmap->fsid)) { | ||
888 | pr_err("got osdmap with wrong fsid, ignoring\n"); | ||
889 | return; | ||
890 | } | ||
891 | } else { | ||
892 | ceph_fsid_set(&osdc->client->monc.monmap->fsid, &fsid); | ||
893 | osdc->client->monc.have_fsid = true; | ||
894 | } | ||
895 | 887 | ||
896 | down_write(&osdc->map_sem); | 888 | down_write(&osdc->map_sem); |
897 | 889 | ||