osd_req_encode_op() breakage?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
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?
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux