]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ObjectCacher: always complete flush_set() callback
authorJosh Durgin <josh.durgin@inktank.com>
Fri, 22 Mar 2013 19:13:36 +0000 (12:13 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Thu, 28 Mar 2013 17:46:58 +0000 (10:46 -0700)
commit92db06c05dc2cad8ed31648cb08866781aee2855
treecfe3953ec34668e0938c1b2be9f1e0f036de0369
parent03ac01fa6a94fa7a66ede057e9267e0a562c3cdb
ObjectCacher: always complete flush_set() callback

This removes the last remnants of
b5e9995f59d363ba00d9cac413d9b754ee44e370. If there's nothing to flush,
immediately call the callback instead of deleting it. Callers were
assuming they were responsible for completing the callback whenever
flush_set() returned true, and always called complete(0) in this
case. Simplify the interface and just do this in flush_set(), so that
it always calls the callback.

Since C_GatherBuilder deletes its finisher if there are no subs,
only set its finisher when subs are present. This way we can still
call ->complete() for the callback.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/client/Client.cc
src/osdc/ObjectCacher.cc
src/test/osdc/object_cacher_stress.cc