Kaynağa Gözat

devmapper: Do not load transaction meta file in device Hash map

device has map (device.Devices), contains valid devices and we skip all
the files which are not device files. transaction metadata file is not
device file. Skip this file when devices files are being read and loaded
into map.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Vivek Goyal 9 yıl önce
ebeveyn
işleme
ba02bf31cb
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5 0
      daemon/graphdriver/devmapper/deviceset.go

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

@@ -388,6 +388,11 @@ func (devices *DeviceSet) deviceFileWalkFunction(path string, finfo os.FileInfo)
 		return nil
 		return nil
 	}
 	}
 
 
+	if finfo.Name() == transactionMetaFile {
+		logrus.Debugf("Skipping file %s", path)
+		return nil
+	}
+
 	logrus.Debugf("Loading data for file %s", path)
 	logrus.Debugf("Loading data for file %s", path)
 
 
 	hash := finfo.Name()
 	hash := finfo.Name()