]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: Add a paramter:purge_on_error in ImageCtx::invalidate_cache(). 5767/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Mon, 9 Mar 2015 06:23:23 +0000 (14:23 +0800)
committerLoic Dachary <ldachary@redhat.com>
Sun, 6 Sep 2015 12:07:55 +0000 (14:07 +0200)
commit6c4ccc854fa8a8403b03785b06cb35a7174f4f42
treecb0dc21a2046367f882d200fa3326065467e3c2f
parent05734916ab119c6d3879c2ce2bc9f9581907861a
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>
(cherry picked from commit 35def5c81f7fc83d55d18320e4860c6a63d4c7f5)

Conflicts:
src/librbd/ImageCtx.cc : trivial resolution
src/librbd/ImageCtx.cc
src/librbd/ImageCtx.h