mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-23 23:00:19 +00:00
rbd: set depthToAvoidFlatten to 3 during PVC-PVC clone
During PVC-PVC clone creation, parent of the datasource image is flattened after checking for clone depth. We need to account for data source image as well since we're calculating depth from the parent image. depthToAvoidFlatten = 3(datasource image + temp + final clone) Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
parent
eea64fe1f9
commit
d457840d21
@ -461,9 +461,9 @@ func flattenParentImage(
|
||||
hardLimit := rbdHardMaxCloneDepth
|
||||
softLimit := rbdSoftMaxCloneDepth
|
||||
if rbdVol != nil {
|
||||
// choosing 2, since cloning image creates a temp clone and a final clone which
|
||||
// will add a total depth of 2.
|
||||
const depthToAvoidFlatten = 2
|
||||
// choosing 3, since cloning image creates a temp clone and a final clone which
|
||||
// will add a total depth of 2 and the parent image itself adds one depth.
|
||||
const depthToAvoidFlatten = 3
|
||||
if rbdHardMaxCloneDepth > depthToAvoidFlatten {
|
||||
hardLimit = rbdHardMaxCloneDepth - depthToAvoidFlatten
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user