refactor(ec): drop unused buffer/block-size params from generateMissingEcFiles

The function only routes through rebuildEcFiles, which uses
ErasureCodingSmallBlockSize directly. The buffer/block-size knobs
threaded in from RebuildEcFilesWithContext were never read. Drop them
from the signature and the sole caller; encoding still goes through
generateEcFiles which keeps its own copies of the same params.
This commit is contained in:
Chris Lu
2026-05-09 14:45:44 -07:00
parent 4e058c2bce
commit d60f5201f9

View File

@@ -99,7 +99,7 @@ func RebuildEcFiles(baseFileName string, additionalDirs ...string) ([]uint32, er
// RebuildEcFilesWithContext rebuilds missing EC files using the provided context.
// additionalDirs are extra directories to search for existing shard files.
func RebuildEcFilesWithContext(baseFileName string, ctx *ECContext, additionalDirs ...string) ([]uint32, error) {
return generateMissingEcFiles(baseFileName, 256*1024, ErasureCodingLargeBlockSize, ErasureCodingSmallBlockSize, ctx, additionalDirs)
return generateMissingEcFiles(baseFileName, ctx, additionalDirs)
}
func ToExt(ecIndex int) string {
@@ -155,7 +155,7 @@ func findShardFile(baseFileName string, ext string, additionalDirs []string) (sh
return
}
func generateMissingEcFiles(baseFileName string, bufferSize int, largeBlockSize int64, smallBlockSize int64, ctx *ECContext, additionalDirs []string) (generatedShardIds []uint32, err error) {
func generateMissingEcFiles(baseFileName string, ctx *ECContext, additionalDirs []string) (generatedShardIds []uint32, err error) {
// Pass 1: discover which shards exist and which are missing,
// opening input files but NOT creating output files yet.