Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for bitrotVerify (0.13 sec)

  1. cmd/bitrot.go

    	if algo != HighwayHash256S {
    		return size
    	}
    	return ceilFrac(size, shardSize)*int64(algo.New().Size()) + size
    }
    
    // bitrotVerify a single stream of data.
    func bitrotVerify(r io.Reader, wantSize, partSize int64, algo BitrotAlgorithm, want []byte, shardSize int64) error {
    	if algo != HighwayHash256S {
    		h := algo.New()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jan 30 20:43:25 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  2. cmd/xl-storage_test.go

    	// Check if VerifyFile reports the incorrect file length (the correct length is `size+1`)
    	if err := storage.storage.bitrotVerify(context.Background(), pathJoin(path, volName, fileName), size, algo, hashBytes, 0); err == nil {
    		t.Fatal("expected to fail bitrot check")
    	}
    
    	// Check if bitrot fails
    	if err := storage.storage.bitrotVerify(context.Background(), pathJoin(path, volName, fileName), size+1, algo, hashBytes, 0); err == nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 66.7K bytes
    - Viewed (0)
  3. cmd/erasure-healing-common.go

    			continue
    		}
    
    		// Always check data, if we got it.
    		if (len(meta.Data) > 0 || meta.Size == 0) && len(meta.Parts) > 0 {
    			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())
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 22:10:24 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  4. cmd/xl-storage.go

    	}
    
    	// Remove parent dir of the source file if empty
    	parentDir := pathutil.Dir(srcFilePath)
    	s.deleteFile(srcVolumeDir, parentDir, false, false)
    
    	return nil
    }
    
    func (s *xlStorage) bitrotVerify(ctx context.Context, partPath string, partSize int64, algo BitrotAlgorithm, sum []byte, shardSize int64) error {
    	// Open the file for reading.
    	file, err := OpenFile(partPath, readMode, 0o666)
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 26 09:58:27 UTC 2024
    - 91.3K bytes
    - Viewed (0)
Back to top