]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: fix le encoding bugs (yay sparse)
authorSage Weil <sage@newdream.net>
Mon, 21 Sep 2009 23:52:19 +0000 (16:52 -0700)
committerSage Weil <sage@newdream.net>
Mon, 21 Sep 2009 23:52:19 +0000 (16:52 -0700)
src/kernel/messenger.c
src/kernel/mon_client.c
src/kernel/osd_client.c

index 1c4d4e726ee03ffa8d8bb838f1d2ccbece70b13d..49150422a0332d78a761d67f383be5a3a4bd0bf8 100644 (file)
@@ -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);
index 1c1decc098dcc66de47a65c0c66a811580afd350..25589860077d61534244376224768ec22475e79c 100644 (file)
@@ -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:
index b19b5216b89bb128db2e7f60e74b6536639ed2f1..b7fca81d13756254c58abc4d9e52da6a1533f702 100644 (file)
@@ -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: