docker: github.com/docker/docker/pkg/loopback Index | Files

package loopback

import "github.com/docker/docker/pkg/loopback"

Index

Package Files

attach_loopback.go ioctl.go loop_wrapper.go loopback.go

Constants

const (
    LoopSetFd       = unix.LOOP_SET_FD
    LoopCtlGetFree  = unix.LOOP_CTL_GET_FREE
    LoopGetStatus64 = unix.LOOP_GET_STATUS64
    LoopSetStatus64 = unix.LOOP_SET_STATUS64
    LoopClrFd       = unix.LOOP_CLR_FD
    LoopSetCapacity = unix.LOOP_SET_CAPACITY
)

IOCTL consts

const (
    LoFlagsAutoClear = unix.LO_FLAGS_AUTOCLEAR
    LoFlagsReadOnly  = unix.LO_FLAGS_READ_ONLY
    LoFlagsPartScan  = unix.LO_FLAGS_PARTSCAN
    LoKeySize        = unix.LO_KEY_SIZE
    LoNameSize       = unix.LO_NAME_SIZE
)

LOOP consts.

Variables

var (
    ErrAttachLoopbackDevice   = errors.New("loopback attach failed")
    ErrGetLoopbackBackingFile = errors.New("Unable to get loopback backing file")
    ErrSetCapacity            = errors.New("Unable set loopback capacity")
)

Loopback related errors

func AttachLoopDevice Uses

func AttachLoopDevice(sparseName string) (loop *os.File, err error)

AttachLoopDevice attaches the given sparse file to the next available loopback device. It returns an opened *os.File.

func FindLoopDeviceFor Uses

func FindLoopDeviceFor(file *os.File) *os.File

FindLoopDeviceFor returns a loopback device file for the specified file which is backing file of a loop back device.

func SetCapacity Uses

func SetCapacity(file *os.File) error

SetCapacity reloads the size for the loopback device.

Package loopback imports 6 packages (graph) and is imported by 350 packages. Updated 2019-09-01. Refresh now. Tools for package owners.