mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #28646 from kubernetes/revert-28448-gce-pd-discard
Automatic merge from submit-queue Revert "Mount r/w GCE PD disks with -o discard" Reverts kubernetes/kubernetes#28448 We need to make sure that we check for compatibility with the discard flag before mounting with it.
This commit is contained in:
		@@ -165,9 +165,6 @@ func (attacher *gcePersistentDiskAttacher) MountDevice(spec *volume.Spec, device
 | 
			
		||||
	options := []string{}
 | 
			
		||||
	if readOnly {
 | 
			
		||||
		options = append(options, "ro")
 | 
			
		||||
	} else {
 | 
			
		||||
		// as per https://cloud.google.com/compute/docs/disks/add-persistent-disk#formatting
 | 
			
		||||
		options = append(options, "discard")
 | 
			
		||||
	}
 | 
			
		||||
	if notMnt {
 | 
			
		||||
		diskMounter := &mount.SafeFormatAndMount{Interface: mounter, Runner: exec.New()}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user