mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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:
parent
e2779e11db
commit
8b450a93b8
1 changed files with 5 additions and 7 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue