code: func (util *RBDUtil) ExpandImage(rbdExpander *rbdVolumeExpander, oldSize resource.Quantity, newSize resource.Quantity) (resource.Quantity, error) {
  	var output []byte
  	var err error
  
  	// Convert to MB that rbd defaults on.
  	sz := int(volumehelpers.RoundUpToMiB(newSize))
  	newVolSz := fmt.Sprintf("%d", sz)
  	newSizeQuant := resource.MustParse(fmt.Sprintf("%dMi", sz))
  
  	// Check the current size of rbd image, if equals to or greater that the new request size, do nothing.
  	curSize, infoErr := util.rbdInfo(rbdExpander.rbdMounter)
  	if infoErr != nil {
  		return oldSize, fmt.Errorf("rbd info failed, error: %v", infoErr)
  	}
  	if curSize >= sz {
  		return newSizeQuant, nil
  	}
  
  	// rbd resize.
  	mon := util.kernelRBDMonitorsOpt(rbdExpander.rbdMounter.Mon)
  	klog.V(4).Infof("rbd: resize %s using mon %s, pool %s id %s key %s", rbdExpander.rbdMounter.Image, mon, rbdExpander.rbdMounter.Pool, rbdExpander.rbdMounter.adminId, rbdExpander.rbdMounter.adminSecret)
  	output, err = rbdExpander.exec.Run("rbd",
  		"resize", rbdExpander.rbdMounter.Image, "--size", newVolSz, "--pool", rbdExpander.rbdMounter.Pool, "--id", rbdExpander.rbdMounter.adminId, "-m", mon, "--key="+rbdExpander.rbdMounter.adminSecret)
  	if err == nil {
  		return newSizeQuant, nil
  	}
  
  	klog.Errorf("failed to resize rbd image: %v, command output: %s", err, string(output))
  	return oldSize, err
  }
docs: // ExpandImage runs rbd resize command to resize the specified image.