File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -685,17 +685,10 @@ func (ctrl *csiSnapshotCommonController) createSnapshotContent(snapshot *crdv1.V
685685 }
686686
687687 if ctrl .preventVolumeModeConversion {
688- volumeMode := volume .Spec .VolumeMode
689- if volumeMode != nil {
690- snapshotContent .Spec .SourceVolumeMode = new (crdv1.SourceVolumeMode )
691- switch * volumeMode {
692- case v1 .PersistentVolumeBlock :
693- * snapshotContent .Spec .SourceVolumeMode = crdv1 .SourceVolumeModeBlock
694- case v1 .PersistentVolumeFilesystem :
695- * snapshotContent .Spec .SourceVolumeMode = crdv1 .SourceVolumeModeFilesystem
696- }
688+ if volume .Spec .VolumeMode != nil {
689+ snapshotContent .Spec .SourceVolumeMode = volume .Spec .VolumeMode
690+ klog .V (5 ).Infof ("snapcontent %s has volume mode %s" , snapshotContent .Name , * snapshotContent .Spec .SourceVolumeMode )
697691 }
698- klog .V (5 ).Infof ("snapcontent %s has volume mode %s" , snapshotContent .Name , * snapshotContent .Spec .SourceVolumeMode )
699692 }
700693
701694 // Set AnnDeletionSecretRefName and AnnDeletionSecretRefNamespace
You can’t perform that action at this time.
0 commit comments