mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
devicemapper: Use device/inode of the root dir, not the image
This way the devicemapper prefix stays stable even if we're not using loopback mounted devices.
This commit is contained in:
parent
ad2fbd9e87
commit
e6a73e65a2
1 changed files with 3 additions and 3 deletions
|
@ -361,11 +361,11 @@ func (devices *DeviceSetDM) initDevmapper() error {
|
|||
return err
|
||||
}
|
||||
|
||||
// Set the device prefix from the device id and inode of the data image
|
||||
// Set the device prefix from the device id and inode of the docker root dir
|
||||
|
||||
st, err := os.Stat(data)
|
||||
st, err := os.Stat(devices.root)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error looking up data image %s: %s", data, err)
|
||||
return fmt.Errorf("Error looking up dir %s: %s", devices.root, err)
|
||||
}
|
||||
sysSt := st.Sys().(*syscall.Stat_t)
|
||||
// "reg-" stands for "regular file".
|
||||
|
|
Loading…
Reference in a new issue