Remove driver wide mount label for dm
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael) Upstream-commit: 8b450a93b8bb3b1cd0c32754dd499ec0c9b66537 Component: engine
This commit is contained in:
@@ -22,8 +22,7 @@ func init() {
|
||||
|
||||
type Driver struct {
|
||||
*DeviceSet
|
||||
home string
|
||||
MountLabel string
|
||||
home string
|
||||
}
|
||||
|
||||
var Init = func(home string) (graphdriver.Driver, error) {
|
||||
@@ -62,12 +61,11 @@ func (d *Driver) Cleanup() error {
|
||||
}
|
||||
|
||||
func (d *Driver) Create(id, parent string, mountLabel string) error {
|
||||
d.MountLabel = mountLabel
|
||||
if err := d.DeviceSet.AddDevice(id, parent); err != nil {
|
||||
return err
|
||||
}
|
||||
mp := path.Join(d.home, "mnt", id)
|
||||
if err := d.mount(id, mp, d.MountLabel); err != nil {
|
||||
if err := d.mount(id, mp); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -117,7 +115,7 @@ func (d *Driver) Remove(id string) error {
|
||||
|
||||
func (d *Driver) Get(id string) (string, error) {
|
||||
mp := path.Join(d.home, "mnt", id)
|
||||
if err := d.mount(id, mp, d.MountLabel); err != nil {
|
||||
if err := d.mount(id, mp); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
@@ -130,13 +128,13 @@ func (d *Driver) Put(id string) {
|
||||
}
|
||||
}
|
||||
|
||||
func (d *Driver) mount(id, mountPoint string, mountLabel string) error {
|
||||
func (d *Driver) mount(id, mountPoint string) error {
|
||||
// Create the target directories if they don't exist
|
||||
if err := osMkdirAll(mountPoint, 0755); err != nil && !osIsExist(err) {
|
||||
return err
|
||||
}
|
||||
// Mount the device
|
||||
return d.DeviceSet.MountDevice(id, mountPoint, mountLabel)
|
||||
return d.DeviceSet.MountDevice(id, mountPoint, "")
|
||||
}
|
||||
|
||||
func (d *Driver) Exists(id string) bool {
|
||||
|
||||
Reference in New Issue
Block a user