From: Al Viro <viro@ZenIV.linux.org.uk>
To: Sage Weil <sage@newdream.net>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: osd_req_encode_op() breakage?
Date: Sat, 14 Apr 2012 03:34:20 +0100 [thread overview]
Message-ID: <20120414023420.GQ6589@ZenIV.linux.org.uk> (raw)
static void osd_req_encode_op(struct ceph_osd_request *req,
struct ceph_osd_op *dst,
struct ceph_osd_req_op *src)
{
dst->op = cpu_to_le16(src->op);
switch (dst->op) {
case CEPH_OSD_OP_READ:
case CEPH_OSD_OP_WRITE:
is an interesting thing to say, seeing that CEPH_OSD_OP_READ et.al. are
all host-endian... Should that be "switch (src->op)" instead? AFAICS,
that sucker had appeared in that form back in
commit 68b4476b0bc13fef18266b4140309a30e86739d2
Author: Yehuda Sadeh <yehuda@hq.newdream.net>
Date: Tue Apr 6 15:01:27 2010 -0700
ceph: messenger and osdc changes for rbd
and it seems to be broken on big-endian hosts. Doesn't look like a misspelled
le16_to_cpu() either, since dst->op ends up going on the wire...
I'm really mystified by that - it looks like it must've shown up immediately
on big-endian hosts; it's not like it was an obscure codepath, after all...
Comments?
next reply other threads:[~2012-04-14 2:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-14 2:34 Al Viro [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-04-18 15:09 osd_req_encode_op() breakage? Alex Elder
2012-04-18 15:32 ` Al Viro
2012-04-18 15:56 ` Yehuda Sadeh Weinraub
2012-04-18 15:56 ` Yehuda Sadeh Weinraub
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120414023420.GQ6589@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sage@newdream.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.