Browse Source

Merge pull request #2262 from alexlarsson/dm-dind-use-root-dir

devicemapper: Use device/inode of the root dir, not the image
Guillaume J. Charmes 11 năm trước cách đây
mục cha
commit
bdb3b2a88c
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      devmapper/deviceset_devmapper.go

+ 3 - 3
devmapper/deviceset_devmapper.go

@@ -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".