]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ObjectCacher: remove all buffers from a non-existent object 242/head
authorJosh Durgin <josh.durgin@inktank.com>
Wed, 24 Apr 2013 22:06:50 +0000 (15:06 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Wed, 24 Apr 2013 22:54:07 +0000 (15:54 -0700)
commit82d5cd601e0fb7cb24dda4ea1f0e9f12e5d18708
tree3840b68368d8b682cbb1e61670b5163cf458f177
parentcce1c91ae82ca81fa8349822a7f67aabb15eaa55
ObjectCacher: remove all buffers from a non-existent object

Once we're sure an object doesn't exist, we retry all the waiters in
order, and they return -ENOENT immediately. If there were a bunch of
BufferHeads waiting for data (rx state), they would be left behind
while the reads that triggered them were complete from the cache
user's perspective. These extra rx BufferHeads would pin the object in
the lru, so they wouldn't be removed by release_set(). This meant that
the assert during shutdown of the cache would be triggered.

To fix this, remove any BufferHeads in this state immediately when we
find out the object doesn't exist. Use the same condition as readx for
determining whether this is safe - if we got -ENOENT and all
BufferHeads for the object are clean or rx.

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