* [PATCH] ceph: osd_client: fix endianness bug in osd_req_encode_op()
[not found] <4F8ED911.90309@dreamhost.com>
@ 2012-04-18 15:18 ` Alex Elder
0 siblings, 0 replies; only message in thread
From: Alex Elder @ 2012-04-18 15:18 UTC (permalink / raw)
To: ceph-devel; +Cc: Al Viro, Sage Weil, linux-kernel, linux-fsdevel
From Al Viro <viro@zeniv.linux.org.uk>
Al Viro noticed that we were using a non-cpu-encoded value in
a switch statement in osd_req_encode_op(). The result would
clearly not work correctly on a big-endian machine.
Signed-off-by: Alex Elder <elder@dreamhost.com>
---
net/ceph/osd_client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: b/net/ceph/osd_client.c
===================================================================
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -278,7 +278,7 @@ static void osd_req_encode_op(struct cep
{
dst->op = cpu_to_le16(src->op);
- switch (dst->op) {
+ switch (src->op) {
case CEPH_OSD_OP_READ:
case CEPH_OSD_OP_WRITE:
dst->extent.offset =
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-04-18 15:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4F8ED911.90309@dreamhost.com>
2012-04-18 15:18 ` [PATCH] ceph: osd_client: fix endianness bug in osd_req_encode_op() Alex Elder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox