From 8eecdc6d1f576237f84771e65833b06365fbe671 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 22 Mar 2022 12:21:14 -0700 Subject: [PATCH] odd stripe sizes should choose (odd+1)/2 to get correct quorum (#14610) --- cmd/metacache-set.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/metacache-set.go b/cmd/metacache-set.go index 7b0473f48..addaf6460 100644 --- a/cmd/metacache-set.go +++ b/cmd/metacache-set.go @@ -547,8 +547,8 @@ func (er *erasureObjects) listPath(ctx context.Context, o listPathOptions, resul // Special case: ask all disks if the drive count is 4 if askDisks <= 0 || er.setDriveCount == 4 { - askDisks = len(disks) // with 'strict' quorum list on all online disks. - listingQuorum = len(disks) / 2 // keep this such that we can list all objects with different quorum ratio. + askDisks = len(disks) // with 'strict' quorum list on all online disks. + listingQuorum = (len(disks) + 1) / 2 // keep this such that we can list all objects with different quorum ratio. } if askDisks > 0 && len(disks) > askDisks { rand.Shuffle(len(disks), func(i, j int) {