From f5c0eb9ffe9a9d30ac6ff81fa1a4c216908189a6 Mon Sep 17 00:00:00 2001 From: Vivek Goyal Date: Wed, 30 Sep 2015 15:21:22 -0400 Subject: [PATCH] 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 --- daemon/graphdriver/devmapper/deviceset.go | 2 +- daemon/graphdriver/devmapper/driver.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/graphdriver/devmapper/deviceset.go b/daemon/graphdriver/devmapper/deviceset.go index b3d3c6d69f..c2488faa10 100644 --- a/daemon/graphdriver/devmapper/deviceset.go +++ b/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() diff --git a/daemon/graphdriver/devmapper/driver.go b/daemon/graphdriver/devmapper/driver.go index 67657f65e7..dc2647d11d 100644 --- a/daemon/graphdriver/devmapper/driver.go +++ b/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) }