2.6.1.1.5 Creating a Block

Allocating a new data block and assigning an BID.

Requirement level

Actions

Required

MUST check the fAMapValid value in the ROOT structure before proceeding (section 2.6.1.3.7).

Block allocations MUST be integer multiples of 64 bytes in size and aligned on a 64-byte boundary. The allocation size MUST factor in the size of the extra BLOCKTRAILER.

Allocate space for the block (section 2.6.1.1.1).

Non-internal data blocks MUST be encoded according to HEADER.bCryptMethod.

The BBT Reference Count for each data block MUST be initialized.

The BBT MUST be updated to reflect the new data block(s).

The BLOCKTRAILER MUST be initialized, including the data CRC (section 2.2.2.8.1).

The bidNextB field in the HEADER.ROOT structure MUST be incremented.

Recommended

Use the DList, PMap, FMap, FPMap as optimizations.

Optional

Update the DList.

Update the PMap, FMap, FPMap.

Possible side effects:

Scenario

Impact

Free slot of required size not found.

The PST File needs to grow. Refer to section 2.6.1.1.2 for additional considerations.

BBT page too full.

The BBT might need more levels or need to be balanced.