Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for calculatePartSizeFromIdx (0.15 sec)

  1. cmd/erasure-metadata-utils.go

    }
    
    // Errors specifically generated by calculatePartSizeFromIdx function.
    var (
    	errPartSizeZero  = errors.New("Part size cannot be zero")
    	errPartSizeIndex = errors.New("Part index cannot be smaller than 1")
    )
    
    // calculatePartSizeFromIdx calculates the part size according to input index.
    // returns error if totalSize is -1, partSize is 0, partIndex is 0.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  2. cmd/xl-storage-format_test.go

    		{5 * humanize.MiByte, 2 * humanize.MiByte, 3, 1 * humanize.MiByte},
    		{5 * humanize.MiByte, 2 * humanize.MiByte, 4, 0},
    	}
    
    	for i, testCase := range testCases {
    		s, err := calculatePartSizeFromIdx(GlobalContext, testCase.totalSize, testCase.partSize, testCase.partIndex)
    		if err != nil {
    			t.Errorf("Test %d: Expected to pass but failed. %s", i+1, err)
    		}
    		if err == nil && s != testCase.expectedSize {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 17.6K bytes
    - Viewed (0)
Back to top