Documentation ¶
Index ¶
Constants ¶
const ( // StorageKeyPrefix is the prefix used in StorageKey StorageKeyPrefix = "lba:" // MinimumBucketSizeLimit defines how small the cache limit for the LBA // and thus a bucket can be at its extreme. Bigger is better. MinimumBucketSizeLimit = BytesPerSector * 8 )
const ( // NumberOfRecordsPerLBASector is the fixed length of the LBASectors NumberOfRecordsPerLBASector = 128 // BytesPerSector defines how many bytes each sector requires BytesPerSector = NumberOfRecordsPerLBASector * zerodisk.HashSize )
Variables ¶
This section is empty.
Functions ¶
func StorageKey ¶
StorageKey returns the LBA storage key used for a given deduped vdisk
Types ¶
type LBA ¶
type LBA struct {
// contains filtered or unexported fields
}
LBA implements the functionality to lookup block keys through the logical block index. The data is persisted to an external metadataserver in sectors of n keys, where n = NumberOfRecordsPerLBASector.
func NewLBA ¶
func NewLBA(vdiskID string, cacheLimitInBytes int64, provider ardb.MetadataConnProvider) (lba *LBA, err error)
NewLBA creates a new LBA
func (*LBA) Delete ¶
Delete the content hash for a specific block. When a key is updated, the sector containing this blockindex is marked as dirty and will be stored in the external metadaserver when Flush is called, or when the its getting evicted from the cache due to space limitations. Deleting means actually that the nilhash will be set for this blockindex.
func (*LBA) Get ¶
Get returns the hash for a block, nil if no hash is registered. If the sector containing this blockindex is not present, it is fetched from the external metadaserver