code: func GetVolumeMode(volumeSpec *volume.Spec) (v1.PersistentVolumeMode, error) {
  	if volumeSpec == nil || volumeSpec.PersistentVolume == nil {
  		return v1.PersistentVolumeFilesystem, nil
  	}
  	if volumeSpec.PersistentVolume.Spec.VolumeMode != nil {
  		return *volumeSpec.PersistentVolume.Spec.VolumeMode, nil
  	}
  	return "", fmt.Errorf("cannot get volumeMode for volume: %v", volumeSpec.Name())
  }
docs: // GetVolumeMode retrieves VolumeMode from pv.
  // If the volume doesn't have PersistentVolume, it's an inline volume,
  // should return volumeMode as filesystem to keep existing behavior.