"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
vfs: make sure struct field is aligned for atomic access
Roberto Ricci72f9f1e9c003
diff --git a/vfs/vfscache/writeback/writeback.go b/vfs/vfscache/writeback/writeback.goindex b4ab6d39a..8290dd245 100644--- a/vfs/vfscache/writeback/writeback.go+++ b/vfs/vfscache/writeback/writeback.go@@ -26,6 +26,9 @@ type Handle uint64// WriteBack keeps track of the items which need to be written back to the disk at some pointtype WriteBack struct {+ // read and written with atomic, must be 64-bit aligned+ id Handle // id of the last writeBackItem created+ctx context.Contextmu sync.Mutexitems writeBackItems // priority queue of *writeBackItem - writeBackItems are in here while awaiting transfer only@@ -34,9 +37,6 @@ type WriteBack struct {timer *time.Timer // next scheduled time for the uploaderexpiry time.Time // time the next item expires or IsZerouploads int // number of uploads in progress-- // read and written with atomic- id Handle // id of the last writeBackItem created}// New make a new WriteBack