Namespaces
Enumerations
enum FvmImplementation
| Name | Value |
|---|---|
| kDriver | 0 |
| kComponent | 1 |
Defined at line 23 of file ../../src/storage/fvm/fvm_test_instance.h
enum SparseFlags
| Name | Value |
|---|---|
| kSparseFlagLz4 | 0x1 |
| kSparseFlagZxcrypt | 0x2 |
| kSparseFlagCorrupted | 0x4 |
| kSparseFlagZeroFillNotRequired | 0x8 |
| kDeprecated0 | 0x10 |
| kSparseFlagAllValid | kSparseFlagLz4 | kSparseFlagZxcrypt | kSparseFlagCorrupted | kSparseFlagZeroFillNotRequired | kDeprecated0 |
Defined at line 49 of file ../../src/storage/fvm/fvm_sparse.h
enum SuperblockType
| Name | Value |
|---|---|
| kPrimary | 0 |
| kSecondary | 1 |
Defines the type of superblocks of an FVM. The key difference is how the offset from the
beginning is calculated. They both share the same format.
Defined at line 151 of file ../../src/storage/fvm/format.h
Records
-
class AllocatePartitionRequest -
class BlockConnector -
class BlockDeviceAdapter -
class Checker -
class ComponentBlockConnector -
class ComponentFvmInstance -
class CopyMetadata_CopyAllocationTableWithEnoughPadding_Class -
class CopyMetadata_CopyAllocationTableWithoutEnoughPadding_Class -
class CopyMetadata_CopyFullAllocationTable_Class -
class CopyMetadata_CopyFullPartitionTable_Class -
class CopyMetadata_EmptyMetadataBiggerDimensions_Class -
class CopyMetadata_EmptyMetadataSameDimensions_Class -
class CopyMetadata_MetadataWithZeroSlicesToBiggerDimensions_Class -
class CopyMetadata_MetadataWithZeroSlicesToSameDimensions_Class -
class CopyMetadata_NonemptyMetadataBiggerDimensions_Class -
class CopyMetadata_NonemptyMetadataSameDimensions_Class -
class CopyMetadata_SmallerDimensionsFails_Class -
class CreateMetadata_HeaderHasBadMagicFails_Class -
class CreateMetadata_HeaderHasBadVersionFails_Class -
class CreateMetadata_HeaderHasZeroSizedSlicesFails_Class -
class CreateMetadata_HeaderSliceTableCapacityTooSmallFails_Class -
class CreateMetadata_NoPartitionsAndSlices_Class -
class CreateMetadata_OnePartitionNoSlicesOverloadCheck_Class -
class CreateMetadata_OnePartitionNoSlices_Class -
class CreateMetadata_SeveralPartitionsAndSlices_Class -
class CreateMetadata_ZeroSizedSliceTable_Class -
class DeviceRef -
class Diagnostics -
class DriverBlockConnector -
class DriverFvmInstance -
class ExtentDescriptor -
class FakeBlockDevice -
class FvmAdapter -
class FvmFormat_DefaultInitializedGetterValues_Class -
class FvmFormat_Getters_Class -
class FvmFormat_HasValidTableSizes_Class -
class FvmFormat_IsValid_Class -
class FvmFormat_SizeConstructors_Class -
class FvmFormat_SliceConstructors_Class -
class FvmInstance -
class Guid -
class Header -
class HeapMetadataBuffer -
class Metadata -
class MetadataBuffer -
class MoveMetadata_EmptyInstance_Class -
class MoveMetadata_NonemptyInstance_Class -
class MultiTransactionState -
class PartitionDescriptor -
class RamdiskRef -
class ReaderInterface -
class SliceEntry -
class SliceEntry_ToString_Class -
class SliceExtent -
class SparseImage -
class SparseReader -
class TypeWAVLTraits -
class VPartition -
class VPartitionAdapter -
class VPartitionEntry -
class VPartitionEntry_Constructor_Class -
class VPartitionEntry_DefaultConstructor_Class -
class VPartitionEntry_StringFromArray_Class -
class VPartitionEntry_ToString_Class -
class VPartitionManager -
class VPartitionManagerTestAtNextRevision_UpdateOldestRevision_Class -
class VPartitionManagerTestAtPreviousRevision_DontUpdateOldestRevision_Class -
class VPartitionManagerTestAtRevision -
class VPartitionManagerTest_InspectVmoPopulatedWithInitialState_Class -
class VPartitionManagerTest_InspectVmoTracksPartitionLimit_Class -
class VPartitionManagerTest_InspectVmoTracksSliceAllocations_Class -
class VPartitionManagerTest_QueueTrimConsecutiveSlices_Class -
class VPartitionManagerTest_QueueTrimDisjointSlices_Class -
class VPartitionManagerTest_QueueTrimOneSlice_Class -
class VPartitionManager_TrivialLifetime_Class -
class VmoMetadataBuffer -
class VpmIoCookie
Functions
-
void UpdateHash (void * metadata, size_t metadata_size)Update's the metadata's hash field to accurately reflect the contents of metadata.
Defined at line 67 of file ../../src/storage/fvm/fvm.cc
-
zx_status_t ResetAllSlices (block_client::BlockDevice * device)Walks through all slices on the partition backed by |device|, attempting to
free everything except for the first slice.
Defined at line 19 of file ../../src/storage/fvm/client.cc
-
SliceEntry CreateSliceEntry (uint16_t vpart)Defined at line 21 of file ../../src/storage/fvm/metadata_test.cc
-
VPartitionEntry CreatePartitionEntry (size_t slices)Defined at line 28 of file ../../src/storage/fvm/metadata_test.cc
-
std::unique_ptr<FvmInstance> CreateFvmInstance (FvmImplementation impl)Defined at line 397 of file ../../src/storage/fvm/fvm_test_instance.cc
-
std::ostream & operator<< (std::ostream & out, const Header & header)Outputs a compact, single-line description of the header (useful for syslog). See
Header.ToString() for a more verbose multiline version.
Defined at line 247 of file ../../src/storage/fvm/format.cc
-
std::ostream & operator<< (std::ostream & out, const VPartitionEntry & entry)Outputs a single-line description of the partition entry.
Defined at line 302 of file ../../src/storage/fvm/format.cc
-
std::ostream & operator<< (std::ostream & out, const SliceEntry & entry)Outputs a single-line description of the partition entry.
Defined at line 339 of file ../../src/storage/fvm/format.cc
-
size_t PartitionTableByteSizeForUsablePartitionCount (size_t usable_partitions)Due to the way partitions are counted, the usable partitions (the input to this function) is one
smaller than the number table entries because the 0th entry is not used. This function may
generate a larger-than-needed partition table to ensure it's block-aligned.
TODO(https://fxbug.dev/42138108) Remove the unused 0th entry so we can actually use the full
number passed in.
Defined at line 477 of file ../../src/storage/fvm/format.h
-
size_t AllocTableByteSizeForUsableSliceCount (size_t slice_count)Defined at line 483 of file ../../src/storage/fvm/format.h
-
size_t BlocksToSlices (size_t slice_size, size_t block_size, size_t block_count)Defined at line 491 of file ../../src/storage/fvm/format.h
-
size_t SlicesToBlocks (size_t slice_size, size_t block_size, size_t slice_count)Defined at line 500 of file ../../src/storage/fvm/format.h
-
bool ValidateHeader (const void * metadata, size_t metadata_size)Validate the FVM header.
TODO(jfsulliv): Remove this once all uses are ported to Metadata.
-
void ValidateMetadata (Metadata & metadata, const std::vector<VPartitionEntry> & expected_partitions, const std::vector<SliceEntry> & expected_slices)Defined at line 47 of file ../../src/storage/fvm/metadata_test.cc
-
std::optional<SuperblockType> PickValidHeader (const void * primary_metadata, const void * secondary_metadata, size_t metadata_size)Validate the FVM header information, and identify which copy of metadata (primary or backup)
should be used for initial reading, if either.
The two copies of the metadata block from the beginning of the device is passed in, along with
their length (they should be the same size). These blocks should include both primary and
secondary copies of the metadata.
The disk_size and disk_block_size are passed in to sanity check that the header values are
compatible with the current underlying device. See fvm::Header::IsValid() for more. The variant
that omits these does not validate the header matches these values.
On success, the superblock type which is valid is returned. If both copies are invalid, a null
optional is returned.
TODO(jfsulliv): Stop exposing this as a separate function once all code uses the Metadata class.
Defined at line 75 of file ../../src/storage/fvm/fvm.cc
-
void CheckMetadataContainSameEntries (const Metadata & a, const Metadata & b)Defined at line 76 of file ../../src/storage/fvm/metadata_test.cc
-
std::optional<SuperblockType> PickValidHeader (uint64_t disk_size, uint64_t disk_block_size, const void * primary_metadata, const void * secondary_metadata, size_t metadata_size)Defined at line 82 of file ../../src/storage/fvm/fvm.cc
-
fbl::Array<uint8_t> MakeRandomBuffer (size_t size, unsigned int * seed)Returns an array with random contents.
Defined at line 425 of file ../../src/storage/fvm/test_support.cc
-
bool IsConsistentAfterGrowth (const VolumeManagerInfo & beforeconst VolumeManagerInfo & after)Returns true if the invariants of the fvm volumes are the same (same slize_size, same allocated
count).
Defined at line 435 of file ../../src/storage/fvm/test_support.cc
Variables
zx_driver_ops_t driver_ops
Defined at line 948 of file ../../src/storage/fvm/driver/vpartition_manager.cc