revert changes collectStatForOneVolume (#7199)

This commit is contained in:
Dmitriy Pavlov
2025-09-05 16:37:05 +03:00
committed by GitHub
parent b3b1316b54
commit 0ac3c65480

View File

@@ -250,7 +250,19 @@ func collectStatForOneVolume(vid needle.VolumeId, v *Volume) (s *VolumeInfo) {
DiskId: v.diskId,
}
s.RemoteStorageName, s.RemoteStorageKey = v.RemoteStorageNameKey()
s.Size, _, _ = v.FileStat()
v.dataFileAccessLock.RLock()
defer v.dataFileAccessLock.RUnlock()
if v.nm == nil {
return
}
s.FileCount = v.nm.FileCount()
s.DeleteCount = v.nm.DeletedCount()
s.DeletedByteCount = v.nm.DeletedSize()
s.Size = v.nm.ContentSize()
return
}