]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: type safety cleanup for _read and _write codepaths
authorJeff Layton <jlayton@redhat.com>
Mon, 12 Feb 2018 12:17:51 +0000 (07:17 -0500)
committerJeff Layton <jlayton@redhat.com>
Mon, 12 Feb 2018 12:17:51 +0000 (07:17 -0500)
commit5579035cfd2a2736f78c05045dad1e9156c6968e
tree20b3dc7c243dd8c9056e4632eb3f4a32ed9d790e
parentcf2bc0abcdd3bd82441dabc3f4083242c03869df
client: type safety cleanup for _read and _write codepaths

In the read codepath, bl->length() returns an unsigned value, and that
could end up looking negative when cast to int. On the write side,
totalwritten is a uint64_t, which could look negative when cast to int.

Have the underlying layers pass back an int64_t and convert them to
int at a higher level. This prepares the underlying infrastructure for
ceph_ll_readv and ceph_ll_writev support.

Tracker: http://tracker.ceph.com/issues/22948
Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/client/Client.cc
src/client/Client.h