blockdev

package
v0.0.0-...-5fe3b72 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TuneDeviceQueue

func TuneDeviceQueue(bdev BlockDevice) (err error)

Types

type BlockDevice

type BlockDevice interface {
	io.Closer
	DevicePath() string
}

type BlockDeviceManager

type BlockDeviceManager interface {
	io.Closer
	Open(obj storage.AnonymousObject, volumeName uuid.UUID, blockSize int64) (BlockDevice, error)
}

func NewTCMUBlockDeviceManager

func NewTCMUBlockDeviceManager(cfg TCMUConfig) (BlockDeviceManager, error)

type CmdPool

type CmdPool struct {
	// contains filtered or unexported fields
}

func NewCmdPool

func NewCmdPool(poolSize int, bufferSize int) *CmdPool

func (*CmdPool) Close

func (p *CmdPool) Close() error

func (*CmdPool) DevReady

func (p *CmdPool) DevReady(h tcmu.SCSICmdHandler) tcmu.DevReadyFunc

type TCMUConfig

type TCMUConfig struct {
	Workers          int    `help:"Number of goroutines handling SCSI commands" default:"12"`
	WorkerBufferSize int    `help:"Size of the static buffer used by each goroutine" default:"4194304"`
	DeviceNamespace  string `help:"The namespace under /dev where devices are created" default:"vdisc"`
	HBA              int    `help:"The SCSI Host Bus Adapter identifier" default:"30"`
	BlockXferMin     uint16 `help:"Advertise minimum blocks to transfer" default:"128"`   // 256KB
	BlockXferMax     uint32 `help:"Advertise maximum blocks to transfer" default:"16384"` // 32MB
	BlockXferOpt     uint32 `help:"Advertise optimal block transfer size" default:"2048"` // 4MB
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL