docker
文章平均质量分 80
nerdX
这个作者很懒,什么都没留下…
展开
-
graph driver-device mapper-02driver基本操作
// 清除thin pool 1.1 func (d *Driver) Cleanup() error { // 停止thin pool err := d.DeviceSet.Shutdown() return err } // 当加载新镜像时,添加一个新thin device // id为containerid或imageid 1.2 func (d *Driver) Create(i原创 2014-07-25 11:19:39 · 1345 阅读 · 0 评论 -
graph driver-device mapper-01driver初始化
// thin device数据结构 type DevInfo struct { Hash string `json:"-"` DeviceId int `json:"device_id"` Size uint64 `json:"size"` TransactionId uint64 `json:"tran原创 2014-07-25 10:23:07 · 2880 阅读 · 0 评论 -
graph driver-device mapper-03thin pool基本操作
// 在thin pool中创建一个新thin device // 调用路径:driver.Create() 1.1 func (devices *DeviceSet) AddDevice(hash, baseHash string) error { //查找父device baseInfo, err := devices.lookupDevice(baseHash) if err != n原创 2014-07-25 12:47:22 · 2642 阅读 · 0 评论 -
graph driver-device mapper-04libdevmapper基本操作
// 创建thin pool // 调用路径:NewDeviceSet->initDevmapper->createPool 1.1 func createPool(poolName string, dataFile, metadataFile *os.File, poolBlockSize uint32) error { //通过task封装与libdevmapper的交互 task, er原创 2014-07-25 14:34:59 · 1838 阅读 · 0 评论