class BlobTransaction
Defined at line 26 of file ../../src/storage/blobfs/transaction.h
Not all combinations are supported. Data operations are not supported with either trim or
reserved extents (and there is no requirement to do so).
Public Methods
void Commit (fs::Journal & journal, fpromise::promise<void, zx_status_t> data, fit::callback<void ()> callback)
Commits this transaction to the journal. |data| is an optional promise that is responsible for
writing data associated with metadata that is part of the transaction. |callback| will be
called if and when the transaction commits successfully. This is not necessarily the point at
which the change is guaranteed to be visible in the event of power-failure, but it is the point
at which it is safe to, say, use blocks referenced by this transaction for something else. For
example, after the callback, it would be safe to use blocks referenced by any trim operations
within the transaction. In the event of failure, the callback will not get called, but it will
get freed, so avoid any manual memory management within the callback (i.e. avoid "delete x";
use a captured std::unique_ptr instead).
Defined at line 20 of file ../../src/storage/blobfs/transaction.cc
void BlobTransaction ()
Defined at line 28 of file ../../src/storage/blobfs/transaction.h
void BlobTransaction (BlobTransaction & )
Defined at line 29 of file ../../src/storage/blobfs/transaction.h
BlobTransaction & operator= (BlobTransaction & )
Defined at line 30 of file ../../src/storage/blobfs/transaction.h
void AddOperation (storage::UnbufferedOperation operation)
Defined at line 32 of file ../../src/storage/blobfs/transaction.h
void AddTrimOperation (storage::BufferedOperation operation)
Defined at line 36 of file ../../src/storage/blobfs/transaction.h
void AddReservedExtent (ReservedExtent extent)
When freeing extents, we need to reserve them until after the trim operations have completed.
Defined at line 41 of file ../../src/storage/blobfs/transaction.h