Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for isXLMetaFormatValid (0.1 sec)

  1. cmd/xl-storage-format-v1.go

    // format version and erasure coding information.
    func (m *xlMetaV1Object) valid() bool {
    	return isXLMetaFormatValid(m.Version, m.Format) &&
    		isXLMetaErasureInfoValid(m.Erasure.DataBlocks, m.Erasure.ParityBlocks)
    }
    
    // Verifies if the backend format metadata is sane by validating
    // the version string and format style.
    func isXLMetaFormatValid(version, format string) bool {
    	return ((version == xlMetaVersion101 ||
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 15:30:50 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  2. cmd/xl-storage-format_test.go

    		{3, xlMetaVersion100, "test", false},
    		{4, xlMetaVersion101, "hello", false},
    		{5, xlMetaVersion100, xlMetaFormat, true},
    		{6, xlMetaVersion101, xlMetaFormat, true},
    	}
    	for _, tt := range tests {
    		if got := isXLMetaFormatValid(tt.version, tt.format); got != tt.want {
    			t.Errorf("Test %d: Expected %v but received %v", tt.name, got, tt.want)
    		}
    	}
    }
    
    func TestIsXLMetaErasureInfoValid(t *testing.T) {
    	tests := []struct {
    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