Move apiCalls to front for field alignment (#14568)

Fixes #14565
This commit is contained in:
Klaus Post
2022-03-17 10:57:52 -07:00
committed by GitHub
parent e9bc0e7e98
commit c1760fb764

View File

@@ -71,14 +71,11 @@ const (
// Detects change in underlying disk.
type xlStorageDiskIDCheck struct {
// fields position optimized for memory please
// do not re-order them, if you add new fields
// please use `fieldalignment ./...` to check
// if your changes are not causing any problems.
storage *xlStorage
// apiCalls should be placed first so alignment is guaranteed for atomic operations.
apiCalls [storageMetricLast]uint64
apiLatencies [storageMetricLast]*lockedLastMinuteLatency
diskID string
apiCalls [storageMetricLast]uint64
storage *xlStorage
health *diskHealthTracker
}