code: func (ctrl *PersistentVolumeController) isVolumeUsed(pv *v1.PersistentVolume) ([]string, bool, error) {
  	if pv.Spec.ClaimRef == nil {
  		return nil, false, nil
  	}
  	claimName := pv.Spec.ClaimRef.Name
  
  	podNames := sets.NewString()
  	pods, err := ctrl.podLister.Pods(pv.Spec.ClaimRef.Namespace).List(labels.Everything())
  	if err != nil {
  		return nil, false, fmt.Errorf("error listing pods: %s", err)
  	}
  	for _, pod := range pods {
  		if util.IsPodTerminated(pod, pod.Status) {
  			continue
  		}
  		for i := range pod.Spec.Volumes {
  			usedPV := &pod.Spec.Volumes[i]
  			if usedPV.PersistentVolumeClaim != nil && usedPV.PersistentVolumeClaim.ClaimName == claimName {
  				podNames.Insert(pod.Namespace + "/" + pod.Name)
  			}
  		}
  	}
  	return podNames.List(), podNames.Len() != 0, nil
  }
docs: // isVolumeUsed returns list of pods that use given PV.