Browse Source

revert changes collectStatForOneVolume (#7199)

pull/7201/head
Dmitriy Pavlov 4 weeks ago
committed by GitHub
parent
commit
0ac3c65480
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 14
      weed/storage/store.go

14
weed/storage/store.go

@ -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
}

Loading…
Cancel
Save