librbd: skip cache initialization if data IoCtx is invalid
This resolves the potential for an assertion failure in the cache
constructors that occurs when the data IoCtx is not valid. Errors
are deferred until actual IOs are issued against the invalid data
pool.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
ad1016b014d4c33dee3be66376bf9f3394160501)
Conflicts:
src/librbd/plugin/ParentCache.cc
- parent_cache_enabled is not split to above file.
We just add another data ioctx checking before
sending parent cache