class Client

Defined at line 33 of file ../../src/storage/lib/block_client/cpp/client.h

Provides a simple synchronous wrapper for talking to a block device over a FIFO.

Block devices can support several (MAX_TXN_GROUP_COUNT) requests in-flight at once and this class

is threadsafe to support this many requests from different threads in parallel. Exceeding

MAX_TXN_GROUP_COUNT parallel transactions will block future requests until a transaction group

becomes available.

When the Client is destroyed, its session will be synchronously closed.

Public Methods

void Client (fidl::ClientEnd<fuchsia_storage_block::Session> session, zx::fifo fifo)

Defined at line 20 of file ../../src/storage/lib/block_client/cpp/client.cc

void ~Client ()

Defined at line 23 of file ../../src/storage/lib/block_client/cpp/client.cc

zx_status_t BlockAttachVmo (const zx::vmo & vmo, storage::Vmoid * out)

Defined at line 25 of file ../../src/storage/lib/block_client/cpp/client.cc

zx_status_t BlockDetachVmo (storage::Vmoid vmoid)

Defined at line 42 of file ../../src/storage/lib/block_client/cpp/client.cc

zx::result<storage::OwnedVmoid> RegisterVmo (const zx::vmo & vmo)

Defined at line 52 of file ../../src/storage/lib/block_client/cpp/client.cc

zx_status_t Transaction (BlockFifoRequest * requests, size_t count)

Issues a group of block requests over the underlying fifo, and waits for a response.

Defined at line 60 of file ../../src/storage/lib/block_client/cpp/client.cc