pub trait LinuxWritebackStore: Send + Sync {
// Required methods
fn activate_mount<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 CloudScope,
session_generation: SessionGeneration,
) -> Pin<Box<dyn Future<Output = StoreResult<Vec<LocalContentSnapshot>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn open_recovered<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 CloudItemKey,
session_generation: SessionGeneration,
) -> Pin<Box<dyn Future<Output = StoreResult<Option<LinuxWriteSession>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn open_existing<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 LinuxWriteOpenRequest,
base_content: Bytes,
) -> Pin<Box<dyn Future<Output = StoreResult<LinuxWriteSession>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 LinuxWriteSessionId,
offset: u64,
size: u32,
) -> Pin<Box<dyn Future<Output = StoreResult<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn write<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 LinuxWriteSessionId,
offset: u64,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = StoreResult<LinuxWriteCommit>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn truncate<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 LinuxWriteSessionId,
size: u64,
) -> Pin<Box<dyn Future<Output = StoreResult<LinuxWriteCommit>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn sync<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 LinuxWriteSessionId,
data_only: bool,
) -> Pin<Box<dyn Future<Output = StoreResult<Option<LinuxWriteCommit>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn close<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 LinuxWriteSessionId,
) -> Pin<Box<dyn Future<Output = StoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Product-owned durable local-content implementation used by writable FUSE handles.
A successful mutating method must make both the bytes and returned immutable generation
recoverable before it returns. When remote upload is enabled, the product store should also
atomically persist a core ContentUploadIntent for that exact snapshot before acknowledging the
native write. The implementation may compose a filesystem cache, ContentStorageStore,
ContentUploadStore, and MutationJournalStore; the Linux adapter does not allocate operation
identities, select upload transport, or choose those product persistence details.
Required Methods§
Sourcefn activate_mount<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 CloudScope,
session_generation: SessionGeneration,
) -> Pin<Box<dyn Future<Output = StoreResult<Vec<LocalContentSnapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn activate_mount<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 CloudScope,
session_generation: SessionGeneration,
) -> Pin<Box<dyn Future<Output = StoreResult<Vec<LocalContentSnapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Activates one mount generation and returns durable dirty snapshots for this scope.
Before this method returns, the implementation must fence lower mount generations from
mutating active writeback state. Products commonly compose this boundary with core’s
MutationJournalStore::activate_session and their content-storage transaction.
Sourcefn open_recovered<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 CloudItemKey,
session_generation: SessionGeneration,
) -> Pin<Box<dyn Future<Output = StoreResult<Option<LinuxWriteSession>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn open_recovered<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 CloudItemKey,
session_generation: SessionGeneration,
) -> Pin<Box<dyn Future<Output = StoreResult<Option<LinuxWriteSession>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reopens durable staged bytes for one dirty item without fetching its remote base content.
None means the item has no active dirty snapshot for the requested mount generation.
A returned session must be bound to session_generation and carry that snapshot through
LinuxWriteSession::snapshot.
Sourcefn open_existing<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 LinuxWriteOpenRequest,
base_content: Bytes,
) -> Pin<Box<dyn Future<Output = StoreResult<LinuxWriteSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn open_existing<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 LinuxWriteOpenRequest,
base_content: Bytes,
) -> Pin<Box<dyn Future<Output = StoreResult<LinuxWriteSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Installs or reopens staging from an exact complete remote revision.
Sourcefn read<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 LinuxWriteSessionId,
offset: u64,
size: u32,
) -> Pin<Box<dyn Future<Output = StoreResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 LinuxWriteSessionId,
offset: u64,
size: u32,
) -> Pin<Box<dyn Future<Output = StoreResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reads current staged bytes, including all earlier committed writes on this session.
Sourcefn write<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 LinuxWriteSessionId,
offset: u64,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = StoreResult<LinuxWriteCommit>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 LinuxWriteSessionId,
offset: u64,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = StoreResult<LinuxWriteCommit>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Durably applies one positioned write and returns its immutable dirty generation.
Sourcefn truncate<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 LinuxWriteSessionId,
size: u64,
) -> Pin<Box<dyn Future<Output = StoreResult<LinuxWriteCommit>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn truncate<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 LinuxWriteSessionId,
size: u64,
) -> Pin<Box<dyn Future<Output = StoreResult<LinuxWriteCommit>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Durably changes the logical file size and returns its immutable dirty generation.
Sourcefn sync<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 LinuxWriteSessionId,
data_only: bool,
) -> Pin<Box<dyn Future<Output = StoreResult<Option<LinuxWriteCommit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sync<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 LinuxWriteSessionId,
data_only: bool,
) -> Pin<Box<dyn Future<Output = StoreResult<Option<LinuxWriteCommit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Confirms that the latest dirty generation satisfies a flush or fsync durability boundary.
Sourcefn close<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 LinuxWriteSessionId,
) -> Pin<Box<dyn Future<Output = StoreResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn close<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 LinuxWriteSessionId,
) -> Pin<Box<dyn Future<Output = StoreResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Releases product-owned mutable session state after all FUSE references are gone.