Closed SaintNerevar closed 1 year ago
According to the existing design,
This should be changed such that whenever block type needs to be updated, it should be updated in both block header and Block Allocation Map. setHeader and setBlockType needs to be changed accordingly.
Solutions possible:
A block once allocated should not be allowed to change it's type. It should be freed and reallocated. I'll mention in the caution section for the function that the block type is not expected to be changed at runtime
Additionally, the getBlockType()
is never used. Removing it from the spec
setBlockType()
does not need to be exposed outside the Buffer Layer. Making it protected
Since setHeader actually modifies the block type of the block being set, it's also its responsibility to set the correct block type in the Block Allocation Map.