GT.M partitions GDS blocks into 512-block groups. The first block of each group contains a local bitmap. A local bitmap reports whether each of the 512 blocks is currently busy or free and whether it ever contained valid data that has since been KILLed.
The two bits for each block have the following meanings:
00 - Busy
01 - Free and never used before
10 - Currently not a legal combination
11 - Free but previously used
These two bits are internally represented as:
'X' - BUSY
'.' - FREE
'?' - CORRUPT
':' - REUSABLE
The interpreted form of the local bitmap is like the following: >
Block 0 Size 90 Level -1 TN 1 V7 Master Status: Free Space Low order High order Block 0: | XXXXX... ........ ........ ........ | Block 20: | ........ ........ ........ ........ | Block 40: | ........ ........ ........ ........ | Block 60: | ........ ........ ........ ........ | Block 80: | ........ ........ ........ ........ | Block A0: | ........ ........ ........ ........ | Block C0: | ........ ........ ........ ........ | Block E0: | ........ ........ ........ ........ | Block 100: | ........ ........ ........ ........ | Block 120: | ........ ........ ........ ........ | Block 140: | ........ ........ ........ ........ | Block 160: | ........ ........ ........ ........ | Block 180: | ........ ........ ........ ........ | Block 1A0: | ........ ........ ........ ........ | Block 1C0: | ........ ........ ........ ........ | Block 1E0: | ........ ........ ........ ........ | 'X' == BUSY '.' == FREE ':' == REUSABLE '?' == CORRUPT
Note | |
---|---|
The first block described by the bitmap is itself and is, therefore, always marked busy. |
If bitmaps marked as "?", they denote that they are corrupted (not currently in a legal combination) bitmaps. The consequences of corrupted bitmaps are:
Possible loss of data when GT.M overwrites a block that is incorrectly marked as free (malignant).
Reduction in the effective size of the database by the number of blocks incorrectly marked as busy (benign).