code: func validateStorageClassUpgrade(oldAnnotations, newAnnotations map[string]string, oldScName, newScName *string) bool {
  	oldSc, oldAnnotationExist := oldAnnotations[core.BetaStorageClassAnnotation]
  	newScInAnnotation, newAnnotationExist := newAnnotations[core.BetaStorageClassAnnotation]
  	return oldAnnotationExist /* condition 1 */ &&
  		oldScName == nil /* condition 2*/ &&
  		(newScName != nil && *newScName == oldSc) /* condition 3 */ &&
  		(!newAnnotationExist || newScInAnnotation == oldSc) /* condition 4 */
  }
docs: // Provide an upgrade path from PVC with storage class specified in beta
  // annotation to storage class specified in attribute. We allow update of
  // StorageClassName only if following four conditions are met at the same time:
  // 1. The old pvc's StorageClassAnnotation is set
  // 2. The old pvc's StorageClassName is not set
  // 3. The new pvc's StorageClassName is set and equal to the old value in annotation
  // 4. If the new pvc's StorageClassAnnotation is set,it must be equal to the old pv/pvc's StorageClassAnnotation