Remove driver wide mount label for dm

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby 2014-04-03 06:34:57 +00:00
parent e2779e11db
commit 8b450a93b8
1 changed files with 5 additions and 7 deletions

View File

@ -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 {