]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ObjectCacher: wait for all reads when stopping flusher
authorJosh Durgin <josh.durgin@inktank.com>
Mon, 29 Apr 2013 20:58:07 +0000 (13:58 -0700)
committerSage Weil <sage@inktank.com>
Tue, 30 Apr 2013 20:47:47 +0000 (13:47 -0700)
commitc2bcc2a60c2c1f66c757c01ed6bcc6778821f81d
tree631c6829622003a2d8dbe760d2495695517cfea2
parent17612a407ab7bd1d08945d663e2088c5c81cee33
ObjectCacher: wait for all reads when stopping flusher

Stopping the flusher is essentially the shutdown step for the
ObjectCacher - the next thing is actually destroying it.

If we leave any reads outstanding, when they complete they will
attempt to use the now-destroyed ObjectCacher. This is particularly a
problem with rbd images, since an -ENOENT can instantly complete many
readers, so the upper layers don't wait for the other rados-level
reads of that object to finish before trying to shutdown the cache.

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