소스 검색

devmapper: Fix comments and for HasDevice() and Exists()

Exists() and HasDevice() just check if device file exists or not. It does
not say anything about if device is mounted or not. Fix comments.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Vivek Goyal 9 년 전
부모
커밋
f5c0eb9ffe
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      daemon/graphdriver/devmapper/deviceset.go
  2. 1 1
      daemon/graphdriver/devmapper/driver.go

+ 1 - 1
daemon/graphdriver/devmapper/deviceset.go

@@ -1786,7 +1786,7 @@ func (devices *DeviceSet) UnmountDevice(hash string) error {
 	return nil
 }
 
-// HasDevice returns true if the device is in the hash and mounted.
+// HasDevice returns true if the device metadata exists.
 func (devices *DeviceSet) HasDevice(hash string) bool {
 	devices.Lock()
 	defer devices.Unlock()

+ 1 - 1
daemon/graphdriver/devmapper/driver.go

@@ -196,7 +196,7 @@ func (d *Driver) Put(id string) error {
 	return err
 }
 
-// Exists checks to see if the device is mounted.
+// Exists checks to see if the device exists.
 func (d *Driver) Exists(id string) bool {
 	return d.DeviceSet.HasDevice(id)
 }