From c1760fb764193db05a25763f22097daaeae995aa Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Thu, 17 Mar 2022 10:57:52 -0700 Subject: [PATCH] Move apiCalls to front for field alignment (#14568) Fixes #14565 --- cmd/xl-storage-disk-id-check.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cmd/xl-storage-disk-id-check.go b/cmd/xl-storage-disk-id-check.go index 66b13c670..ab9e9c1a5 100644 --- a/cmd/xl-storage-disk-id-check.go +++ b/cmd/xl-storage-disk-id-check.go @@ -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 }