• Alex Elder's avatar
    libceph: fix byte order mismatch · 9ef1ee5a
    Alex Elder authored
    A WATCH op includes an object version.  The version that's supplied
    is incorrectly byte-swapped osd_req_op_watch_init() where it's first
    assigned (it's been this way since that code was first added).
    
    The result is that the version sent to the osd is wrong, because
    that value gets byte-swapped again in osd_req_encode_op().  This
    is the source of a sparse warning related to improper byte order in
    the assignment.
    
    The approach of using the version to avoid a race is deprecated
    (see http://tracker.ceph.com/issues/3871), and the watch parameter
    is no longer even examined by the osd.  So fix the assignment in
    osd_req_op_watch_init() so it no longer does the byte swap.
    
    This resolves:
        http://tracker.ceph.com/issues/3847Signed-off-by: default avatarAlex Elder <elder@inktank.com>
    Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
    9ef1ee5a
osd_client.c 67.2 KB