]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: Add a paramter:purge_on_error in ImageCtx::invalidate_cache(). 3625/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Mon, 9 Mar 2015 06:23:23 +0000 (14:23 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Mon, 9 Mar 2015 06:23:23 +0000 (14:23 +0800)
commit35def5c81f7fc83d55d18320e4860c6a63d4c7f5
tree127b9f98c4e078dd43d893517b6211ac1c71a35b
parent101440a41253680770f94bc380af7072c7adaebf
librbd: Add a paramter:purge_on_error in ImageCtx::invalidate_cache().

If bh_write met error, it will try again. For closing image, if met this
issue, it will trigger a assert:
>>2015-02-03 15:22:49.198292 7ff62d537800 -1 osdc/ObjectCacher.cc: In
function 'ObjectCacher::~ObjectCacher()' thread 7ff62d537800 time
>>2015-02-03 15:22:49.195927osdc/ObjectCacher.cc: 551: FAILED
>>assert(i->empty())

Now add purge_on_error, when shutdown_cache it set true.
In ImageCtx::invalidate_cache, if met error and purge_on_error is true,
purge the dirty bh.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/librbd/ImageCtx.cc
src/librbd/ImageCtx.h