aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/mon_client.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-02-20 00:43:23 -0500
committerSage Weil <sage@newdream.net>2010-02-23 17:26:29 -0500
commit5b3a4db3e4009aff918abb1353eb3f4925393a7b (patch)
tree0f55666c827c3dfe31309209b69121e431366739 /fs/ceph/mon_client.c
parentbcd2cbd10ce31c950a40c08d7f601f8ff23537b8 (diff)
ceph: fix up unexpected message handling
Fix skipping of unexpected message types from osd, mon. Clean up pr_info and debug output. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mon_client.c')
-rw-r--r--fs/ceph/mon_client.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/ceph/mon_client.c b/fs/ceph/mon_client.c
index 40d7d90bbed1..890597c09d43 100644
--- a/fs/ceph/mon_client.c
+++ b/fs/ceph/mon_client.c
@@ -763,7 +763,7 @@ static struct ceph_msg *mon_alloc_msg(struct ceph_connection *con,
763 struct ceph_mon_client *monc = con->private; 763 struct ceph_mon_client *monc = con->private;
764 int type = le16_to_cpu(hdr->type); 764 int type = le16_to_cpu(hdr->type);
765 int front_len = le32_to_cpu(hdr->front_len); 765 int front_len = le32_to_cpu(hdr->front_len);
766 struct ceph_msg *m; 766 struct ceph_msg *m = NULL;
767 767
768 *skip = 0; 768 *skip = 0;
769 769
@@ -777,13 +777,17 @@ static struct ceph_msg *mon_alloc_msg(struct ceph_connection *con,
777 case CEPH_MSG_AUTH_REPLY: 777 case CEPH_MSG_AUTH_REPLY:
778 m = ceph_msgpool_get(&monc->msgpool_auth_reply, front_len); 778 m = ceph_msgpool_get(&monc->msgpool_auth_reply, front_len);
779 break; 779 break;
780 default: 780 case CEPH_MSG_MON_MAP:
781 return NULL; 781 case CEPH_MSG_MDS_MAP:
782 case CEPH_MSG_OSD_MAP:
783 m = ceph_msg_new(type, front_len, 0, 0, NULL);
784 break;
782 } 785 }
783 786
784 if (!m) 787 if (!m) {
788 pr_info("alloc_msg unknown type %d\n", type);
785 *skip = 1; 789 *skip = 1;
786 790 }
787 return m; 791 return m;
788} 792}
789 793