06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

verify_vol pHILE+ <strong>System</strong> <strong>Calls</strong><br />

Extent Map Faults<br />

The faults listed in Table 2-3 involve errors in the extent map of a particular file.<br />

Recall that the extent map consists of:<br />

■ Up to 10 extent descriptors within the file's FD.<br />

■ Within the file's FD, an indirect block descriptor that describes an indirect block<br />

containing additional extent descriptors.<br />

■ Within the file's FD, an index block descriptor that describes an index block<br />

containing additional indirect block descriptors.<br />

verify_vol() checks for illegal blocks both within an extent and within an<br />

indirect or index block descriptor. A block is illegal if its block number is equal to or<br />

greater than the number of blocks on the volume. For example, on a volume<br />

containing 1000 blocks, any block number greater than 999 is illegal.<br />

A file can be viewed as a sequence of logical blocks numbered from 0. For example,<br />

on a volume with 1K blocks, a 4.3 Kbyte file would consist of logical blocks 0<br />

through 4 (logical block 4 being only partly filled.)<br />

Every FD, every indirect block descriptor, and every index block descriptor contains<br />

a last logical block (LLB) field that indicates the largest logical block number<br />

addressed by the associated structure. For example, an indirect block descriptor<br />

may have LLB = 200, meaning that the last block in the last extent in the indirect<br />

block is the 200th block in the file. verify_vol() checks the LLB of every FD,<br />

indirect block descriptor, and index block descriptor and reports any<br />

inconsistencies.<br />

TABLE 2-3 Extent Map Faults<br />

VF_EXTFD An FD contains an extent containing an illegal block.<br />

VF_INFD An FD contains an illegal indirect block number.<br />

VF_IXFD An FD contains an illegal index block number.<br />

VF_TBCFD The block count within the FD conflicts with the actual<br />

number of blocks in the file.<br />

VF_LLBFD The LLB in the FD (for the first 10 extents) is incorrect.<br />

VF_LLBIN The LLB within an indirect block descriptor within an FD is<br />

incorrect.<br />

2-138 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!