loopback

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoopDeviceFormat      = "/dev/loop%d"
	LoopControlPath       = "/dev/loop-control"
	DirectCSIBackFileRoot = "/var/lib/direct-csi/loop"
	NameSize              = 64
	KeySize               = 32

	// Syscalls
	CtlAdd      = 0x4C80
	CtlRemove   = 0x4C81
	CtlGetFree  = 0x4C82
	SetFd       = 0x4C00
	ClrFd       = 0x4C01
	SetStatus   = 0x4C02
	SetStatus64 = 0x4C04
	GetStatus64 = 0x4C05
)

Variables

This section is empty.

Functions

func CreateLoopbackDevice

func CreateLoopbackDevice() (string, error)

func GetAttachedDeviceNames

func GetAttachedDeviceNames() ([]string, error)

func RemoveLoopDevice

func RemoveLoopDevice(loopPath string) error

Types

type LoopInfo

type LoopInfo struct {
	Device         uint64
	INode          uint64
	RDevice        uint64
	Offset         uint64
	SizeLimit      uint64
	Number         uint32
	EncryptType    uint32
	EncryptKeySize uint32
	Flags          uint32
	FileName       [NameSize]byte
	CryptName      [NameSize]byte
	EncryptKey     [KeySize]byte
	Init           [2]uint64
}

Jump to

Keyboard shortcuts

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