소스 검색

devmapper: Do not add back device into hash map if meta file removal failed

When we are deleting a device, we also delete associated metadata file. If
that file removal fails, we are adding back the device in in-memory
table. I really can't see what's the point. When next lookup takes place
it will be automatically loaded if need be. Remove that code.

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

+ 0 - 3
daemon/graphdriver/devmapper/deviceset.go

@@ -814,9 +814,6 @@ func (devices *DeviceSet) deleteDevice(info *DevInfo) error {
 	devices.devicesLock.Unlock()
 
 	if err := devices.removeMetadata(info); err != nil {
-		devices.devicesLock.Lock()
-		devices.Devices[info.Hash] = info
-		devices.devicesLock.Unlock()
 		log.Debugf("Error removing meta data: %s", err)
 		return err
 	}