Beispiel #1
0
func compareFileSystems(left, right *FileSystem, logWriter io.Writer) bool {
	if !filesystem.CompareFileSystems(&left.FileSystem, &right.FileSystem,
		logWriter) {
		return false
	}
	return objectcache.CompareObjects(left.ObjectCache, right.ObjectCache,
		logWriter)
}
Beispiel #2
0
func (fsh *FileSystemHistory) updateObjectCacheOnly() error {
	if fsh.fileSystem == nil {
		return nil
	}
	oldObjectCache := fsh.fileSystem.ObjectCache
	if err := fsh.fileSystem.ScanObjectCache(); err != nil {
		return err
	}
	if !objectcache.CompareObjects(oldObjectCache, fsh.fileSystem.ObjectCache,
		nil) {
		fsh.generationCount++
	}
	return nil
}
Beispiel #3
0
func (fsh *FileSystemHistory) updateObjectCacheOnly() error {
	if fsh.fileSystem == nil {
		return nil
	}
	oldObjectCache := fsh.fileSystem.ObjectCache
	if err := fsh.fileSystem.ScanObjectCache(); err != nil {
		return err
	}
	same := objectcache.CompareObjects(oldObjectCache,
		fsh.fileSystem.ObjectCache, nil)
	fsh.rwMutex.Lock()
	defer fsh.rwMutex.Unlock()
	fsh.scanCount++
	if !same {
		fsh.generationCount++
	}
	return nil
}