]> Pileus Git - ~andy/linux/commit
libceph: pass offset and length out of calc_layout()
authorAlex Elder <elder@inktank.com>
Thu, 14 Mar 2013 01:50:00 +0000 (20:50 -0500)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:17:46 +0000 (21:17 -0700)
commit75d1c941e57d4247de4c0ed4064a65cf1a4d3ed8
tree58a1f59a447cf2afb70e961b05bf065e7f6bbdb3
parent33803f3300265661b5c5d20a9811c6a2a157d545
libceph: pass offset and length out of calc_layout()

The purpose of calc_layout() is to determine, given a file offset
and length and a layout describing the placement of file data across
objects, where in "object space" that data resides.

Specifically, it determines which object should hold the first part
of the specified range of file data, and the offset and length of
data within that object.  The length will not exceed the bounds
of the object, and the caller is informed of that maximum length.

Add two parameters to calc_layout() to allow the object-relative
offset and length to be passed back to the caller.

This is the first steps toward having ceph_osdc_new_request() build
its osd op structure using osd_req_op_extent_init().

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
net/ceph/osd_client.c