class VerifiedVolumeClient
Defined at line 22 of file ../../src/devices/block/drivers/block-verity/verified-volume-client.h
`VerifiedVolumeClient` is a client library to ease interacting with
`fuchsia.hardware.block.verified` devices and their children.
Public Methods
void VerifiedVolumeClient (const VerifiedVolumeClient & )
Disallow copy, assign, and move
Defined at line 29 of file ../../src/devices/block/drivers/block-verity/verified-volume-client.h
VerifiedVolumeClient & operator= (const VerifiedVolumeClient & )
Defined at line 30 of file ../../src/devices/block/drivers/block-verity/verified-volume-client.h
void VerifiedVolumeClient (VerifiedVolumeClient && )
Defined at line 31 of file ../../src/devices/block/drivers/block-verity/verified-volume-client.h
VerifiedVolumeClient & operator= (VerifiedVolumeClient && )
Defined at line 32 of file ../../src/devices/block/drivers/block-verity/verified-volume-client.h
void VerifiedVolumeClient (fidl::ClientEnd<fuchsia_hardware_block_verified::DeviceManager> verity_chan, fidl::ClientEnd<fuchsia_device::Controller> verity_controller, fbl::unique_fd devfs_root_fd)
Defined at line 60 of file ../../src/devices/block/drivers/block-verity/verified-volume-client.cc
zx::result<std::unique_ptr<VerifiedVolumeClient>> CreateFromBlockDevice (fidl::UnownedClientEnd<fuchsia_device::Controller> device, fbl::unique_fd devfs_root_fd, Disposition disposition, const zx::duration & timeout)
Given a borrowed fd to a block device (`block_dev_fd`) and an owned fd for
the the devfs root (`devfs_root_fd`), prepare a `VerifiedVolumeClient` by
possibly binding the driver according to `disposition` and waiting up to
`timeout` for the `verity` child of `block_dev_fd` to appear.
Defined at line 67 of file ../../src/devices/block/drivers/block-verity/verified-volume-client.cc
zx::result<fidl::ClientEnd<fuchsia_storage_block::Block>> OpenForAuthoring (const zx::duration & timeout)
Requests that the volume be opened for authoring. If successful,
a client connection to the mutable block device will be returned.
Defined at line 110 of file ../../src/devices/block/drivers/block-verity/verified-volume-client.cc
zx_status_t Close ()
Requests that any child device (mutable or verified) created by
`OpenForAuthoring` or `OpenForVerifiedRead` be unbound.
Defined at line 162 of file ../../src/devices/block/drivers/block-verity/verified-volume-client.cc
zx_status_t CloseAndGenerateSeal (fidl::AnyArena & arena, fuchsia_hardware_block_verified::wire::DeviceManagerCloseAndGenerateSealResponse * out)
Requests that the volume unbind the `mutable` child, regenerated integrity
data, update the superblock, and return a seal for future use with
`OpenForVerifiedRead`. If successful, the result of the seal operation is
allocated in a caller-owned `arena` and returned via `out`, so the caller
can persist it somewhere.
Defined at line 175 of file ../../src/devices/block/drivers/block-verity/verified-volume-client.cc
zx::result<fidl::ClientEnd<fuchsia_storage_block::Block>> OpenForVerifiedRead (const digest::Digest & expected_seal, const zx::duration & timeout)
Requests that the volume be opened for verified reads, with the expectation
that the volume superblock matches the seal provided. If successful,
`verified_block_fd_out` will contain a handle to the verified block device.
Defined at line 194 of file ../../src/devices/block/drivers/block-verity/verified-volume-client.cc
Enumerations
enum Disposition
| Name | Value |
|---|---|
| kDriverAlreadyBound | 0 |
| kDriverNeedsBinding | 1 |
Defined at line 34 of file ../../src/devices/block/drivers/block-verity/verified-volume-client.h