allow specifying lower disks for Walk() (#17829)

useful when you may want Walk() with
reduced quorum requirements.
This commit is contained in:
Harshavardhana
2023-08-14 21:32:39 -07:00
committed by GitHub
parent 875f4076ec
commit 64aa7feabd
3 changed files with 75 additions and 34 deletions
+4 -7
View File
@@ -594,14 +594,11 @@ func getListQuorum(quorum string, driveCount int) int {
return 1
case "reduced":
return 2
case "strict":
return driveCount
}
// Defaults to (driveCount+1)/2 drives per set, defaults to "optimal" value
if driveCount > 0 {
case "optimal":
return (driveCount + 1) / 2
} // "3" otherwise.
return 3
}
// defaults to 'strict'
return driveCount
}
// Will return io.EOF if continuing would not yield more results.