From: Sage Weil Date: Mon, 21 Sep 2009 23:52:19 +0000 (-0700) Subject: kclient: fix le encoding bugs (yay sparse) X-Git-Tag: v0.15~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0a338c1d9d7f9b37a2ccad0ec447a7b3bb7f38d5;p=ceph.git kclient: fix le encoding bugs (yay sparse) --- diff --git a/src/kernel/messenger.c b/src/kernel/messenger.c index 1c4d4e726ee..49150422a03 100644 --- a/src/kernel/messenger.c +++ b/src/kernel/messenger.c @@ -970,7 +970,7 @@ static int read_partial_ack(struct ceph_connection *con) static void process_ack(struct ceph_connection *con) { struct ceph_msg *m; - u32 ack = le32_to_cpu(con->in_temp_ack); + u64 ack = le64_to_cpu(con->in_temp_ack); u64 seq; mutex_lock(&con->out_mutex); diff --git a/src/kernel/mon_client.c b/src/kernel/mon_client.c index 1c1decc098d..25589860077 100644 --- a/src/kernel/mon_client.c +++ b/src/kernel/mon_client.c @@ -634,7 +634,7 @@ static struct ceph_msg *mon_alloc_msg(struct ceph_connection *con, struct ceph_msg_header *hdr) { struct ceph_mon_client *monc = con->private; - int type = le32_to_cpu(hdr->type); + int type = le16_to_cpu(hdr->type); switch (type) { case CEPH_MSG_CLIENT_MOUNT_ACK: diff --git a/src/kernel/osd_client.c b/src/kernel/osd_client.c index b19b5216b89..b7fca81d137 100644 --- a/src/kernel/osd_client.c +++ b/src/kernel/osd_client.c @@ -168,7 +168,7 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc, ceph_osdc_put_request(req); return ERR_PTR(PTR_ERR(msg)); } - msg->hdr.type = cpu_to_le32(CEPH_MSG_OSD_OP); + msg->hdr.type = cpu_to_le16(CEPH_MSG_OSD_OP); memset(msg->front.iov_base, 0, msg->front.iov_len); head = msg->front.iov_base; op = (void *)(head + 1); @@ -1255,7 +1255,7 @@ static struct ceph_msg *alloc_msg(struct ceph_connection *con, { struct ceph_osd *osd = con->private; struct ceph_osd_client *osdc = osd->o_osdc; - int type = le32_to_cpu(hdr->type); + int type = le16_to_cpu(hdr->type); switch (type) { case CEPH_MSG_OSD_OPREPLY: