if (m_cache_state->present &&
!m_cache_state->host.compare(ceph_get_short_hostname()) &&
fs::exists(m_cache_state->path)) {
- fs::remove(m_cache_state->path);
+ std::error_code ec;
+ fs::remove(m_cache_state->path, ec);
+ if (ec) {
+ lderr(cct) << "failed to remove persistent cache file: " << ec.message()
+ << dendl;
+ // not fatal
+ }
}
remove_image_cache_state();
CephContext *cct = m_image_ctx.cct;
ldout(cct, 10) << dendl;
- if (!(m_image_ctx.features &&RBD_FEATURE_DIRTY_CACHE)) {
- finish();
- return;
- }
uint64_t new_features = m_image_ctx.features & ~RBD_FEATURE_DIRTY_CACHE;
uint64_t features_mask = RBD_FEATURE_DIRTY_CACHE;
ldout(cct, 10) << "old_features=" << m_image_ctx.features