UDF: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
(Added UDF file system structures (not complete))
Line 48: Line 48:
== Anchor Volume Descriptor Pointer ==
== Anchor Volume Descriptor Pointer ==


The Anchor Volume Descriptor Pointer is a descriptor that contains the location of the Main Volume Descriptor. All UDF volume descriptors have the same general format:
The Anchor Volume Descriptor Pointer is a descriptor that contains the location of the Main Volume Descriptor and the backup Reserve Volume Descriptor.


{| {{wikitable}}
{| {{wikitable}}

Revision as of 04:36, 28 June 2014

Filesystems
Virtual Filesystems

VFS

Disk Filesystems
CD/DVD Filesystems
Network Filesystems
Flash Filesystems

The Universal Disc Format or UDF is the filesystem used on DVDs and Blu-Ray discs. It is similar to the CDFS (ISO 9660) file system, but it includes many extended features, such as incremental updates, which allows files to be deleted or updated over time.

Volume Structure

Like the CDFS file system, the UDF file system uses a 2048 byte sector size, and it designates that the first 16 sectors can be used by the OS to store proprietary data or boot logic. It also, like CDFS, uses 2048 byte aligned descriptors, starting at sector 16, to record the UDF specific information to locate additional volumes, partitions and files located on the disc. It also supports the inclusion of descriptors from other file systems for compatibility with other media formats, operating systems and devices.

The descriptors located at sector 16 (0x10) all use the same general layout as the CDFS volume descriptor:

Offset Length (bytes) Field name Datatype Description
0 1 Type int8 Volume Descriptor type code (see below).
1 5 Identifier strA Designates the type of descriptor.
6 1 Version int8 Volume Descriptor Version (0x01).
7 2041 Data - Depends on the volume descriptor type.

The identifier field is used to determine the type of the descriptor:

Identifier Description
"CD001" Indicates that this volume contains an ISO 9660 file system.
"BEA01" Denotes the beginning of the extended descriptor section.
"NSR02" Indicates that this volume contains a UDF file system.
"NSR03" Indicates that this volume contains a UDF file system.
"BOOT2" Includes information concerning boot loader location and entry point address.
"TEA01" Denotes the end of the extended descriptor section.

The presence of an NSR02 or NSR03 descriptor denotes that there is a valid UDF file system located on this volume, and that there is an Anchor Volume Descriptor Pointer located in sector 256 (0x100), with backup copies located in the last sector of the volume and/or the sector located 256 sectors from the end of the volume.

Anchor Volume Descriptor Pointer

The Anchor Volume Descriptor Pointer is a descriptor that contains the location of the Main Volume Descriptor and the backup Reserve Volume Descriptor.

Offset Length (bytes) Field name Datatype Description
0 16 DescriptorTag struct Contains the descriptor type, version and checksum information for this descriptor.
16 8 MainVolumeDescriptorSequenceExtent struct Contains the sector and length of the main volume descriptor sequence.
24 8 ReserveVolumeDescriptorSequenceExtent struct Contains the sector and length of the backup volume descriptor sequence.
32 480 Reserved - Reserved for future use.

Descriptor Tag

The descriptor tag structure is used by all UDF descriptors to designate the descriptor type and to verify data integrity.

Offset Length (bytes) Field name Datatype Description
0 2 TagIdentifier uint16 Contains the descriptor type.
2 2 DescriptorVersion uint16 Contains the sector and length of the main volume descriptor sequence.
4 1 TagChecksum uint8 Used to verify the data within the Descriptor Tag structure.
5 1 Reserved uint8 Reserved for future use.
6 2 TagSerialNumber uint16 Unique serial number for this volume
8 2 DescriptorCRC uint16 Used to verify the data with the Descriptor Tag structure.
10 2 DescriptorCRCLength uint16 Used to verify the data with the Descriptor Tag structure.
12 4 TagLocation uint32 Contains the sequence number of this descriptor.

Extent Structure

The extent structure is used to locate data that is located on the same partition as the extent structure. It contains the sector index (relative to the beginning of the partition), and the length of the data.

Offset Length (bytes) Field name Datatype Description
0 4 Length uint32 Contains the length, in bytes, of the data pointed to by this extent.
4 4 Location uint32 Contains the sector index of the data, relative to the beginning of the partition.


External Links