Type Alias ExtentValue

Source
pub type ExtentValue = ExtentValueV38;
Expand description

ExtentValue is the payload for an extent in the object store, which describes where the extent is physically located.

Aliased Type§

enum ExtentValue {}

Variants§

Implementations§

Source§

impl ExtentValue

Source

pub fn new(device_offset: u64, mode: ExtentMode, key_id: u64) -> ExtentValue

Source

pub fn new_raw(device_offset: u64, key_id: u64) -> ExtentValue

Source

pub fn with_checksum( device_offset: u64, checksums: Checksums, key_id: u64, ) -> ExtentValue

Creates an ExtentValue with a checksum

Source

pub fn blank_overwrite_extent( device_offset: u64, num_blocks: usize, key_id: u64, ) -> ExtentValue

Creates an ExtentValue for an overwrite range with no blocks written to yet.

Source

pub fn initialized_overwrite_extent( device_offset: u64, key_id: u64, ) -> ExtentValue

Creates an ExtentValue for an overwrite range with all the blocks initialized.

Source

pub fn deleted_extent() -> ExtentValue

Creates an ObjectValue for a deletion of an object extent.

Source

pub fn is_deleted(&self) -> bool

Source

pub fn offset_by(&self, amount: u64, extent_len: u64) -> Self

Returns a new ExtentValue offset by amount. Both amount and extent_len must be multiples of the underlying block size.

Source

pub fn shrunk(&self, original_len: u64, new_len: u64) -> Self

Returns a new ExtentValue after shrinking the extent from |original_len| to |new_len|.