pub struct FxFilesystem { /* private fields */ }Implementations§
Source§impl FxFilesystem
impl FxFilesystem
pub async fn new_empty(device: DeviceHolder) -> Result<OpenFxFilesystem, Error>
pub async fn open(device: DeviceHolder) -> Result<OpenFxFilesystem, Error>
pub fn root_parent_store(&self) -> Arc<ObjectStore> ⓘ
pub fn layer_pager(&self) -> Option<&Arc<dyn LayerPager>>
pub async fn close(&self) -> Result<(), Error>
pub fn device(&self) -> Arc<dyn Device> ⓘ
pub fn root_store(&self) -> Arc<ObjectStore> ⓘ
pub fn allocator(&self) -> Arc<Allocator> ⓘ
Sourcepub fn enable_allocations(&self)
pub fn enable_allocations(&self)
Enables allocations for the allocator. This is only used in image_builder_mode where it must be called before any allocations can take place.
pub fn object_manager(&self) -> &Arc<ObjectManager> ⓘ
pub fn journal(&self) -> &Arc<Journal> ⓘ
pub async fn sync(&self, options: SyncOptions<'_>) -> Result<(), Error>
pub fn block_size(&self) -> BlockSize
pub fn get_info(&self) -> Info
pub fn super_block_header(&self) -> SuperBlockHeader
pub fn graveyard(&self) -> &Arc<Graveyard> ⓘ
pub fn trace(&self) -> bool
pub fn options(&self) -> &Options
pub fn scope(&self) -> &Scope
Sourcepub async fn lock_commits(&self) -> MutexGuard<'_, ()>
pub async fn lock_commits(&self) -> MutexGuard<'_, ()>
Returns a guard that must be taken before any transaction can commence. This guard takes a
shared lock on the filesystem. fsck will take an exclusive lock so that it can get a
consistent picture of the filesystem that it can verify. It is important that this lock is
acquired before all other locks. It is also important that this lock is not taken twice
by the same task since that can lead to deadlocks if another task tries to take a write
lock.
pub async fn commit_transaction<R: Send>( &self, transaction: &mut Transaction<'_>, callback: impl FnOnce(u64) -> R + Send, ) -> Result<R, Error>
pub fn lock_manager(&self) -> &LockManager
pub fn hooks(&self) -> &Arc<HooksHandle> ⓘ
pub async fn truncate_guard( &self, store_id: u64, object_id: u64, ) -> TruncateGuard<'_>
pub async fn truncate_guard_owned( self: &Arc<Self>, store_id: u64, object_id: u64, ) -> TruncateGuard<'static>
Sourcepub async fn tombstone_object(
&self,
store_id: u64,
object_id: u64,
truncate_guard: Option<&TruncateGuard<'_>>,
) -> Result<(), Error>
pub async fn tombstone_object( &self, store_id: u64, object_id: u64, truncate_guard: Option<&TruncateGuard<'_>>, ) -> Result<(), Error>
Immediately tombstones (purges) an object in the graveyard, deallocating its extents,
removing its graveyard entry, and inserting an LSM-tree tombstone record
(ObjectValue::None) that deletes all remaining records for the object during compaction.
Use this when space should be reclaimed immediately (e.g. when deleting a volume or
unlinking a file with no open references) or when the background graveyard reaper is not
running. Use Graveyard::queue_tombstone_object instead when tombstoning from a
non-async context (such as Drop) or when work can be deferred to the background (such as
initial mount-time reaping).
Sourcepub async fn tombstone_attribute(
&self,
store_id: u64,
object_id: u64,
attribute_id: AttributeId,
) -> Result<(), Error>
pub async fn tombstone_attribute( &self, store_id: u64, object_id: u64, attribute_id: AttributeId, ) -> Result<(), Error>
Immediately tombstones (purges) an attribute in the graveyard, deallocating its extents,
removing its graveyard entry, and inserting an LSM-tree tombstone record
(ObjectValue::None) that deletes the attribute record during compaction.
See FxFilesystem::tombstone_object for when to use this vs.
Graveyard::queue_tombstone_attribute.
Auto Trait Implementations§
impl !Freeze for FxFilesystem
impl !RefUnwindSafe for FxFilesystem
impl !UnwindSafe for FxFilesystem
impl Send for FxFilesystem
impl Sync for FxFilesystem
impl Unpin for FxFilesystem
impl UnsafeUnpin for FxFilesystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more