mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
BlueStore: fix dest onode process logic of clone
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
parent
fde0f0297a
commit
1c70f86316
@ -5970,18 +5970,22 @@ int BlueStore::_clone(TransContext *txc,
|
||||
r = -ENOENT;
|
||||
goto out;
|
||||
}
|
||||
newo = c->get_onode(new_oid, true);
|
||||
|
||||
newo = c->get_onode(new_oid, false);
|
||||
if (newo) {
|
||||
r = _do_truncate(txc, c, newo, 0);
|
||||
if (r < 0)
|
||||
goto out;
|
||||
} else {
|
||||
newo = c->get_onode(new_oid, true);
|
||||
_assign_nid(txc, newo);
|
||||
}
|
||||
assert(newo);
|
||||
newo->exists = true;
|
||||
_assign_nid(txc, newo);
|
||||
|
||||
// data
|
||||
oldo->flush();
|
||||
|
||||
r = _do_truncate(txc, c, newo, 0);
|
||||
if (r < 0)
|
||||
goto out;
|
||||
|
||||
if (g_conf->bluestore_clone_cow) {
|
||||
EnodeRef e = c->get_enode(newo->oid.hobj.get_hash());
|
||||
bool marked = false;
|
||||
|
Loading…
Reference in New Issue
Block a user