"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
accounting: fix race stopping/starting the stats counter
Nick Craig-Wooda7db375f5d9b
diff --git a/fs/accounting/stats.go b/fs/accounting/stats.goindex e46f95e5c..221ab3001 100644--- a/fs/accounting/stats.go+++ b/fs/accounting/stats.go@@ -360,8 +360,8 @@ func (s *StatsInfo) averageLoop() {// Start the average loopfunc (s *StatsInfo) startAverageLoop() {- s.mu.RLock()- defer s.mu.RUnlock()+ s.mu.Lock()+ defer s.mu.Unlock()s.average.startOnce.Do(func() {s.average.stopped.Add(1)go s.averageLoop()@@ -380,8 +380,8 @@ func (s *StatsInfo) _stopAverageLoop() {// Stop the average loopfunc (s *StatsInfo) stopAverageLoop() {- s.mu.RLock()- defer s.mu.RUnlock()+ s.mu.Lock()+ defer s.mu.Unlock()s._stopAverageLoop()}