]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: be explicit in masking bottom 16 bits
authorAlex Elder <elder@inktank.com>
Fri, 29 Mar 2013 19:28:03 +0000 (14:28 -0500)
committerAlex Elder <elder@inktank.com>
Thu, 4 Apr 2013 14:17:52 +0000 (09:17 -0500)
commitbc7bdaa3487c4d480a9adb785a46b94c7021f6fb
tree819753ce13c3d9693c3751762dffc34fc190c1c5
parentddcb7527662504b8f676df8950527218ce109680
libceph: be explicit in masking bottom 16 bits

In ceph_osdc_build_request() there is a call to cpu_to_le16() which
provides a 64-bit value as its argument.  Because of the implied
byte swapping going on it looked pretty suspect to me.

At the moment it turns out the behavior is well defined, but masking
off those bottom bits explicitly eliminates this distraction, and is
in fact more directly related to the purpose of the message header's
data_off field.

This resolves:
    http://tracker.ceph.com/issues/4125

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
net/ceph/osd_client.c