]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: slightly defer registering osd request
authorAlex Elder <elder@inktank.com>
Mon, 25 Mar 2013 23:16:11 +0000 (18:16 -0500)
committerAlex Elder <elder@inktank.com>
Tue, 26 Mar 2013 19:12:27 +0000 (14:12 -0500)
commit39a151f2bc66f1b044c4ea342ac6e754a0410512
tree8d600a6bab29c03943d88b564ac37256868a818c
parent8383641e69f61a97ba7c878ce29a01970703f032
libceph: slightly defer registering osd request

One of the first things ceph_osdc_start_request() does is register
the request.  It then acquires the osd client's map semaphore and
request mutex and proceeds to map and send the request.

There is no reason the request has to be registered before acquiring
the map semaphore.  So hold off doing so until after the map
semaphore is held.

Since register_request() is nothing more than a wrapper around
__register_request(), call the latter function instead, after
acquiring the request mutex.

That leaves register_request() unused, so get rid of it.

This partially resolves:
    http://tracker.ceph.com/issues/4392

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-off-by: Sage Weil <sage@inktank.com>
net/ceph/osd_client.c