]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ceph: add cpu_to_le32() calls when encoding a reconnect capability
authorJim Schutt <jaschut@sandia.gov>
Wed, 15 May 2013 18:03:35 +0000 (13:03 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Jun 2013 19:01:27 +0000 (12:01 -0700)
commit7662e04a958484d22fa9f18c7c6c35e0230d9207
treec4ccd0615539e4980e4da26f1348ba6647dcdb37
parent7b1b7a82e10d5d2eef133260bca9c5709f8f257c
ceph: add cpu_to_le32() calls when encoding a reconnect capability

commit c420276a532a10ef59849adc2681f45306166b89 upstream.

In his review, Alex Elder mentioned that he hadn't checked that
num_fcntl_locks and num_flock_locks were properly decoded on the
server side, from a le32 over-the-wire type to a cpu type.
I checked, and AFAICS it is done; those interested can consult
    Locker::_do_cap_update()
in src/mds/Locker.cc and src/include/encoding.h in the Ceph server
code (git://github.com/ceph/ceph).

I also checked the server side for flock_len decoding, and I believe
that also happens correctly, by virtue of having been declared
__le32 in struct ceph_mds_cap_reconnect, in src/include/ceph_fs.h.

Signed-off-by: Jim Schutt <jaschut@sandia.gov>
Reviewed-by: Alex Elder <elder@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ceph/locks.c
fs/ceph/mds_client.c