]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: pass num_op with ops
authorAlex Elder <elder@inktank.com>
Wed, 14 Nov 2012 03:11:15 +0000 (21:11 -0600)
committerAlex Elder <elder@inktank.com>
Wed, 28 Nov 2012 15:40:41 +0000 (09:40 -0600)
commit32cc22eabed1c770aef2e61b7f07ab4f4355dba9
tree5e92db8bb0045b99f55668286d84d2630ab0f5bb
parentbbc352a7ba19525137ab6e2ef2b09176a1249893
libceph: pass num_op with ops

Both ceph_osdc_alloc_request() and ceph_osdc_build_request() are
provided an array of ceph osd request operations.  Rather than just
passing the number of operations in the array, the caller is
required append an additional zeroed operation structure to signal
the end of the array.

All callers know the number of operations at the time these
functions are called, so drop the silly zero entry and supply that
number directly.  As a result, get_num_ops() is no longer needed.
This also means that ceph_osdc_alloc_request() never uses its ops
argument, so that can be dropped.

Also rbd_create_rw_ops() no longer needs to add one to reserve room
for the additional op.

Signed-off-by: Alex Elder <elder@inktank.com>
drivers/block/rbd.c
include/linux/ceph/osd_client.h
net/ceph/osd_client.c