// Resize perform resize of file system
550215
func (resizefs *ResizeFs) Resize(devicePath string, deviceMountPath string) (bool, error) {
	format, err := resizefs.mounter.GetDiskFormat(devicePath)

	if err != nil {
		formatErr := fmt.Errorf("ResizeFS.Resize - error checking format for device %s: %v", devicePath, err)
		return false, formatErr
	}

	// If disk has no format, there is no need to resize the disk because mkfs.*
	// by default will use whole disk anyways.
	if format == "" {
		return false, nil
	}

	klog.V(3).Infof("ResizeFS.Resize - Expanding mounted volume %s", devicePath)
	switch format {
	case "ext3", "ext4":
		return resizefs.extResize(devicePath)
	case "xfs":
		return resizefs.xfsResize(deviceMountPath)
	}
	return false, fmt.Errorf("ResizeFS.Resize - resize of format %s is not supported for device %s mounted at %s", format, devicePath, deviceMountPath)
}
926757
func (s *service) ResizePty(ctx context.Context, r *taskAPI.ResizePtyRequest) (*ptypes.Empty, error) {
	container, err := s.getContainer()
	if err != nil {
		return nil, err
	}
	if err := container.ResizePty(ctx, r); err != nil {
		return nil, errdefs.ToGRPC(err)
	}
	return empty, nil
}
1149433
func (s *JobOutput) SetFileSize(v int64) *JobOutput {
	s.FileSize = &v
	return s
}
1046687
func (s *service) ResizePty(ctx context.Context, r *taskAPI.ResizePtyRequest) (*ptypes.Empty, error) {
	log.G(ctx).Debugf("ResizePty: %s: %s", r.ID, r.ExecID)

	var p *process
	var err error
	if p, err = s.getProcess(r.ID, r.ExecID); err != nil {
		return nil, err
	}

	pid := int(p.stat().pid)
	opts := runhcs.ResizeTTYOpts{
		Pid: &pid,
	}
	rhcs := s.newRunhcs()
	if err = rhcs.ResizeTTY(ctx, p.cid, uint16(r.Width), uint16(r.Height), &opts); err != nil {
		return nil, err
	}

	return empty, nil
}
150621
func (s *GetFileOutput) SetFileSize(v int64) *GetFileOutput {
	s.FileSize = &v
	return s
}
710755
func (p *Padder) Resize(size image.Point) {
	p.widget.Resize(size.Sub(p.padding.Mul(2)))
}
802352
func (s *Object) SetSize(v int64) *Object {
	s.Size = &v
	return s
}
1030715
func (s *ConnectDirectoryInput) SetSize(v string) *ConnectDirectoryInput {
	s.Size = &v
	return s
}
615370
func (writer *baseFileWriter) RotateSize() int64 {
	writer.lock.RLock()
	defer writer.lock.RUnlock()
	return writer.rotateSize
}
1087069
func (process *process) ResizeConsole(width, height uint16) error {
	return convertProcessError(process.p.ResizeConsole(width, height), process)
}
64487
func (client *Client) ResizeDisk(diskId string, sizeGB int) error {
	args := ResizeDiskArgs{
		DiskId:  diskId,
		NewSize: sizeGB,
	}
	response := ResizeDiskResponse{}
	err := client.Invoke("ResizeDisk", &args, &response)
	return err
}
785585
func (s *Service) ResizePty(ctx context.Context, r *shimapi.ResizePtyRequest) (*ptypes.Empty, error) {
	if r.ID == "" {
		return nil, errdefs.ToGRPCf(errdefs.ErrInvalidArgument, "id not provided")
	}
	ws := console.WinSize{
		Width:  uint16(r.Width),
		Height: uint16(r.Height),
	}
	s.mu.Lock()
	p := s.processes[r.ID]
	s.mu.Unlock()
	if p == nil {
		return nil, errors.Errorf("process does not exist %s", r.ID)
	}
	if err := p.Resize(ws); err != nil {
		return nil, errdefs.ToGRPC(err)
	}
	return empty, nil
}
142888
func (s *DirectoryDescription) SetSize(v string) *DirectoryDescription {
	s.Size = &v
	return s
}
988164
func (p *Process) ResizePty(ctx context.Context, size runtime.ConsoleSize) error {
	_, err := p.t.shim.ResizePty(ctx, &shim.ResizePtyRequest{
		ID:     p.id,
		Width:  size.Width,
		Height: size.Height,
	})
	if err != nil {
		err = errdefs.FromGRPC(err)
	}
	return err
}
495848
func (t *LinodeService) Resize(linodeId int, planId int) (*LinodeResponse, error) {
	u := &url.Values{}
	u.Add("LinodeID", strconv.Itoa(linodeId))
	u.Add("PlanID", strconv.Itoa(planId))

	v := LinodeResponse{}
	if err := t.client.do("linode.resize", u, &v.Response); err != nil {
		return nil, err
	}

	v.LinodeId.LinodeId = linodeId // hardcode this to input
	return &v, nil
}
734201
func (c *LRU) Resize(n int) {
	c.mu.Lock()
	if n < len(c.table) {
		c.drop(len(c.table) - n)
	}
	c.cap = n
	c.mu.Unlock()
}
981778
func (s *FolderMetadata) SetSize(v int64) *FolderMetadata {
	s.Size = &v
	return s
}