Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for LoadOrConvert (0.23 sec)

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

    		return FileInfoVersions{}, e
    	} else if buf != nil {
    		versions, err = buf.ListVersions(volume, path, allParts)
    	} else {
    		var xlMeta xlMetaV2
    		if err := xlMeta.LoadOrConvert(xlMetaBuf); err != nil {
    			return FileInfoVersions{}, err
    		}
    		versions, err = xlMeta.ListVersions(volume, path, allParts)
    	}
    	if err == nil && len(versions) == 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  2. cmd/xl-storage-format-v2_test.go

    	if err != nil {
    		b.Fatal(err)
    	}
    	dec, _ := zstd.NewReader(nil)
    	data, err = dec.DecodeAll(data, nil)
    	if err != nil {
    		b.Fatal(err)
    	}
    
    	var xl xlMetaV2
    	if err = xl.LoadOrConvert(data); err != nil {
    		b.Fatal(err)
    	}
    
    	vers := make([][]xlMetaV2ShallowVersion, 16)
    	for i := range vers {
    		vers[i] = xl.versions
    	}
    
    	b.Run("requested-none", func(b *testing.B) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Mar 08 17:50:48 UTC 2024
    - 36.4K bytes
    - Viewed (0)
  3. cmd/metacache-entries.go

    		return nil, errFileNotFound
    	}
    	if e.cached == nil {
    		if len(e.metadata) == 0 {
    			// only happens if the entry is not found.
    			return nil, errFileNotFound
    		}
    		var xl xlMetaV2
    		err := xl.LoadOrConvert(e.metadata)
    		if err != nil {
    			return nil, err
    		}
    		e.cached = &xl
    	}
    	return e.cached, nil
    }
    
    // fileInfoVersions returns the metadata as FileInfoVersions.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  4. cmd/xl-storage.go

    		// top level parent is automatically removed.
    		return s.deleteFile(volumeDir, pathJoin(volumeDir, path), true, false)
    	}
    
    	var xlMeta xlMetaV2
    	if err = xlMeta.LoadOrConvert(buf); err != nil {
    		return err
    	}
    
    	for _, fi := range fis {
    		dataDir, err := xlMeta.DeleteVersion(fi)
    		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)
  5. cmd/xl-storage-format-v2.go

    	// To remove all data set to nil.
    	data xlMetaInlineData
    
    	// metadata version.
    	metaV uint8
    }
    
    // LoadOrConvert will load the metadata in the buffer.
    // If this is a legacy format, it will automatically be converted to XLV2.
    func (x *xlMetaV2) LoadOrConvert(buf []byte) error {
    	if isXL2V1Format(buf) {
    		return x.Load(buf)
    	}
    
    	xlMeta := &xlMetaV1Object{}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 15:30:50 UTC 2024
    - 64K bytes
    - Viewed (1)
  6. cmd/erasure-object.go

    		rf := rawFileInfos[index]
    		if rf.Buf == nil {
    			continue
    		}
    		if !readData {
    			// Save the buffer so we can reuse it.
    			v2bufs[index] = rf.Buf
    		}
    
    		var xl xlMetaV2
    		if err := xl.LoadOrConvert(rf.Buf); err != nil {
    			errs[index] = err
    			continue
    		}
    		metadataArray[index] = &xl
    		metaFileInfos[index] = FileInfo{}
    	}
    
    	for index := range metadataArray {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 22:10:24 UTC 2024
    - 78.8K bytes
    - Viewed (0)
Back to top