mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-05-25 16:56:40 +00:00
Currently, while preparing a volume for snapshot, the depthToAvoidFlatten is set to 2. This accounts one for snapshot and another since parent of the volume is flattened. This commit modifies the depth to 3 to also account for future PVC restore since - snapshot alone is useless and it is very likely to be restore at one point in time. - this ensures snapshot is not flattened when restore does occur. - flattening of snapshot in the above case will make the snapshot no longer eligible for changed block tracking(snap diff) operation. - maintain similarity with PVC-PVC clone operation which currently depthToAvoidFlatten set to 1. Signed-off-by: Rakshith R <rar@redhat.com>