Module object_store

Source

Re-exports§

pub use directory::Directory;
pub use object_record::ChildValue;
pub use object_record::ObjectDescriptor;
pub use object_record::PosixAttributes;
pub use object_record::Timestamp;
pub use object_record::AttributeKey;
pub use object_record::EncryptionKeys;
pub use object_record::ExtendedAttributeValue;
pub use object_record::FsverityMetadata;
pub use object_record::ObjectAttributes;
pub use object_record::ObjectKey;
pub use object_record::ObjectKeyData;
pub use object_record::ObjectKind;
pub use object_record::ObjectValue;
pub use object_record::ProjectProperty;
pub use object_record::RootDigest;
pub use transaction::Mutation;

Modules§

allocator
The Allocator
caching_object_handle
directory
graveyard
journal
The journal is implemented as an ever extending file which contains variable length records that describe mutations to be applied to various objects. The journal file consists of blocks, with a checksum at the end of each block, but otherwise it can be considered a continuous stream.
object_manager
object_record
project_id
transaction
volume

Structs§

DataObjectHandle
DataObjectHandle is a typed handle for file-like objects that store data in the default data attribute. In addition to traditional files, this means things like the journal, superblocks, and layer files.
DirectWriter
Like object_handle::Writer, but allows custom transaction options to be set, and makes every write go directly to the handle in a transaction.
EncryptedMutationsV40
FsverityStateInner
HandleOptions
NewChildStoreOptions
ObjectStore
An object store supports a file like interface for objects. Objects are keyed by a 64 bit identifier. And object store has to be backed by a parent object store (which stores metadata for the object store). The top-level object store (a.k.a. the root parent object store) is in-memory only.
StoreInfoV32
StoreInfoV36
StoreInfoV40
StoreObjectHandle
StoreObjectHandle is the lowest-level, untyped handle to an object with the id [object_id] in a particular store, [owner]. It provides functionality shared across all objects, such as reading and writing attributes and managing encryption keys.

Enums§

FsverityState
LockState
RangeType
Whether this particular logical file range is in overwrite or CoW mode. Overwrite mode ranges have overwrite extents already allocated, and should use multi_overwrite. CoW mode ranges should use multi_write, and might or might not have extents in the region already.
SetExtendedAttributeMode
The mode of operation when setting extended attributes. This is the same as the fidl definition but is replicated here so we don’t have fuchsia.io structures in the api, so this can be used on host.
TombstoneMode
Sets the mode for tombstoning (either at the object or attribute level).
TrimMode
Argument to the trim_some method.
TrimResult
Result of the trim_some method.

Constants§

BLOB_MERKLE_ATTRIBUTE_ID
For Blobs in Fxfs, we store the merkle tree at a well-known attribute. TODO(https://fxbug.dev/42073113): Is this the best place to store the merkle tree? What about inline with data?
DEFAULT_DATA_ATTRIBUTE_ID
The common case for extents which cover the data payload of some object.
EXTENDED_ATTRIBUTE_RANGE_END
EXTENDED_ATTRIBUTE_RANGE_START
The range of fxfs attribute ids which are reserved for extended attribute values. Whenever a new attribute is needed, the first unused id will be chosen from this range. It’s technically safe to change these values, but it has potential consequences - they are only used during id selection, so any existing extended attributes keep their ids, which means any past or present selected range here could potentially have used attributes unless they are explicitly migrated, which isn’t currently done.
FSCRYPT_KEY_ID
FSVERITY_MERKLE_ATTRIBUTE_ID
For fsverity files in Fxfs, we store the merkle tree of the verified file at a well-known attribute.
MAX_ENCRYPTED_MUTATIONS_SIZE
MAX_STORE_INFO_SERIALIZED_SIZE
NO_OWNER
A constant that can be used where an owner is expected of type Weak<dyn StoreOwner> but no owner is required.
VOLUME_DATA_KEY_ID

Traits§

HandleOwner
DataObjectHandle stores an owner that must implement this trait, which allows the handle to get back to an ObjectStore.
StoreOwner

Functions§

load_store_info
Loads store info.

Type Aliases§

EncryptedMutations
ExtentKey
ExtentKey is a child of ObjectKey for Object attributes that have attached extents (at time of writing this was only the used for file contents).
ExtentMode
The mode the extent is operating in. This changes how writes work to this region of the file.
ExtentValue
ExtentValue is the payload for an extent in the object store, which describes where the extent is physically located.
StoreInfo
StoreInfo stores information about the object store. This is stored within the parent object store, and is used, for example, to get the persistent layer objects.