case CEPH_OSD_OP_CACHE_PIN:
case CEPH_OSD_OP_CACHE_UNPIN:
case CEPH_OSD_OP_SET_REDIRECT:
+ case CEPH_OSD_OP_SET_CHUNK:
case CEPH_OSD_OP_TIER_PROMOTE:
case CEPH_OSD_OP_TIER_FLUSH:
break;
if (result >= 0) {
// mark that this is a cache eviction to avoid triggering normal
// make_writeable() clone creation in finish_ctx()
- ctx->cache_evict = true;
+ ctx->cache_operation = true;
}
osd->logger->inc(l_osd_tier_evict);
}
result = -EOPNOTSUPP;
break;
}
- if (ctx->snapc.snaps.size() ||
- (ctx->obc->ssc && ctx->obc->ssc->snapset.clones.size()) ) {
- result = -EOPNOTSUPP;
- break;
+ if (oi.manifest.is_redirect()) {
+ result = -EINVAL;
+ goto fail;
}
object_locator_t tgt_oloc;
oi.manifest.chunk_map[src_offset].set_flag(chunk_info_t::FLAG_HAS_FINGERPRINT);
}
ctx->modify = true;
+ ctx->cache_operation = true;
dout(10) << "set-chunked oid:" << oi.soid << " user_version: " << oi.user_version
<< " chunk_info: " << chunk_info << dendl;
if ((ctx->obs->exists && !ctx->obs->oi.is_whiteout()) && // head exist(ed)
snapc.snaps.size() && // there are snaps
- !ctx->cache_evict &&
+ !ctx->cache_operation &&
snapc.snaps[0] > ctx->new_snapset.seq) { // existing object is old
// clone
hobject_t coid = soid;
bool modify; // (force) modification (even if op_t is empty)
bool user_modify; // user-visible modification
bool undirty; // user explicitly un-dirtying this object
- bool cache_evict; ///< true if this is a cache eviction
+ bool cache_operation; ///< true if this is a cache eviction
bool ignore_cache; ///< true if IGNORE_CACHE flag is std::set
bool ignore_log_op_stats; // don't log op stats
bool update_log_only; ///< this is a write that returned an error - just record in pg log for dup detection
obs(&obc->obs),
snapset(0),
new_obs(obs->oi, obs->exists),
- modify(false), user_modify(false), undirty(false), cache_evict(false),
+ modify(false), user_modify(false), undirty(false), cache_operation(false),
ignore_cache(false), ignore_log_op_stats(false), update_log_only(false),
bytes_written(0), bytes_read(0), user_at_version(0),
current_osd_subop_num(0),
OpContext(OpRequestRef _op, osd_reqid_t _reqid,
std::vector<OSDOp>* _ops, PrimaryLogPG *_pg) :
op(_op), reqid(_reqid), ops(_ops), obs(NULL), snapset(0),
- modify(false), user_modify(false), undirty(false), cache_evict(false),
+ modify(false), user_modify(false), undirty(false), cache_operation(false),
ignore_cache(false), ignore_log_op_stats(false), update_log_only(false),
bytes_written(0), bytes_read(0), user_at_version(0),
current_osd_subop_num(0),