]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: clean up ceph_osd_new_request()
authorAlex Elder <elder@inktank.com>
Thu, 14 Mar 2013 01:50:01 +0000 (20:50 -0500)
committerAlex Elder <elder@inktank.com>
Thu, 4 Apr 2013 14:22:35 +0000 (09:22 -0500)
commitc1d5b880b10fa9fea445a66c0eba85edc01669b2
treeffb3973c7fb87549d8b6a28b5fd5c509d143289a
parentc6e66bcc7ac743d9329973ff41ea62a14e9ae37f
libceph: clean up ceph_osd_new_request()

All callers of ceph_osd_new_request() pass either CEPH_OSD_OP_READ
or CEPH_OSD_OP_WRITE as the opcode value.  The function assumes it
by filling in the extent fields in the ops array it builds.  So just
assert that is the case, and don't bother calling op_has_extent()
before filling in the first osd operation in the array.

Define some local variables to gather the information to fill into
the first op, and then fill in the op array all in one place.

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