class TransactionHandler

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

TransactionHandler defines the interface that must be fulfilled for an entity to issue

transactions to the underlying device.

Public Methods

uint64_t BlockNumberToDevice (uint64_t block_num)

Translates a filesystem-level block number to a block-device-level block number.

zx_status_t RunOperation (const storage::Operation & operation, storage::BlockBuffer * buffer)

A convenience method for running a single operation. |buffer| provides access to the memory

buffer that is referenced by |operation|. The values inside |operation| are expected to be

filesystem-level block numbers. This method blocks until the operation completes, so it is

suitable for host-based reads and writes and for simple Fuchsia-based reads. Regular Fuchsia IO

is expected to be issued using the RunRequests method. A default implementation is provided.

Defined at line 14 of file ../../src/storage/lib/vfs/cpp/transaction/transaction_handler.cc

zx_status_t RunRequests (const std::vector<storage::BufferedOperation> & operations)

Runs the provided operations against the backing block device. The values inside |operations|

are expected to be filesystem-level block numbers. This method blocks until the operation

completes, but the implementation for Fuchsia forwards the requests to the underlying

BlockDevice so it is expected that this interface will be upgraded to be fully asynchronous at

some point. The caller should use a BufferedOperationsBuilder to construct the request.

void ~TransactionHandler ()

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

zx_status_t Flush ()

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