LinuxWritableEngine

Struct LinuxWritableEngine 

Source
pub struct LinuxWritableEngine<B, S> { /* private fields */ }
Expand description

Writable existing-file engine with injected durable local staging.

Implementations§

Source§

impl<B, S> LinuxWritableEngine<B, S>
where B: CloudFilesBackend + 'static, S: LinuxWritebackStore + 'static,

Source

pub async fn activate( readonly: LinuxReadOnlyEngine<B>, store: Arc<S>, session_generation: SessionGeneration, ) -> Result<Self>

Activates one mount generation and restores durable dirty snapshots before exposure.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn activate_with_namespace<N>( readonly: LinuxReadOnlyEngine<B>, store: Arc<S>, namespace_store: Arc<N>, session_generation: SessionGeneration, ) -> Result<Self>
where N: LinuxNamespaceMutationStore + 'static,

Activates writeback plus a durable namespace port for native regular-file creation.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn activate_with_namespace_and_remote<N>( readonly: LinuxReadOnlyEngine<B>, store: Arc<S>, namespace_store: Arc<N>, remote_entries: Vec<LinuxRemoteEntry>, session_generation: SessionGeneration, ) -> Result<Self>
where N: LinuxNamespaceMutationStore + 'static,

Activates namespace/writeback state with product-persisted remote inode mappings.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub fn readonly(&self) -> &LinuxReadOnlyEngine<B>

Returns the underlying read-only engine used for metadata and directory operations.

Source

pub fn session_generation(&self) -> SessionGeneration

Returns the durable mount generation that owns this engine’s writeback sessions.

Source

pub async fn restore_remote_overlay( &self, entries: impl IntoIterator<Item = LinuxRemoteEntry>, ) -> Result<()>

Restores product-persisted remote entries before the mount is exposed to the kernel.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn apply_remote_change( &self, change: LinuxRemoteChange, ) -> Result<Vec<LinuxInvalidation>>

Applies one already-durable remote namespace transition and returns kernel invalidations.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn getattr( &self, inode: LinuxInode, handle: Option<LinuxFileHandle>, ) -> Result<LinuxNode>

Loads attributes, overlaying the current staged size when a writable handle is supplied.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn lookup(&self, parent: LinuxInode, name: &str) -> Result<LinuxNode>

Resolves one child and overlays its current dirty staging size.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn open_file( &self, inode: LinuxInode, access: LinuxFileAccess, ) -> Result<LinuxFileHandle>

Opens an existing file for remote reads or durable local writeback.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn create_file( &self, parent: LinuxInode, name: &str, mode: u32, umask: u32, access: LinuxFileAccess, ) -> Result<(LinuxNode, LinuxFileHandle)>

Atomically accepts a durable regular-file create and returns its entry plus open handle.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn create_directory( &self, parent: LinuxInode, name: &str, mode: u32, umask: u32, ) -> Result<LinuxNode>

Atomically accepts a durable directory create and exposes its stable inode.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn rename( &self, parent: LinuxInode, name: &str, new_parent: LinuxInode, new_name: &str, no_replace: bool, ) -> Result<()>

Atomically renames or moves one namespace entry while preserving stable identity.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn remove( &self, parent: LinuxInode, name: &str, expected_kind: LinuxNodeKind, ) -> Result<()>

Atomically accepts unlink or rmdir and hides the durable tombstone from new lookups.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn open_directory( &self, inode: LinuxInode, ) -> Result<LinuxDirectoryHandle>

Opens a directory snapshot that includes durable local creates accepted before this call.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub fn directory_snapshot( &self, inode: LinuxInode, handle: LinuxDirectoryHandle, ) -> Result<LinuxDirectorySnapshot>

Returns the immutable writable-directory snapshot for one handle.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub fn release_directory(&self, handle: LinuxDirectoryHandle) -> Result<()>

Releases one writable-directory snapshot handle.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn read_file( &self, inode: LinuxInode, handle: LinuxFileHandle, offset: u64, size: u32, ) -> Result<Bytes>

Reads from the remote revision or current durable staging, depending on the handle mode.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn write_file( &self, inode: LinuxInode, handle: LinuxFileHandle, offset: u64, bytes: Bytes, ) -> Result<u32>

Durably applies a positioned write before reporting accepted bytes to FUSE.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn truncate_file( &self, inode: LinuxInode, handle: LinuxFileHandle, size: u64, ) -> Result<LinuxNode>

Durably truncates or extends the staged file.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn truncate_once( &self, inode: LinuxInode, size: u64, ) -> Result<LinuxNode>

Opens, truncates, and releases one existing file for handle-less setattr requests.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn sync_file( &self, inode: LinuxInode, handle: LinuxFileHandle, data_only: bool, ) -> Result<()>

Applies an idempotent flush or explicit fsync durability boundary.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Source

pub async fn release_file(&self, handle: LinuxFileHandle) -> Result<()>

Releases one file handle and its product-owned writeback session.

§Errors

Returns an error when validation fails or an underlying backend, store, or platform operation fails.

Trait Implementations§

Source§

impl<B, S> Clone for LinuxWritableEngine<B, S>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<B, S> Freeze for LinuxWritableEngine<B, S>

§

impl<B, S> !RefUnwindSafe for LinuxWritableEngine<B, S>

§

impl<B, S> Send for LinuxWritableEngine<B, S>
where S: Sync + Send, B: Sync + Send,

§

impl<B, S> Sync for LinuxWritableEngine<B, S>
where S: Sync + Send, B: Sync + Send,

§

impl<B, S> Unpin for LinuxWritableEngine<B, S>

§

impl<B, S> !UnwindSafe for LinuxWritableEngine<B, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,