class PendingAllocationData

Defined at line 21 of file ../../src/storage/minfs/vnode_allocation.h

PendingAllocationData stores information about data blocks which are yet to be allocated.

This includes the relative index of each block to be processed, corresponding

reservations, and (in the future) additional information about modifications to the inode's size

and block count.

Public Methods

void Reset (blk_t size)

Clears out all allocation/reservation data.

Defined at line 9 of file ../../src/storage/minfs/vnode_allocation.cc

zx_status_t GetNextRange (blk_t * start, blk_t * count)

Returns the |start| and |count| of the first range in the block_map_.

Defined at line 15 of file ../../src/storage/minfs/vnode_allocation.cc

void PendingAllocationData ()

Defined at line 24 of file ../../src/storage/minfs/vnode_allocation.h

void ~PendingAllocationData ()

Defined at line 25 of file ../../src/storage/minfs/vnode_allocation.h

void SetPending (blk_t block_num, bool allocated)

Sets |block_num| in the block_map_. |allocated| indicates whether the block at |block_num|

was previously allocated.

Defined at line 27 of file ../../src/storage/minfs/vnode_allocation.cc

bool IsEmpty ()

Returns true if no blocks are marked for allocation.

Defined at line 34 of file ../../src/storage/minfs/vnode_allocation.h

bool ClearPending (blk_t block_num, bool allocated)

Clears |block_num| from the block_map_. |allocated| indicates whether the block at

|block_num| was previously allocated. Returns true if the block_num was cleared from the map

(i.e., it was set in the map initially).

Defined at line 35 of file ../../src/storage/minfs/vnode_allocation.cc

bool IsPending (blk_t block_num)

Returns true if |block_num| is marked in the block_map_.

Defined at line 37 of file ../../src/storage/minfs/vnode_allocation.h

blk_t GetNewPending ()

Returns the count of pending blocks which are not already allocated.

Defined at line 49 of file ../../src/storage/minfs/vnode_allocation.h

blk_t GetTotalPending ()

Returns the total number of pending blocks.

Defined at line 52 of file ../../src/storage/minfs/vnode_allocation.h

blk_t GetNodeSize ()

Defined at line 54 of file ../../src/storage/minfs/vnode_allocation.h

void SetNodeSize (blk_t size)

Defined at line 56 of file ../../src/storage/minfs/vnode_allocation.h

const_iterator cbegin ()

Iterate over the ranges in the bitmap. Modifying the list while

iterating over it may yield undefined results.

Defined at line 60 of file ../../src/storage/minfs/vnode_allocation.h

const_iterator cend ()

Defined at line 61 of file ../../src/storage/minfs/vnode_allocation.h