- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for ShardFileSize (0.22 sec)
-
cmd/erasure-coding.go
func (e *Erasure) ShardFileOffset(startOffset, length, totalLength int64) int64 { shardSize := e.ShardSize() shardFileSize := e.ShardFileSize(totalLength) endShard := (startOffset + length) / e.blockSize tillOffset := endShard*shardSize + shardSize if tillOffset > shardFileSize { tillOffset = shardFileSize } return tillOffset } // erasureSelfTest performs a self-test to ensure that erasure
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jan 31 02:11:45 UTC 2024 - 8.6K bytes - Viewed (0) -
cmd/erasure-decode.go
} return ¶llelReader{ readers: readers, orgReaders: readers, dataBlocks: e.dataBlocks, offset: (offset / e.blockSize) * e.ShardSize(), shardSize: e.ShardSize(), shardFileSize: e.ShardFileSize(totalLength), buf: make([][]byte, len(readers)), readerToBuf: r2b, stashBuffer: b, } } // Done will release any resources used by the parallelReader.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 29 01:40:52 UTC 2024 - 9.5K bytes - Viewed (0) -
cmd/erasure-heal_test.go
} readers := make([]io.ReaderAt, len(disks)) for i, disk := range disks { shardFilesize := erasure.ShardFileSize(test.size) readers[i] = newBitrotReader(disk, nil, "testbucket", "testobject", shardFilesize, test.algorithm, bitrotWriterSum(writers[i]), erasure.ShardSize()) } // setup stale disks for the test case staleDisks := make([]StorageAPI, len(disks))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 7.9K bytes - Viewed (0) -
cmd/erasure-encode_test.go
} writers := make([]io.Writer, len(disks)) for i, disk := range disks { if disk == OfflineDisk { continue } writers[i] = newBitrotWriter(disk, "", "testbucket", "object", erasure.ShardFileSize(int64(len(data[test.offset:]))), test.algorithm, erasure.ShardSize()) } n, err := erasure.Encode(context.Background(), bytes.NewReader(data[test.offset:]), writers, buffer, erasure.dataBlocks+1)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 11.9K bytes - Viewed (0) -
cmd/erasure-decode_test.go
} buffer := make([]byte, test.blocksize, 2*test.blocksize) writers := make([]io.Writer, len(disks)) for i, disk := range disks { writers[i] = newBitrotWriter(disk, "", "testbucket", "object", erasure.ShardFileSize(test.data), writeAlgorithm, erasure.ShardSize()) } n, err := erasure.Encode(context.Background(), bytes.NewReader(data), writers, buffer, erasure.dataBlocks+1) closeBitrotWriters(writers) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 21.1K bytes - Viewed (0) -
cmd/erasure-healing-common.go
checksumInfo := meta.Erasure.GetChecksumInfo(meta.Parts[0].Number) verifyErr := bitrotVerify(bytes.NewReader(meta.Data), int64(len(meta.Data)), meta.Erasure.ShardFileSize(meta.Size), checksumInfo.Algorithm, checksumInfo.Hash, meta.Erasure.ShardSize()) dataErrsByPart[0][i] = convPartErrToInt(verifyErr) continue } var ( verifyErr error
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 12.7K bytes - Viewed (0) -
cmd/storage-datatypes.go
Versioned bool `msg:"vs"` } func (fi FileInfo) shardSize() int64 { return ceilFrac(fi.Erasure.BlockSize, int64(fi.Erasure.DataBlocks)) } // ShardFileSize - returns final erasure size from original size. func (fi FileInfo) ShardFileSize(totalLength int64) int64 { if totalLength == 0 { return 0 } if totalLength == -1 { return -1 } numShards := totalLength / fi.Erasure.BlockSize
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 22 15:30:50 UTC 2024 - 17.3K bytes - Viewed (0) -
cmd/erasure-metadata.go
if sum.PartNumber == partNumber { // Return the checksum return sum } } return ChecksumInfo{Algorithm: DefaultBitrotAlgorithm} } // ShardFileSize - returns final erasure size from original size. func (e ErasureInfo) ShardFileSize(totalLength int64) int64 { if totalLength == 0 { return 0 } if totalLength == -1 { return -1 } numShards := totalLength / e.BlockSize
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 21.3K bytes - Viewed (0) -
cmd/erasure-object.go
var inlineBuffers []*bytes.Buffer if globalStorageClass.ShouldInline(erasure.ShardFileSize(data.ActualSize()), opts.Versioned) { inlineBuffers = make([]*bytes.Buffer, len(onlineDisks)) } shardFileSize := erasure.ShardFileSize(data.Size()) writers := make([]io.Writer, len(onlineDisks)) for i, disk := range onlineDisks { if disk == nil { continue
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 78.8K bytes - Viewed (0) -
cmd/erasure-healing.go
if disk == OfflineDisk { continue } partPath := pathJoin(tmpID, dstDataDir, fmt.Sprintf("part.%d", partNumber)) if len(inlineBuffers) > 0 { buf := grid.GetByteBufferCap(int(erasure.ShardFileSize(latestMeta.Size)) + 64) inlineBuffers[i] = bytes.NewBuffer(buf[:0]) defer grid.PutByteBuffer(buf) writers[i] = newStreamingBitrotWriterBuffer(inlineBuffers[i], DefaultBitrotAlgorithm, erasure.ShardSize())
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Oct 02 17:50:41 UTC 2024 - 34.4K bytes - Viewed (0)