]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: add data pointers in osd op structures
authorAlex Elder <elder@inktank.com>
Wed, 3 Apr 2013 06:28:58 +0000 (01:28 -0500)
committerAlex Elder <elder@inktank.com>
Mon, 8 Apr 2013 19:09:43 +0000 (14:09 -0500)
commit73b4c463b68fd0c15f354f8188d69b4082f05160
tree8c804e098cafc107af08a710bcde5ba92fb386c5
parentef6fba1b9f26f9ab56d78c67b140984becd94598
libceph: add data pointers in osd op structures

An extent type osd operation currently implies that there will
be corresponding data supplied in the data portion of the request
(for write) or response (for read) message.  Similarly, an osd class
method operation implies a data item will be supplied to receive
the response data from the operation.

Add a ceph_osd_data pointer to each of those structures, and assign
it to point to eithre the incoming or the outgoing data structure in
the osd message.  The data is not always available when an op is
initially set up, so add two new functions to allow setting them
after the op has been initialized.

Begin to make use of the data item pointer available in the osd
operation rather than the request data in or out structure in
places where it's convenient.  Add some assertions to verify
pointers are always set the way they're expected to be.

This is a sort of stepping stone toward really moving the data
into the osd request ops, to allow for some validation before
making that jump.

This is the first in a series of patches that resolve:
    http://tracker.ceph.com/issues/4657

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c
fs/ceph/addr.c
fs/ceph/file.c
include/linux/ceph/osd_client.h
net/ceph/osd_client.c