Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
data->m_snap_id,
data->m_oid,
cache_path);
- if (ret < 0) {
+ if (ret != OBJ_CACHE_PROMOTED) {
ObjectCacheReadRadosData reply_data;
reply_data.type = RBDSC_READ_RADOS;
reply_data.seq = req->seq;
if (pret < 0) {
lderr(m_cct) << "fail to start promote" << dendl;
}
- return pret;
+ return ret;
}
case OBJ_CACHE_PROMOTED:
- target_cache_file_path = std::move(
- get_cache_file_path(cache_file_name));
- return 0;
+ target_cache_file_path = get_cache_file_path(cache_file_name);
+ return ret;
case OBJ_CACHE_SKIP:
- return pret;
+ return ret;
default:
lderr(m_cct) << "unrecognized object cache status" << dendl;
ceph_assert(0);