Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ValidateParity (0.12 sec)

  1. internal/config/storageclass/storage-class.go

    		return StorageClass{}, config.ErrStorageClassValue(nil).Msg("Unsupported parity value " + s[1] + " provided")
    	}
    	return StorageClass{
    		Parity: parityDrives,
    	}, nil
    }
    
    // ValidateParity validate standard storage class parity.
    func ValidateParity(ssParity, setDriveCount int) error {
    	// SS parity drives should be greater than or equal to minParityDrives.
    	// Parity below minParityDrives is not supported.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 12 12:24:04 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  2. internal/config/storageclass/storage-class_test.go

    		{1, 4, true, 16},
    		{0, 4, true, 16},
    		{7, 6, false, 16},
    		{9, 0, false, 16},
    		{9, 9, false, 16},
    		{2, 9, false, 16},
    		{9, 2, false, 16},
    	}
    	for i, tt := range tests {
    		err := validateParity(tt.ssParity, tt.rrsParity, tt.setDriveCount)
    		if err != nil && tt.success {
    			t.Errorf("Test %d, Expected success, got %s", i+1, err)
    		}
    		if err == nil && !tt.success {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 15 23:04:20 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  3. cmd/erasure-server-pool.go

    		if commonParityDrives == 0 {
    			commonParityDrives, err = ecDrivesNoConfig(ep.DrivesPerSet)
    			if err != nil {
    				return nil, err
    			}
    		}
    
    		if err = storageclass.ValidateParity(commonParityDrives, ep.DrivesPerSet); err != nil {
    			return nil, fmt.Errorf("parity validation returned an error: %w <- (%d, %d), for pool(%s)", err, commonParityDrives, ep.DrivesPerSet, humanize.Ordinal(i+1))
    		}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 29 22:40:36 UTC 2024
    - 89.8K bytes
    - Viewed (0)
Back to top