Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for objectPartIndex (0.06 sec)

  1. cmd/erasure-metadata.go

    	case fi.MarkDeleted != ofi.MarkDeleted,
    		!fi.ReplicationState.Equal(ofi.ReplicationState):
    		return false
    	}
    	return true
    }
    
    // objectPartIndex - returns the index of matching object part number.
    // Returns -1 if the part cannot be found.
    func objectPartIndex(parts []ObjectPartInfo, partNumber int) int {
    	for i, part := range parts {
    		if partNumber == part.Number {
    			return i
    		}
    	}
    	return -1
    }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 22:10:24 UTC 2024
    - 21.3K bytes
    - Viewed (0)
  2. cmd/erasure-multipart.go

    	// Allocate parts similar to incoming slice.
    	fi.Parts = make([]ObjectPartInfo, len(parts))
    
    	// Validate each part and then commit to disk.
    	for i, part := range parts {
    		partIdx := objectPartIndex(currentFI.Parts, part.PartNumber)
    		// All parts should have same part number.
    		if partIdx == -1 {
    			invp := InvalidPart{
    				PartNumber: part.PartNumber,
    				GotETag:    part.ETag,
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 29 22:40:36 UTC 2024
    - 44.7K bytes
    - Viewed (0)
Back to top