mirror of
https://github.com/ceph/ceph
synced 2024-12-29 06:52:35 +00:00
librbd: flatten operation should use object map
If the object is known to exist in the image, the copy-up operation can be skipped for that object. Fixes: http://tracker.ceph.com/issues/23445 Signed-off-by: Mykola Golub <mgolub@suse.com>
This commit is contained in:
parent
4c86bccf07
commit
40af4f87b6
@ -40,6 +40,15 @@ public:
|
||||
return -ERESTART;
|
||||
}
|
||||
|
||||
{
|
||||
RWLock::RLocker snap_lock(image_ctx.snap_lock);
|
||||
if (image_ctx.object_map != nullptr &&
|
||||
!image_ctx.object_map->object_may_not_exist(m_object_no)) {
|
||||
// can skip because the object already exists
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
bufferlist bl;
|
||||
string oid = image_ctx.get_object_name(m_object_no);
|
||||
auto req = new io::ObjectWriteRequest<I>(&image_ctx, oid, m_object_no, 0,
|
||||
|
Loading…
Reference in New Issue
Block a user