2.5.1 File Info Fields

Status
Contains information specifying the type of structure this is. It also contains the status of the pointers in the structure and the status of the attributes, time, date, and name.

Bit

Definition

0

Exists
1 Exists
0 Deleted

1

ATDFields
1 ATD fields are most recent
0 ATD fields are superseded

3-2

StructType
10 FileInfo structure

4

FNULLBits
0 PrimaryPtr valid
1 PrimaryPtr is FNULL

5

0 SecondaryPtr valid
1 SecondaryPtr is FNULL

6

0 ExtentPtr valid
1 ExtentPtr is FNULL

7

Reserved
Must be 1

8

CompressedBlockStart

This field is only meaningful if a file is compressed, otherwise it is ignored.

0 Indicates that this FileInfo points to a file extent that contains the first segment of a compressed block. The first segment of the compressed block is pointed to by the ExtentPtr.

1 Indicates that this block does not contain the first segment of a compressed block.

9

CompressedBlockEnd
This field is only meaningful if a file is compressed, otherwise it is ignored.

0 Indicates that this FileInfo points to a file extent that contains the last segment of a compressed block.

1 Indicates that this block does not contain the last segment of a compressed block.

15-10

Reserved
Must be 1s.


Exists
Indicates whether or not the entry under consideration is a valid member of the file information list. The bit is cleared when a file has been deleted. Deleted entry information should be ignored.

ATDFields
Indicates whether or not the Attributes/Time/Date fields in this structure are the most current for this file. The first valid structure in the FileInfo linked list to have this bit set has valid information, all others should be ignored. This bit only affects the validity of these fields.

StructType
Indicates that this structure is a file info.

FNULL bits
Indicate whether the corresponding pointer is to be considered to have a value of FNULL, regardless of the actual value of the pointer. The FNULL bits are cleared only after their respective pointers are assigned values by the file system. Therefore, the FNULL bits are the first check for validity of these pointers. These bits provide yet another fail-safe measure to guarantee file system integrity in the event of a system crash while updating these pointers.

CompressedBlockStart
This field is only meaningful if a file is compressed, otherwise it is ignored. Indicates that this FileInfo points to a file extent that contains the first segment of a compressed block. A compressed block can, in general, be split across erase blocks. The first segment of a compressed block is marked so that the beginning of a compression boundary can be identified. Also note that the UncompressedExtentLen field is valid only on the first FileInfo structure for the compressed block (i.e. the FileInfo that has this bit set).

CompressedBlockEnd
This field is only meaningful if a file is compressed, otherwise it is ignored. Indicates that this FileInfo points to a file extent that contains the last segment of a compressed block. Since a compressed block cannot be guaranteed to fit entirely within an erase block, it must be capable of being split across blocks. The last segment of a compressed block is marked so that end of a compression boundary can be identified.

ExtentPtr
A pointer to the location in the partition of this extent of the file. A file's content data is the in-order concatenation of the extents pointed to by each valid FileInfo structure in the list. An extent is considered to be valid only if the status indicates the entry exits, and SecondaryPtr is FNULL (or considered to have a value of FNULL as indicated by the FNULL bits).

PrimaryPtr
A pointer to the present files next FileInfo structure. The PrimaryPtr is used to locate the next entry in the FileInfo chain only if PrimaryPtr is not FNULL (and not considered to have a value of FNULL as indicated by the FNULL bits) and SecondaryPtr is FNULL (or considered to have a value of FNULL as indicated by the FNULL bits). If both PrimaryPtr and SecondaryPtr are FNULL (or considered to have values of FNULL as indicated by the FNULL bits), then the end of the chain has been reached.

SecondaryPtr
A pointer to a FileInfo structure that supersedes the current FileInfo structure. The SecondaryPtr is used to indicate that a FileInfo structure has been completely superseded. In this case SecondaryPtr is the only pointer field in the FileInfo structure that is valid.

Attrib/Time/Date
File modification attributes, time, and date in MS-DOS format. See previous bit field definitions.

VarStuctLen
The sum total length, in bytes, of all the variable length structures appended after the end of the members of the FileInfo structure. This field must be zero, indicating that none of these structures is present.

UncompressedExtentLen
The original length, in bytes, of this extent of the file. If this extent within the file IS NOT compressed, then this is the length in bytes that this extent of the file occupies on the media. This field is always used during seek operations on a file.

CompressedExtentLen
The actual physical length, in bytes, that this extent of the file occupies on the media.

Note that if an extent within a file IS NOT compressed, then the UncompressedExtentLen and CompressedExtentLen fields are equal. If an extent within a file IS compressed, then the CompressedExtentLen field represents the length that the compressed data occupies on the media. In the latter case, the compression ratio is (UncompressedExtentLen / CompressedExtentLen) and must be greater than one.

Figure 5

Figure 5 depicts how each pointer type within a FileInfo is related to all valid subsequent structures.