{
coll_t cid = i.get_cid(op->cid);
ghobject_t oid = i.get_oid(op->oid);
- _kludge_temp_object_collection(cid, oid);
+ coll_t ncid = cid;
ghobject_t noid = i.get_oid(op->dest_oid);
- _kludge_temp_object_collection(cid, noid);
+ _kludge_temp_object_collection(cid, oid);
+ _kludge_temp_object_collection(ncid, noid);
uint64_t off = op->off;
uint64_t len = op->len;
tracepoint(objectstore, clone_range_enter, osr_name, len);
- r = _clone_range(cid, oid, noid, off, len, off, spos);
+ r = _clone_range(cid, oid, ncid, noid, off, len, off, spos);
tracepoint(objectstore, clone_range_exit, r);
}
break;
{
coll_t cid = i.get_cid(op->cid);
ghobject_t oid = i.get_oid(op->oid);
- _kludge_temp_object_collection(cid, oid);
+ coll_t ncid = cid;
ghobject_t noid = i.get_oid(op->dest_oid);
- _kludge_temp_object_collection(cid, noid);
+ _kludge_temp_object_collection(cid, oid);
+ _kludge_temp_object_collection(ncid, noid);
uint64_t srcoff = op->off;
uint64_t len = op->len;
uint64_t dstoff = op->dest_off;
tracepoint(objectstore, clone_range2_enter, osr_name, len);
- r = _clone_range(cid, oid, noid, srcoff, len, dstoff, spos);
+ r = _clone_range(cid, oid, ncid, noid, srcoff, len, dstoff, spos);
tracepoint(objectstore, clone_range2_exit, r);
}
break;
return r;
}
-int FileStore::_clone_range(const coll_t& cid, const ghobject_t& oldoid, const ghobject_t& newoid,
+int FileStore::_clone_range(const coll_t& oldcid, const ghobject_t& oldoid, const coll_t& newcid, const ghobject_t& newoid,
uint64_t srcoff, uint64_t len, uint64_t dstoff,
const SequencerPosition& spos)
{
- dout(15) << "clone_range " << cid << "/" << oldoid << " -> " << cid << "/" << newoid << " " << srcoff << "~" << len << " to " << dstoff << dendl;
+ dout(15) << "clone_range " << oldcid << "/" << oldoid << " -> " << newcid << "/" << newoid << " " << srcoff << "~" << len << " to " << dstoff << dendl;
- if (_check_replay_guard(cid, newoid, spos) < 0)
+ if (_check_replay_guard(newcid, newoid, spos) < 0)
return 0;
int r;
FDRef o, n;
- r = lfn_open(cid, oldoid, false, &o);
+ r = lfn_open(oldcid, oldoid, false, &o);
if (r < 0) {
goto out2;
}
- r = lfn_open(cid, newoid, true, &n);
+ r = lfn_open(newcid, newoid, true, &n);
if (r < 0) {
goto out;
}
out:
lfn_close(o);
out2:
- dout(10) << "clone_range " << cid << "/" << oldoid << " -> " << cid << "/" << newoid << " "
+ dout(10) << "clone_range " << oldcid << "/" << oldoid << " -> " << newcid << "/" << newoid << " "
<< srcoff << "~" << len << " to " << dstoff << " = " << r << dendl;
return r;
}
int _truncate(const coll_t& cid, const ghobject_t& oid, uint64_t size);
int _clone(const coll_t& cid, const ghobject_t& oldoid, const ghobject_t& newoid,
const SequencerPosition& spos);
- int _clone_range(const coll_t& cid, const ghobject_t& oldoid, const ghobject_t& newoid,
+ int _clone_range(const coll_t& oldcid, const ghobject_t& oldoid, const coll_t& newcid, const ghobject_t& newoid,
uint64_t srcoff, uint64_t len, uint64_t dstoff,
const SequencerPosition& spos);
int _do_clone_range(int from, int to, uint64_t srcoff, uint64_t len, uint64_t dstoff);