code: func (plugin *glusterfsPlugin) collectGids(className string, gidTable *MinMaxAllocator) error {
  	kubeClient := plugin.host.GetKubeClient()
  	if kubeClient == nil {
  		return fmt.Errorf("failed to get kube client when collecting gids")
  	}
  	pvList, err := kubeClient.CoreV1().PersistentVolumes().List(metav1.ListOptions{LabelSelector: labels.Everything().String()})
  	if err != nil {
  		klog.Error("failed to get existing persistent volumes")
  		return err
  	}
  
  	for _, pv := range pvList.Items {
  		if v1helper.GetPersistentVolumeClass(&pv) != className {
  			continue
  		}
  
  		pvName := pv.ObjectMeta.Name
  
  		gidStr, ok := pv.Annotations[volutil.VolumeGidAnnotationKey]
  
  		if !ok {
  			klog.Warningf("no GID found in pv %v", pvName)
  			continue
  		}
  
  		gid, err := convertGid(gidStr)
  		if err != nil {
  			klog.Errorf("failed to parse gid %s: %v", gidStr, err)
  			continue
  		}
  
  		_, err = gidTable.Allocate(gid)
  		if err == ErrConflict {
  			klog.Warningf("GID %v found in pv %v was already allocated", gid, pvName)
  		} else if err != nil {
  			klog.Errorf("failed to store gid %v found in pv %v: %v", gid, pvName, err)
  			return err
  		}
  	}
  
  	return nil
  }
docs: // Traverse the PVs, fetching all the GIDs from those
  // in a given storage class, and mark them in the table.