mirror_ubuntu-kernels/include/linux/ceph
Alex Elder e8afad656c libceph: pass length to ceph_calc_file_object_mapping()
ceph_calc_file_object_mapping() takes (among other things) a "file"
offset and length, and based on the layout, determines the object
number ("bno") backing the affected portion of the file's data and
the offset into that object where the desired range begins.  It also
computes the size that should be used for the request--either the
amount requested or something less if that would exceed the end of
the object.

This patch changes the input length parameter in this function so it
is used only for input.  That is, the argument will be passed by
value rather than by address, so the value provided won't get
updated by the function.

The value would only get updated if the length would surpass the
current object, and in that case the value it got updated to would
be exactly that returned in *oxlen.

Only one of the two callers is affected by this change.  Update
ceph_calc_raw_layout() so it records any updated value.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-01-17 15:52:04 -06:00
..
auth.h ceph: messenger: reduce args to create_authorizer 2012-05-17 08:18:12 -05:00
buffer.h
ceph_debug.h
ceph_features.h libceph: for chooseleaf rules, retry CRUSH map descent from root if leaf is failed 2013-01-17 12:42:39 -06:00
ceph_frag.h
ceph_fs.h libceph: move feature bits to separate header 2012-07-30 16:23:22 -07:00
ceph_hash.h
debugfs.h
decode.h ceph: define ceph_encode_8_safe() 2013-01-17 14:09:08 -06:00
libceph.h libceph: remove 'osdtimeout' option 2012-12-13 08:13:06 -06:00
mdsmap.h BUG: headers with BUG/BUG_ON etc. need linux/bug.h 2012-03-04 17:54:34 -05:00
messenger.h libceph: clean up con flags 2012-07-30 18:16:01 -07:00
mon_client.h libceph: remove unused monc->have_fsid 2012-10-01 14:30:49 -05:00
msgpool.h libceph: initialize msgpool message types 2012-07-30 09:29:50 -07:00
msgr.h
osd_client.h libceph: pass length to ceph_osdc_build_request() 2013-01-17 15:52:04 -06:00
osdmap.h libceph: pass length to ceph_calc_file_object_mapping() 2013-01-17 15:52:04 -06:00
pagelist.h
rados.h rbd: get parent spec for version 2 images 2012-11-01 07:55:42 -05:00
types.h