class ExtentReserver
Defined at line 27 of file ../../src/storage/blobfs/allocator/extent_reserver.h
Allows extents to be reserved and unreserved. The purpose of reservation is to allow allocation
of extents to occur without yet allocating structures which could be written out to durable
storage.
These extents may be observed by derived classes of ExtentReserver
Public Methods
ReservedExtent Reserve (const Extent & extent)
Defined at line 106 of file ../../src/storage/blobfs/allocator/extent_reserver.h
void Unreserve (const Extent & extent)
Unreserves space for blocks in memory. Does not update disk.
Defined at line 30 of file ../../src/storage/blobfs/allocator/extent_reserver.cc
uint64_t ReservedBlockCount ()
Returns the total number of reserved blocks.
Defined at line 41 of file ../../src/storage/blobfs/allocator/extent_reserver.cc
Protected Methods
std::mutex & mutex ()
Defined at line 38 of file ../../src/storage/blobfs/allocator/extent_reserver.h
ReservedExtent ReserveLocked (const Extent & extent)
Reserves space for blocks in memory. Does not update disk.
|extent.Length()| must be > 0.
Defined at line 20 of file ../../src/storage/blobfs/allocator/extent_reserver.cc
bitmap::RleBitmap::const_iterator ReservedBlocksCbegin ()
Returns an iterator to the underlying reserved blocks.
This iterator becomes invalid on the next call to either |ReserveExtent| or |UnreserveExtent|.
Defined at line 48 of file ../../src/storage/blobfs/allocator/extent_reserver.h
bitmap::RleBitmap::const_iterator ReservedBlocksCend ()
Defined at line 52 of file ../../src/storage/blobfs/allocator/extent_reserver.h