Namespaces

Enumerations

enum ReservedVmoid
Name Value
kInfoVmoid 0
kJournalVmoid 1
kWritebackVmoid 2
kDataVmoid 3
kMaxReserved 4

Defined at line 29 of file ../../src/storage/lib/vfs/cpp/journal/fuzzer_utils.h

enum CreationType
Name Value
kFile 0
kDirectory 1
kMaxValue kDirectory

Specifies the type of object when creating new nodes.

Defined at line 38 of file ../../src/storage/lib/vfs/cpp/vfs_types.h

enum JournalObjectType
Name Value
kUnknown 0
kHeader 1
kCommit 2
kRevocation 3

Defined at line 43 of file ../../src/storage/lib/vfs/cpp/journal/format.h

enum VnodeProtocol
Name Value
kNode 0
kService uint64_t{fuchsia_io::NodeProtocolKinds::kConnector}
kDirectory uint64_t{fuchsia_io::NodeProtocolKinds::kDirectory}
kFile uint64_t{fuchsia_io::NodeProtocolKinds::kFile}
kSymlink uint64_t{fuchsia_io::NodeProtocolKinds::kSymlink}

Identifies a single type of node protocol where required for protocol negotiation/resolution.

Defined at line 46 of file ../../src/storage/lib/vfs/cpp/vfs_types.h

enum CreationMode
Name Value
kNever 0
kAllowExisting 1
kAlways 2

Indicates if and when a new object should be created when opening a node.

Defined at line 216 of file ../../src/storage/lib/vfs/cpp/vfs_types.h

Records

Functions

  • void * GetBlock (uint64_t block_size, const void * data, uint64_t blkno)

    Access the "blkno"-th block within data.

    "blkno = 0" corresponds to the first block within data.

    Defined at line 22 of file ../../src/storage/lib/vfs/cpp/transaction/transaction_handler.h

  • zx_status_t MakeJournal (uint64_t journal_blocks, const WriteBlocksFn & WriteBlocks)

    Makes a journal that fits in |journal_blocks| by writing journal metadata using user supplied

    write function, |WriteBlocks|. MakeJournal is called from host and from target while creating

    different FSes. There isn't a common writer trait among the users to write to the backing data

    store. WriteBlockFn is a work-around until then.

    Defined at line 34 of file ../../src/storage/lib/vfs/cpp/journal/initializer.cc

  • bool IsValidName (std::string_view name)

    Defined at line 57 of file ../../src/storage/lib/vfs/cpp/vnode.h

  • zx_status_t ParseJournalEntries (const JournalSuperblock * info, storage::VmoBuffer * journal_buffer, std::vector<storage::BufferedOperation> * operations, uint64_t * out_sequence_number, uint64_t * out_start)

    Parses all entries within the journal, and returns the operations which must be replayed to

    return the filesystem to a consistent state. Additionally returns the sequence number which

    should be used to update the info block once replay has completed successfully.

    This function is invoked by |ReplayJournal|. Refer to that function for the common case of

    replaying a journal on boot.

    Defined at line 123 of file ../../src/storage/lib/vfs/cpp/journal/replay.cc

  • zx::result<JournalSuperblock> ReplayJournal (fs::TransactionHandler * transaction_handler, storage::VmoidRegistry * registry, uint64_t journal_start, uint64_t journal_length, uint32_t block_size)

    Replays the entries in the journal, first parsing them, and later writing them out to disk.

    |journal_start| is the start of the journal area (includes info block).

    |journal_length| is the length of the journal area (includes info block).

    Returns the new |JournalSuperblock|, with an updated sequence number which should be used on

    journal initialization.

    Defined at line 174 of file ../../src/storage/lib/vfs/cpp/journal/replay.cc

  • fuchsia_io::OpenFlags RightsToOpenFlags (fuchsia_io::Rights rights)

    Defined at line 132 of file ../../src/storage/lib/vfs/cpp/vfs_types.cc

  • zx_status_t OpenVnode (fbl::RefPtr<Vnode> * vnode)

    Opens a vnode by reference.

    The |vnode| reference is updated in-place if redirection occurs.

    Defined at line 349 of file ../../src/storage/lib/vfs/cpp/vnode.h