package devmapper
import "github.com/docker/docker/daemon/graphdriver/devmapper"
Index ¶
- Variables
- func Init(home string, options []string) (graphdriver.Driver, error)
- func Mounted(mountpoint string) (bool, error)
- func ProbeFsType(device string) (string, error)
- type DevInfo
- type DevStatus
- type DeviceSet
- func NewDeviceSet(root string, doInit bool, options []string) (*DeviceSet, error)
- func (devices *DeviceSet) AddDevice(hash, baseHash string) error
- func (devices *DeviceSet) DMLog(level int, file string, line int, dmError int, message string)
- func (devices *DeviceSet) DataDevicePath() string
- func (devices *DeviceSet) DeleteDevice(hash string) error
- func (devices *DeviceSet) GetDeviceStatus(hash string) (*DevStatus, error)
- func (devices *DeviceSet) HasActivatedDevice(hash string) bool
- func (devices *DeviceSet) HasDevice(hash string) bool
- func (devices *DeviceSet) List() []string
- func (devices *DeviceSet) MetadataDevicePath() string
- func (devices *DeviceSet) MountDevice(hash, path, mountLabel string) error
- func (devices *DeviceSet) ResizePool(size int64) error
- func (devices *DeviceSet) Shutdown() error
- func (devices *DeviceSet) Status() *Status
- func (devices *DeviceSet) UnmountDevice(hash string) error
- type DiskUsage
- type Driver
- func (d *Driver) Cleanup() error
- func (d *Driver) Create(id, parent string) error
- func (d *Driver) Exists(id string) bool
- func (d *Driver) Get(id, mountLabel string) (string, error)
- func (d *Driver) Put(id string) error
- func (d *Driver) Remove(id string) error
- func (d *Driver) Status() [][2]string
- func (d *Driver) String() string
- type MetaData
- type Status
- type Transaction
Variables ¶
var ( DefaultDataLoopbackSize int64 = 100 * 1024 * 1024 * 1024 DefaultMetaDataLoopbackSize int64 = 2 * 1024 * 1024 * 1024 DefaultBaseFsSize uint64 = 10 * 1024 * 1024 * 1024 DefaultThinpBlockSize uint32 = 128 // 64K = 128 512b sectors MaxDeviceId int = 0xffffff // 24 bit, pool limit DeviceIdMapSz int = (MaxDeviceId + 1) / 8 )
Functions ¶
func Init ¶
func Init(home string, options []string) (graphdriver.Driver, error)
func Mounted ¶
func ProbeFsType ¶
Types ¶
type DevInfo ¶
type DevInfo struct { Hash string `json:"-"` DeviceId int `json:"device_id"` Size uint64 `json:"size"` TransactionId uint64 `json:"transaction_id"` Initialized bool `json:"initialized"` // contains filtered or unexported fields }
func (*DevInfo) DevName ¶
func (*DevInfo) Name ¶
type DevStatus ¶
type DevStatus struct { DeviceId int Size uint64 TransactionId uint64 SizeInSectors uint64 MappedSectors uint64 HighestMappedSector uint64 }
type DeviceSet ¶
type DeviceSet struct { MetaData `json:"-"` sync.Mutex `json:"-"` // Protects Devices map and serializes calls into libdevmapper TransactionId uint64 `json:"-"` NextDeviceId int `json:"next_device_id"` Transaction `json:"-"` // contains filtered or unexported fields }
func NewDeviceSet ¶
func (*DeviceSet) AddDevice ¶
func (*DeviceSet) DMLog ¶
func (*DeviceSet) DataDevicePath ¶
DataDevicePath returns the path to the data storage for this deviceset, regardless of loopback or block device
func (*DeviceSet) DeleteDevice ¶
func (*DeviceSet) GetDeviceStatus ¶
func (*DeviceSet) HasActivatedDevice ¶
func (*DeviceSet) HasDevice ¶
func (*DeviceSet) List ¶
func (*DeviceSet) MetadataDevicePath ¶
MetadataDevicePath returns the path to the metadata storage for this deviceset, regardless of loopback or block device
func (*DeviceSet) MountDevice ¶
func (*DeviceSet) ResizePool ¶
func (*DeviceSet) Shutdown ¶
func (*DeviceSet) Status ¶
Status returns the current status of this deviceset
func (*DeviceSet) UnmountDevice ¶
type DiskUsage ¶
type Driver ¶
type Driver struct { *DeviceSet // contains filtered or unexported fields }
func (*Driver) Cleanup ¶
func (*Driver) Create ¶
func (*Driver) Exists ¶
func (*Driver) Get ¶
func (*Driver) Put ¶
func (*Driver) Remove ¶
func (*Driver) Status ¶
func (*Driver) String ¶
type MetaData ¶
type MetaData struct { Devices map[string]*DevInfo `json:"Devices"` // contains filtered or unexported fields }
type Status ¶
type Status struct { PoolName string DataFile string // actual block device for data DataLoopback string // loopback file, if used MetadataFile string // actual block device for metadata MetadataLoopback string // loopback file, if used Data DiskUsage Metadata DiskUsage SectorSize uint64 UdevSyncSupported bool }
type Transaction ¶
type Transaction struct { OpenTransactionId uint64 `json:"open_transaction_id"` DeviceIdHash string `json:"device_hash"` DeviceId int `json:"device_id"` }
Source Files ¶
deviceset.go devmapper_doc.go driver.go mount.go
- Version
- v1.6.0-rc4
- Published
- Apr 2, 2015
- Platform
- linux/amd64
- Imports
- 22 packages
- Last checked
- 22 minutes ago –
Tools for package owners.