]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ObjectCacher: keep track of outstanding reads on an object
authorJosh Durgin <josh.durgin@inktank.com>
Sat, 9 Mar 2013 01:49:27 +0000 (17:49 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Mon, 11 Mar 2013 22:44:32 +0000 (15:44 -0700)
commitf6f876fe51e40570596c25ac84ba3689f72776c2
tree9251fe61451b7f51dce26b88c8ac88bcdc8f5167
parente6caf69cf41674d00bf05ac63152274a65974c7a
ObjectCacher: keep track of outstanding reads on an object

Reads always use C_ReadFinish as a callback (and they are the only
user of this callback). Keep an xlist of these for each object, so
they can remove themselves as they finish. To prevent racing requests
and with discard removing objects from the cache, clear the xlist in
the object destructor, so if the Object is still valid the set_item
will still be on the list.

Make the ObjectCacher constructor take an Object* instead of the pool
and object id, which are derived from the Object* anyway.

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