Skip to content

Commit

Permalink
ceph: some endianity fixes
Browse files Browse the repository at this point in the history
Fix some problems that came up with sparse.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Yehuda Sadeh authored and Sage Weil committed Jun 13, 2010
1 parent 7e27d6e commit 0cf5537
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fs/ceph/auth_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ static int ceph_x_handle_reply(struct ceph_auth_client *ac, int result,
return -EAGAIN;
}

op = le32_to_cpu(head->op);
op = le16_to_cpu(head->op);
result = le32_to_cpu(head->result);
dout("handle_reply op %d result %d\n", op, result);
switch (op) {
Expand Down
2 changes: 1 addition & 1 deletion fs/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ static void prepare_write_connect(struct ceph_messenger *msgr,
dout("prepare_write_connect %p cseq=%d gseq=%d proto=%d\n", con,
con->connect_seq, global_seq, proto);

con->out_connect.features = CEPH_FEATURE_SUPPORTED_CLIENT;
con->out_connect.features = cpu_to_le64(CEPH_FEATURE_SUPPORTED_CLIENT);
con->out_connect.host_type = cpu_to_le32(CEPH_ENTITY_TYPE_CLIENT);
con->out_connect.connect_seq = cpu_to_le32(con->connect_seq);
con->out_connect.global_seq = cpu_to_le32(global_seq);
Expand Down
3 changes: 2 additions & 1 deletion fs/ceph/mon_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,8 @@ static void handle_auth_reply(struct ceph_mon_client *monc,
dout("authenticated, starting session\n");

monc->client->msgr->inst.name.type = CEPH_ENTITY_TYPE_CLIENT;
monc->client->msgr->inst.name.num = monc->auth->global_id;
monc->client->msgr->inst.name.num =
cpu_to_le64(monc->auth->global_id);

__send_subscribe(monc);
__resend_generic_request(monc);
Expand Down

0 comments on commit 0cf5537

Please sign in to comment.