diff options
author | Alex Elder <elder@inktank.com> | 2013-04-21 12:14:45 -0500 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-01 21:19:20 -0700 |
commit | 57385b51c3ffd0fed2dd9d5d8e4ec080c85ecbcd (patch) | |
tree | 7acd3eb3b373e63e2c71f59357632fc3ba78b677 /firmware | |
parent | 4157976b27287e239d5ae879d2916540fe0b576e (diff) |
rbd: have rbd_obj_method_sync() return transfer count
Callers of rbd_obj_method_sync() don't know how many bytes of data
got returned by the class method call. As a result, they have been
assuming enough got returned to decode whatever was expected.
This isn't safe. We know how many bytes got transferred, so have
rbd_obj_method_sync() return that amount (rather than just 0) if
the call is successful.
Change all callers to use this return value to ensure decoding of
the results is done safely.
On the other hand, most callers of rbd_obj_method_sync() only
indicate success or failure, so all of *their* callers can simply
test for non-zero result.
This resolves:
http://tracker.ceph.com/issues/4773
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'firmware')
0 files changed, 0 insertions, 0 deletions