Universal Disk Format Specification: Revision 2.60
Universal Disk Format Specification: Revision 2.60
Revision 2.60
March 1, 2005
Copyright 1994-2005 Optical Storage Technology Association ALL RIGHTS RESERVED
REVISION HISTORY
1.00 1.01 1.02 1.50 2.00 2.01 2.50 2.60 October 24, 1995 November 3, 1995 August 30, 1996 February 4, 1997 April 3, 1998 March 15, 2000 April 30, 2003 January 26, 2005 March 1, 2005 Original Release DVD appendix added Incorporates Document Change Notices DCN 2-001 through DCN 2-024 Integrated support for CD-R and CD-RW media (DCNs 2-025 thru 2-032) Integrated support for ECMA 167 3rd Edition which included the support for named streams. (DCN 2-033 through DCN 2-064) Incorporates DCNs 5000, 5002, 5004, 5006-5009, 5013-5015, 5018-5021, 5024-5027, 5029-5032, 5034-5042, 5044-5048, 5050 Incorporates Metadata Partition, DCNs 5049, 5061-5066, 5068-5072, 5074-5079, 5081-5082, 5086, 5089, 5090. Incorporates Pseudo OverWrite, DCNs 5100-5121 Approved by committee vote. Minor editorial corrections.
POINTS OF CONTACT
Optical Storage Technology Association http://www.osta.org/ Contact information http://www.osta.org/osta/contact.htm Technical questions mailto:[email protected] UDF Technical Editor mailto:[email protected] OSTA UDF Committee email reflector See link: UDF Email Reflector at the bottom of page: http://www.osta.org/specs/index.htm
Important Notices
__________________________________________________________________________________________________________
(a) THIS DOCUMENT IS AN AUTHORIZED AND APPROVED PUBLICATION OF OSTA. THE SPECIFICATIONS CONTAINED HEREIN ARE THE EXCLUSIVE PROPERTY OF OSTA BUT MAY BE REFERRED TO AND UTILIZED BY THE GENERAL PUBLIC FOR ANY LEGITIMATE PURPOSE, PARTICULARLY IN THE DESIGN AND DEVELOPMENT OF WRITABLE OPTICAL SYSTEMS AND SUBSYSTEMS. THIS DOCUMENT MAY BE COPIED IN WHOLE OR IN PART PROVIDED THAT NO REVISIONS, ALTERATIONS, OR CHANGES OF ANY KIND ARE MADE TO THE MATERIALS CONTAINED HEREIN. COMPLIANCE WITH THIS DOCUMENT MAY REQUIRE USE OF ONE OR MORE FEATURES COVERED BY THE PATENT RIGHTS OF AN OSTA MEMBER, ASSOCIATE OR THIRD PARTY. NO POSITION IS TAKEN BY OSTA WITH RESPECT TO THE VALIDITY OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT, WHETHER OWNED BY A MEMBER OR ASSOCIATE OF OSTA OR OTHERWISE. OSTA HEREBY EXPRESSLY DISCLAIMS ANY LIABILITY FOR INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OF OTHERS BY VIRTUE OF THIS OSTA DOCUMENT, NOR DOES OSTA UNDERTAKE A DUTY TO ADVISE USERS OR POTENTIAL USERS OF OSTA DOCUMENTS OF SUCH NOTICES OR ALLEGATIONS. OSTA HEREBY EXPRESSLY ADVISES ALL USERS OR POTENTIAL USERS OF THIS DOCUMENT TO INVESTIGATE AND ANALYZE ANY POTENTIAL INFRINGEMENT SITUATION, SEEK THE ADVICE OF INTELLECTUAL PROPERTY COUNSEL AND, IF INDICATED, OBTAIN A LICENSE UNDER ANY APPLICABLE INTELLECTUAL PROPERTY RIGHT OR TAKE THE NECESSARY STEPS TO AVOID INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHT. OSTA EXPRESSLY DISCLAIMS ANY INTENT TO PROMOTE INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHT BY VIRTUE OF THE EVOLUTION, ADOPTION, OR PUBLICATION OF THIS OSTA DOCUMENT. ONE OR MORE PATENT HOLDERS HAVE FILED STATEMENTS OF WILLINGNESS TO GRANT A LICENSE, ON REASONABLE AND NONDISCRIMINATORY TERMS, ON A RECIPROCAL BASIS, UNDER PATENT CLAIMS ESSENTIAL TO IMPLEMENT THIS SPECIFICATION. FURTHER INFORMATION MAY BE OBTAINED FROM OSTA. OSTA MAKES NO REPRESENTATION OR WARRANTY REGARDING ANY SPECIFICATION, AND ANY COMPANY USING A SPECIFICATION SHALL DO SO AT ITS SOLE RISK, INCLUDING SPECIFICALLY THE RISKS THAT A PRODUCT DEVELOPED WILL NOT BE COMPATIBLE WITH ANY OTHER PRODUCT OR THAT ANY PARTICULAR PERFORMANCE WILL NOT BE ACHIEVED. OSTA SHALL NOT BE LIABLE FOR ANY EXEMPLARY, INCIDENTAL, PROXIMATE OR CONSEQUENTIAL DAMAGES OR EXPENSES ARISING FROM THE USE OR IMPLEMENTATION OF THIS DOCUMENT. THIS DOCUMENT DEFINES ONLY ONE APPROACH TO COMPATIBILITY, AND OTHER APPROACHES MAY BE AVAILABLE IN THE INDUSTRY.
(b)
(c)
(d)
Universal Disk Format and UDF are registered marks of the Optical Storage Technology Association.
CONTENTS
1. INTRODUCTION......................................................................................................1
1.1 1.2 Document Layout .......................................................................................................................2 Compliance .................................................................................................................................3
1.3 General References.....................................................................................................................4 1.3.1 References ...............................................................................................................................4 1.3.2 Definitions ...............................................................................................................................4 1.3.3 Terms.......................................................................................................................................7 1.3.4 Acronyms ................................................................................................................................7
2.
ii
2.3.12 2.4
Pathname...........................................................................................................................62
3.
4.
4.2 Part 4 - File Structure ..............................................................................................................95 4.2.1 ICB Tag .................................................................................................................................95 4.2.2 File Identifier Descriptor .......................................................................................................96
5.
INFORMATIVE ....................................................................................................104
5.1 Descriptor Lengths .................................................................................................................104
5.2 Using Implementation Use Areas..........................................................................................104 5.2.1 Entity Identifiers ..................................................................................................................104 5.2.2 Orphan Space.......................................................................................................................105 5.3 5.4 Boot Descriptor.......................................................................................................................105 Clarification of Unrecorded Sectors .....................................................................................105
6.
APPENDICES ........................................................................................................106
6.1 6.2 UDF Entity Identifier Definitions .........................................................................................106 UDF Entity Identifier Values ................................................................................................107
6.3 Operating System Identifiers ................................................................................................108 6.3.1 OS Class ..............................................................................................................................108 6.3.2 OS Identifier ........................................................................................................................109
iii
OSTA Compressed Unicode Algorithm ...............................................................................110 CRC Calculation ....................................................................................................................112 Algorithm for ICB Strategy Type 4096................................................................................115
6.7 Identifier Translation Algorithms ........................................................................................116 6.7.1 DOS Algorithm ...................................................................................................................116 6.7.2 OS/2, Macintosh,Windows 95, Windows NT and UNIX Algorithm..................................123 6.8 Extended Attribute Header Checksum Algorithm .............................................................127
6.9 Requirements for DVD-ROM ...............................................................................................128 6.9.1 Constraints imposed on UDF by DVD-Video.....................................................................128 6.9.2 How to read a UDF DVD-Video disc .................................................................................129 6.9.3 Obtaining DVD Documents ................................................................................................131 6.10 Recommendations for CD Media..........................................................................................132 6.10.1 Use of UDF on CD-R media...........................................................................................132 6.10.2 Use of UDF on CD-RW media.......................................................................................132 6.10.3 Multisession and Mixed Mode .......................................................................................135 6.11 Common aspects of recording for different media..............................................................136 6.11.1 Real-Time Files...............................................................................................................136 6.11.2 Incremental recording using VAT ..................................................................................136 6.11.3 Multisession Usage .........................................................................................................137 6.11.4 UDF Bridge format.........................................................................................................138 6.11.5 Examples of UDF Multisession and UDF Bridge ..........................................................139 6.12 Requirements for DVD-R/-RW/-RAM interchangeability.................................................141 6.12.1 Requirements for DVD-RAM ........................................................................................141 6.12.2 Requirements for DVD-RW ...........................................................................................141 6.12.3 Requirements for DVD-R...............................................................................................142 6.12.4 Requirements for Real-Time file recording on DVD discs ............................................143 6.13 Recommendations for DVD+R and DVD+RW Media .......................................................144 6.13.1 Use of UDF on DVD+R media.......................................................................................144 6.13.2 Use of UDF on DVD+RW 4.7 GBytes Basic Format media..........................................144 6.14 Recommendations for Mount Rainier formatted media ....................................................146 6.14.1 Properties of CD-MRW and DVD+MRW media and drives .........................................146 6.14.2 Background Physical Formatting....................................................................................146 6.15 Introduction to the Pseudo OverWrite Mechanism ............................................................147 6.15.1 Characteristics of Media formatted for Pseudo OverWrite ............................................147 6.15.2 Write Strategy.................................................................................................................148 6.15.3 Requirements for UDF Implementations........................................................................150 6.15.4 Implementation Notes for UDF Implementations...........................................................150 6.16 Recommendations for Blu-ray Disc media...........................................................................151 6.16.1 Requirements for Blu-ray Disc Read-Only Format (BD-ROM).....................................151 6.16.2 Requirements for Blu-ray Disc Rewritable Format (BD-RE).........................................152 6.16.3 Requirements for Blu-ray Disc Recordable Format (BD-R) ..........................................152 6.16.4 Information about AV Applications ...............................................................................153
iv
6.17 6.18
UDF Media Format Revision History ..................................................................................154 Developer Registration Form ................................................................................................157
1. Introduction
The OSTA Universal Disk Format (UDF) specification defines a subset of the standard ECMA 167 3rd edition. The primary goal of the OSTA UDF is to maximize data interchange and minimize the cost and complexity of implementing ECMA 167. To accomplish this task this document defines a Domain. A domain defines rules and restrictions on the use of ECMA 167. The domain defined in this specification is known as the OSTA UDF Compliant domain. This document attempts to answer the following questions for the structures of ECMA 167 on a per operating system basis: Given some ECMA 167 structure X, for each field in structure X answer the following questions for a given operating system: 1) When reading this field: If the operating system supports the data in this field then what should it map to in the operating system? 2) When reading this field: If the operating system supports the data in this field with certain limitations then how should the field be interpreted under this operating system? 3) When reading this field: If the operating system does NOT support the data in this field then how should the field be interpreted under this operating system? 4) When writing this field: If the operating system supports the data for this field then what should it map from in the operating system? 5) When writing this field: If the operating system does NOT support the data for this field then to what value should the field be set? For some structures of ECMA 167 the answers to the above questions were selfexplanatory and therefore those structures are not included in this document. In some cases additional information is provided for each structure to help clarify the standard. This document should help make the task of implementing the ECMA 167 standard easier. To be informed of changes to this document please fill out and return the OSTA UDF Developer Registration Form located in appendix 6.18.
UDF 2.60
March 1, 2005
This document presents information on the treatment of structures defined under standard ECMA 167. The following areas are covered: Interpretation of a structure/field upon reading from media. Contents of a structure/field upon writing to media. Unless specified otherwise writing refers only to creating a new structure on the media. When it applies to updating an existing structure on the media it will be specifically noted as such. The fields of each structure are listed first, followed by a description of each field with respect to the categories listed above. In certain cases, one or more fields of a structure are not described if the semantics associated with the field are obvious. A word on terminology: in common with ECMA 167, this document will use shall to indicate a mandatory action or requirement, may to indicate an optional action or requirement, and should to indicate a preferred, but still optional action or requirement. Also, special comments associated with fields and/or structures are prefaced by the notification: "NOTE:". Notes may be numbered NOTE 1:, etc.
UDF 2.60
March 1, 2005
1.2 Compliance
This document requires conformance to parts 1, 2, 3 and 4 of ECMA 167. Compliance to part 5 of ECMA 167 is not supported by this document. Part 5 may be supported in a later revision of this document. For an implementation to claim compliance to this document the implementation shall meet all the requirements (indicated by the word shall) specified in this document. The following are a few points of clarification in regards to compliance: Multi-Volume support is optional. An implementation can claim compliance and only support single volumes. Multi-Partition support is optional. An implementation can claim compliance without supporting the special multi-partition case on a single volume defined in this specification. Media support. An implementation can claim compliance and support a single media type or any combination. All implementations should be able to read any media that is physically accessible. Multisession support. Any implementation that supports reading of CD-R media shall support reading of CD-R Multisessions as defined in 6.10.3. File Name Translation - Any time an implementation has the need to transform a filename to meet operating system restrictions it shall use the algorithms specified in this document. Extended Attributes - All compliant implementations shall preserve existing extended attributes encountered on the media. Implementations shall create and maintain the extended attributes for the operating systems they support. For example, an implementation that supports Macintosh shall preserve any OS/2 extended attributes encountered on the media. An implementation that supports Macintosh shall also create and maintain all Macintosh extended attributes specified in this document. Backwards Read Compatibility An implementation compliant to this version of the UDF specification shall be able to read all media written under previous versions of the UDF specification. Backwards Write Compatibility UDF 2.xx structures shall not be written to media that contain UDF 1.50 or UDF 1.02 structures. UDF 1.50 and UDF 1.02 structures shall not be written to media that contain UDF 2.xx structures. These two requirements prevent media from containing different versions of the UDF structures.
UDF 2.60
March 1, 2005
ECMA 167
1.3.2 Definitions
Audio session Audio track CD-R CD-RW Clean File System Data track Dirty File System ECC Block Size (bytes) Audio session contains one or more audio tracks, and no data track. Audio tracks are tracks that are designated to contain audio sectors specified in ISO/IEC 908. CD-Recordable. A Write-Once CD defined in Orange Book, part-II. CD-Rewritable. An Overwritable CD defined in Orange Book, part-III. The file system on the media conforms to this specification. Data tracks are tracks that are designated to contain data sectors specified in ISO/IEC 10149. A file system that is not a clean file system. This term refers to values defined in relevant device and/or media specifications. The reader should consult the appropriate document for example, the MMC or Mt. Fuji specifications for CD/DVD class media. For media exposing no such concept externally (e.g. hard disc) this term shall be interpreted to mean the sector size of the media. An incremental recording method in which all packets in a given track are of a length specified in the Track Descriptor Block. Addresses presented to a CD drive are translated according to the Method 2 addressing specified in Orange Book parts-II and -III. A control node in ECMA 167.
Fixed Packet
ICB
UDF 2.60
March 1, 2005
A logical block number [3/8.8.1]. NOTE 1: This is not to be confused with a logical block address [4/7.1], given by the lb_addr structure that contains both a logical block number [3/8.8.1] and a partition reference number [3/8.8], the latter identifying the partition [3/8.7] which contains the addressed logical block [3/8.8.1]. NOTE 2: A logical block number [3/8.8.1] translates to a logical sector number [3/8.1.2] according to the scheme indicated by the Partition Map [3/10.7] of the partition [3/8.7], which contains the addressed logical block [3/8.8.1]
A sector number [3/8.1.1], derived from the unique sector address given by a relevant standard for recording [1/5.10]. In this specification, a sector number [3/8.1.1] is equivalent to a logical sector number [3/8.1.2]. A recordable unit, which is an integer number of contiguous sectors [1/5.9], which consist of user data sectors, and may include additional sectors [1/5.9] which are recorded as overhead of the Packet-writing operation and are addressable according to the relevant standard for recording [1/5.10]. A sector number [3/8.1.1], derived from the unique sector address given by a relevant standard for recording [1/5.10]. In this specification, a sector number [3/8.1.1] is equivalent to a logical sector number [3/8.1.2].
Packet
Physical Address
Physical Block Address A sector number [3/8.1.1], derived from the unique sector address given by a relevant standard for recording [1/5.10]. In this specification, a sector number [3/8.1.1] is equivalent to a logical sector number [3/8.1.2]. physical sector Pseudo OverWrite A sector [1/5.9] given by a relevant standard for recording [1/5.10]. In this specification, a sector [1/5.9] is equivalent to a logical sector [3/8.1.2]. Overwrite performed logically by drive on Write-Once media using sequential recording.
Random Access File System A file system for randomly writable media, either Write-Once or Rewritable reserved track A reserved track is a track that has a valid Next Writable Address (NWA). For Pseudo OverWrite, this means that sequential write at the NWA and pseudo overwrite until the NWA is possible for this track. See also used track. A file system for sequentially written media (e.g. CD-R) The tracks of a volume shall be organized into one or more sessions, e.g. for CD see the Orange Book part-II. A session shall be a sequence of one or more tracks, the track numbers of which form a contiguous ascending sequence. The sectors of a volume shall be organized into one or more tracks. A track shall be a sequence of sectors, the sector numbers of which form a contiguous ascending sequence. No sector shall belong to more than one track. NOTE: There may be gaps between tracks; that is, the last sector of a track need not be adjacent to the first sector of the next track. UDF used track OSTA Universal Disk Format A used track is a track that does not have a valid Next Writable Address. For Pseudo OverWrite, this means that sequential write to this track is not possible. Pseudo overwrite is still possible. See also reserved track.
Track
UDF 2.60
March 1, 2005
The logical blocks [3/8.8.1] which were recorded in the sectors [1/5.9] (equivalent in this specification to logical sectors [3/8.1.2]) of a Packet and which contain the data intentionally recorded by the user of the drive. This specifically does not include the logical blocks [3/8.8.1], if any, whose constituent sectors [1/5.9] were used for the overhead of recording the Packet, even though those sectors [1/5.9] are addressable according to the relevant standard for recording [1/5.10]. Like any logical blocks [3/8.8.1], user data blocks are identified by logical block numbers [3/8.8.1]. The sectors [1/5.9] of a Packet which contain the data intentionally recorded by the user of the drive, specifically not including those sectors [1/5.9] used for the overhead of recording the Packet, even though those sectors [1/5.9] may be addressable according to the relevant standard for recording [1/5.10]. Like any sectors [1/5.9], user data sectors are identified by sector numbers [3/8.1.1]. In this specification, a sector number [3/8.1.1] is equivalent to a logical sector number [3/8.1.2]. An incremental recording method in which each packet in a given track is of a host determined length. Addresses presented to a CD drive are as specified in Method 1 addressing in Orange Book parts II and III. A logical block number [3/8.8.1] of a logical block [3/8.8.1] in a virtual partition. Such a logical block [3/8.8.1] is recorded using the space of a logical block [3/8.8.1] of a corresponding non-virtual partition. The Nth Uint32 in the VAT represents the logical block number [3/8.8.1] in a non-virtual partition used to record logical block number N of its corresponding virtual partition. The first virtual address is 0. A partition of a logical volume [3/8.8] identified in a logical volume descriptor [3/10.6] by a Type 2 Partition Map [3/10.7.3] recorded according section 2.2.8 of this specification. The Virtual Partition Map contains a partition number that is the same as the partition number [3/10.7.2.4] in a Type 1 Partition Map [3/10.7.2] in the same logical volume descriptor [3/10.6]. Each logical block [3/8.8.1] in the virtual partition is recorded using the space of a logical block [3/8.8.1] of that corresponding non-virtual partition. A VAT lists the logical blocks [3/8.8.1] of the non-virtual partition, which have been used to record the logical blocks [3/8.8.1] of its corresponding virtual partition. A logical block [3/8.8.1] in a virtual partition. Such a logical block [3/8.8.1] is recorded using the space of a logical block [3/8.8.1] of a corresponding nonvirtual partition. A virtual sector should not be confused with a sector [1/5.9] or a logical sector [3/8.1.2]. A file [4/8.8] recorded in the space of a non-virtual partition which has a corresponding virtual partition, and whose data space [4/8.8.2] is structured according to section 2.2.11 of this specification. This file provides an ordered list of Uint32s, where the Nth Uint32 represents the logical block number [3/8.8.1] of a non-virtual partition used to record logical block number N of its corresponding virtual partition. This file [4/8.8] is not necessarily referenced by a File Identifier Descriptor [4/14.4] of a directory [4/8.6] in the file set [4/8.5] of the logical volume [3/8.8]. A File Entry ICB that describes a file containing a Virtual Allocation Table.
Variable Packet
Virtual Address
virtual partition
virtual sector
VAT
VAT ICB
UDF 2.60
March 1, 2005
1.3.3 Terms
May Optional Shall Should Reserved Indicates an action or feature that is optional. Describes a feature that may or may not be implemented. If implemented, the feature shall be implemented as described. Indicates an action or feature that is mandatory and must be implemented to claim compliance to this standard. Indicates an action or feature that is optional, but its implementation is strongly recommended. A reserved field is reserved for future use and shall be set to zero. A reserved value is reserved for future use and shall not be used.
1.3.4 Acronyms
Acronym AD AVDP EA EFE FE FID FSD ICB IUVD LV LVD LVID NWA PD POW PVD SBD USD VAT VDS VRS Definition Allocation Descriptor Anchor Volume Descriptor Pointer Extended Attribute Extended File Entry File Entry File Identifier Descriptor File Set Descriptor Information Control Block Implementation Use Volume Descriptor Logical Volume Logical Volume Descriptor Logical Volume Integrity Descriptor Next Writable Address in a track Partition Descriptor Pseudo OverWrite as described in appendix 6.15 Primary Volume Descriptor Space Bitmap Descriptor Unallocated Space Descriptor Virtual Allocation Table Volume Descriptor Sequence Volume Recognition Sequence
UDF 2.60
March 1, 2005
UDF 2.60
March 1, 2005
Item
Partition Descriptor
Logical Volume Integrity Descriptor Partition Integrity Entry Unallocated Space Descriptor File Set Descriptor
ICB Tag File Identifier Descriptor File Entry Allocation Descriptors Allocation Extent Descriptors Unallocated Space Entry
UDF 2.60
March 1, 2005
Item
Volume Descriptor Sequence Extent Record Structure Minimum UDF Read Revision
UDF 2.60
10
March 1, 2005
RBP 0 1
The CompressionID shall identify the compression algorithm used to compress the CompressedBitStream field. The following algorithms are currently supported: Compression Algorithm Description Reserved Value indicates there are 8 bits per character in the CompressedBitStream. Reserved Value indicates there are 16 bits per character in the CompressedBitStream. Reserved Value indicates the CS0 expansion is empty and unique. Compression Algorithm 8 is used for compression. Value indicates the CS0 expansion is empty and unique. Compression Algorithm 16 is used for compression.
For a CompressionID of 8 or 16, the value of the CompressionID shall specify the number of BitsPerCharacter for the d-characters defined in the CharacterBitStream field. Each sequence of CompressionID bits in the CharacterBitStream field shall represent an OSTA Compressed Unicode dcharacter. The bits of the character being encoded shall be added to the CharacterBitStream from most- to least-significant-bit. The bits shall be added to the CharacterBitStream starting from the most significant bit of the current byte being encoded into.
UDF 2.60
11
March 1, 2005
NOTE: This encoding causes characters written with a CompressionID of 16 to be effectively written in big endian format. The value of the OSTA Compressed Unicode d-character interpreted as a Uint16 defines the value of the corresponding d-character in the Unicode 2.0 standard. Refer to appendix 6.4 on OSTA Compressed Unicode for sample C source code to convert between OSTA Compressed Unicode and standard Unicode 2.0. The Unicode byte-order marks, #FEFF and #FFFE, shall not be used. Compression IDs 254 and 255 shall only be used in FIDs where the Deleted bit is set to ONE. When uncompressing File Identifiers with Compression IDs 254 and 255, the resulting name is to be considered empty and unique.
The CharacterSetType field shall have the value of 0 to indicate the CS0 coded character set. The CharacterSetInfo field shall contain the following byte values with the remainder of the field set to a value of 0. #4F, #53, #54, #41, #20, #43, #6F, #6D, #70, #72, #65, #73, #73, #65, #64, #20, #55, #6E, #69, #63, #6F, #64, #65 The above byte values represent the following ASCII string: OSTA Compressed Unicode
2.1.3 Dstrings
The ECMA 167 standard, as well as this document, has normally defined byte positions relative to 0. In section 1/7.2.12 of ECMA 167, dstrings are defined in terms of being relative to 1. Since this offers an opportunity for confusion, the following shows what the definition would be if described relative to 0.
7.2.12 Fixed-length character fields A dstring of length n is a field of n bytes where d-characters (1/7.2) are recorded. The number of bytes used to record the characters shall be recorded as a Uint8 (1/7.1.1) in byte n-1, where n is
UDF 2.60
12
March 1, 2005
the length of the field. The characters shall be recorded starting with the first byte of the field, and any remaining byte positions after the characters up until byte n-2 inclusive shall be set to #00.
If the number of d-characters to be encoded is zero, the length of the dstring shall be zero. NOTE: The length of a dstring includes the compression code byte (2.1.1) except for the case of a zero length string. A zero length string shall be recorded by setting the entire dstring field to all zeros.
2.1.4 Timestamp
struct timestamp { Uint16 Int16 Uint8 Uint8 Uint8 Uint8 Uint8 Uint8 Uint8 Uint8 } /* ECMA 167 1/7.3 */ TypeAndTimezone; Year; Month; Day; Hour; Minute; Second; Centiseconds; HundredsofMicroseconds; Microseconds;
UDF 2.60
13
March 1, 2005
NOTE 1: Time zones West of Coordinated Universal Time have negative offsets. For example, Eastern Standard Time is -300 minutes; Eastern Daylight Time is -240 minutes. NOTE 2: Implementations on systems that support time zones should interpret unspecified time zones as Coordinated Universal Time. Although not a requirement, this interpretation has the advantage that files generated on systems that do not support time zones will always appear to have the same timestamps on systems that do support time zones, irrespective of the interpreting system's local time zone.
The following sections describe the format and use of Entity Identifiers based upon the different types mentioned above. For all UDF descriptor fields containing an EntityID structure, the value of the Identifier field and the Suffix Type for the Identifier Suffix field are defined in the Entity Identifiers table of 2.1.5.2. The interpretation of the Identifier Suffix field for each Suffix Type is defined in 2.1.5.3.
UDF 2.60
14
March 1, 2005
UDF 2.60
15
March 1, 2005
UDF Unique ID Mapping Data Power Calibration Table Stream Logical Volume Integrity Descriptor Partition Integrity Entry Virtual Partition Map Virtual Allocation Table Sparable Partition Map Sparing Table Metadata Partition Map
Implementation ID Implementation ID Implementation ID (in Implementation Use field) Implementation ID Partition Type Identifier Implementation Use (optional) Partition Type Identifier Sparing Identifier Partition Type Identifier
*Developer ID *Developer ID *Developer ID N/A, see 2.3.9 *UDF Virtual Partition *Developer ID *UDF Sparable Partition *UDF Sparing Table *UDF Metadata Partition
Implementation Identifier Suffix Implementation Identifier Suffix Implementation Identifier Suffix N/A UDF Identifier Suffix Implementation Identifier Suffix UDF Identifier Suffix UDF Identifier Suffix UDF Identifier Suffix
The Suffix Type column in the above table defines the format of the suffix to be used with the corresponding Entity Identifier. These different suffix types are defined in the following section 2.1.5.3. NOTE 1: The value of the Entity Identifier field is interpreted as a sequence of bytes, and not as a dstring specified in CS0. For ease of use the values used by UDF for this field are specified in terms of ASCII character strings. The actual sequence of bytes used for the Entity Identifiers defined by UDF are specified in section 6.2. In the ID Value column in the above table *Developer ID refers to an Entity Identifier that uniquely identifies the current implementation. The value specified should be used when a new descriptor is created. Also, the value specified should be used for an existing descriptor when anything within the scope of the specified EntityID field is modified. NOTE 2: The value chosen for a *Developer ID should contain enough information to identify the company and product name for an implementation. For example, a company called XYZ with a UDF product called DataOne might choose *XYZ DataOne as their Developer ID. Also in the suffix of their Developer ID they may choose to record the current version number of their DataOne product. This information is extremely helpful when trying to determine which implementation wrote a bad structure on a piece of media when multiple products from different companies have been recording on the media. In the ID Value column in the above table *Application ID refers to an identifier that uniquely identifies the writers application. NOTE 3: All Identifiers defined in this document (appendix 6.1) shall be registered by OSTA as UDF Identifiers.
UDF 2.60
16
March 1, 2005
RBP
0 2 3
Length
2 1 5
Contents
Uint16 (= #0260) Uint8 bytes (= #00)
The UDF Revision field shall contain #0260 to indicate revision 2.60 of this document. This field will allow an implementation to detect changes made in newer revisions of this document. The OSTA Domain Identifiers are only used in the Logical Volume Descriptor and the File Set Descriptor. The DomainFlags field defines the following bit flags: Domain Flags Description
HardWriteProtect SoftWriteProtect Reserved
Bit
0 1 2-7
The SoftWriteProtect flag is a user settable flag that indicates that the volume or file structures within the scope of the descriptor in which it resides are write protected. A SoftWriteProtect flag value of ONE shall indicate user write protected structures. This flag may be set or reset by the user. The HardWriteProtect flag is an implementation settable flag that indicates that the scope of the descriptor in which it resides is permanently write protected. A HardWriteProtect flag value of ONE shall indicate a permanently write protected structure. Once set this flag shall not be reset. The HardWriteProtect flag overrides the SoftWriteProtect flag. The write protect flags appear in the Logical Volume Descriptor and in the File Set Descriptor. They shall be interpreted as follows: is_fileset_write_protected = LVD.HardWriteProtect || LVD.SoftWriteProtect || FSD.HardWriteProtect || FSD.SoftWriteProtect is_fileset_hard_protected = LVD.HardWriteProtect || FSD.HardWriteProtect is_fileset_soft_protected = (LVD.SoftWriteProtect || FSD.SoftWriteProtect) && !is_fileset_hard_protected is_vol_write_protected = LVD.HardWriteProtect || LVD.SoftWriteProtect is_vol_hard_protected = LVD.HardWriteProtect is_vol_soft_protected = LVD.SoftWriteProtect && !LVD.HardWriteProtect
UDF 2.60
17
March 1, 2005
For UDF Entity Identifiers as defined by UDF (see 2.1.5.2 and appendix 6.1), the Identifier Suffix field shall be constructed as follows: UDF Identifier Suffix format Name
UDF Revision OS Class OS Identifier Reserved
RBP
0 2 3 4
Length
2 1 1 4
Contents
Uint16 (= #0260) Uint8 Uint8 bytes (= #00)
The contents of the OS Class and OS Identifier fields are described in Appendix 6.3 on Operating System Identifiers. For Implementation Entity Identifiers not defined by UDF (see 2.1.5.2), the Identifier Suffix field shall be constructed as follows: Implementation Identifier Suffix format Length Name
1 1 6 OS Class OS Identifier Implementation Use Area
RBP
0 1 2
Contents
Uint8 Uint8 bytes
NOTE: It is important to understand the intended use and importance of the OS Class and OS Identifier fields. The main purpose of these fields is to aid in debugging when problems are found on a UDF volume. The fields also provide useful information that could be provided to the end user. When set correctly these two fields provide an implementation with information such as the following: Identify under which operating system a particular structure was last modified. Identify under which operating system a specific file or directory was last modified. If a developer supports multiple operating systems with their implementation, it helps to determine under which operating system a problem may have occurred. For an Application Entity Identifier not defined by UDF (see 2.1.5.2), the Identifier Suffix field shall be constructed as follows, unless specified otherwise. Application Identifier Suffix format Length Name
8 Application Use Area
RBP
0
Contents
bytes
UDF 2.60
18
March 1, 2005
UDF 2.60
19
March 1, 2005
NOTE: The value zero for TagIdentifier is not defined by ECMA 167, but it is used by UDF for the Sparing Table.
UDF 2.60
20
March 1, 2005
UDF 2.60
21
March 1, 2005
NOTE: This field is used to determine the intent of the originator of the volume. If this field has been set to 2 then the originator does not wish the volume to be included in a multi-volume set (interchange level 3). The receiver may override this field and set it to a 3 but the implementation should give the receiver a strict warning explaining the intent of the originator of the volume.
UDF 2.60
22
March 1, 2005
NOTE 2: Closed media shall conform to the above rules. As specified in section 6.11.2, unclosed sequential Write-Once media may have a single AVDP present at either sector 256 or 512. If on an unclosed disc a single AVDP is recorded on sector 256, any AVDP recorded on sector 512 must be ignored.
UDF 2.60
23
March 1, 2005
UDF 2.60
24
March 1, 2005
This field shall indicate that the contents of this logical volume conforms to the domain defined in this document, therefore the Domain Identifier ID value shall be set to: "*OSTA UDF Compliant" As described in the section on Entity Identifier the Identifier Suffix field of this EntityID shall contain the revision of this document for which the contents of the Logical Volume is compatible. For more information on the proper handling of this field see section 2.1.5. NOTE 2: The Identifier Suffix field of this EntityID contains SoftWriteProtect and HardWriteProtect flags. Refer to 2.1.5.3.
This field can be used to find the File Set Descriptor, and from the File Set Descriptor the root directory can be found.
WARNING: For WORM media this field should be set to an extent of some
substantial length. Once the WORM volume on which the Logical Volume Integrity Descriptor resides is full a new volume must be added to the volume set since the Logical Volume Integrity Descriptor must reside on the same volume as the prevailing Logical Volume Descriptor.
UDF 2.60
25
March 1, 2005
UDF 2.60
26
March 1, 2005
RBP
0 32 36 40 42 44 46
Length
32 4 4 2 2 2 L_IU - 46
Contents
EntityID Uint32 Uint32 Uint16 Uint16 Uint16 byte
NOTE: For a Sequential File System using a VAT, all field values above will be overruled by the corresponding VAT fields, except for the ImplementationID and Implementation Use fields, see 2.2.11.
UDF 2.60
27
March 1, 2005
Implementation ID - The implementation identifier EntityID of the implementation which last modified anything within the scope of this EntityID. The scope of this EntityID is the Logical Volume Descriptor, and the contents of the associated Logical Volume. This field allows an implementation to identify which implementation last modified the contents of a Logical Volume. Number of Files - The current number of files in the Logical Volume, including hard links. The count includes all FIDs in the directory hierarchy for which the Directory bit, Parent bit and Deleted bit are all ZERO. FIDs identifying a Named Stream are not included in the count. This information is needed by the Macintosh OS. All implementations shall maintain this information. Number of Directories - The current number of directories in the Logical Volume, plus the root directory. The count includes the root directory and all FIDs in the directory hierarchy for which the Directory bit is ONE and the Parent bit and Deleted bit are both ZERO. FIDs identifying a Stream Directory are not included in the count. This information is needed by the Macintosh OS. All implementations shall maintain this information. Minimum UDF Read Revision - Shall indicate the minimum recommended revision of the UDF specification that an implementation is required to support to successfully be able to read all potential structures on the media. This number shall be stored in binary coded decimal format, for example #0250 would indicate revision 2.50 of the UDF specification. See further requirements in the Basic Restrictions & Requirements section. Minimum UDF Write Revision - Shall indicate the minimum revision of the UDF specification that an implementation is required to support to successfully be able to modify all structures on the media. This number shall be stored in binary coded decimal format, for example #0250 would indicate revision 2.50 of the UDF specification. Maximum UDF Write Revision - Shall indicate the maximum revision of the UDF specification that an implementation that has modified the media has supported. An implementation shall update this field only if it has modified the media and the level of the UDF specification it supports is higher than the current value of this field. This number shall be stored in binary coded decimal format, for example #0260 would indicate revision 2.60 of the UDF specification. Implementation Use - Contains implementation specific information unique to the implementation identified by the Implementation ID.
UDF 2.60
28
March 1, 2005
2.2.7.2.1 charspec LVICharset Interpreted as specifying the character LogicalVolumeIdentifier and LVInfo fields.
sets
allowed
in
the
Shall be set to indicate support for CS0 only as defined in 2.1.2. 2.2.7.2.2 dstring LogicalVolumeIdentifier[128] Identifies the Logical Volume referenced by this descriptor.
UDF 2.60
29
March 1, 2005
2.2.7.2.3 dstring LVInfo1[36], LVInfo2[36] and LVInfo3[36] The fields LVInfo1, LVInfo2 and LVInfo3 should contain additional information to aid in the identification of the media. For example the LVInfo fields could contain information such as Owner Name, Organization Name, and Contact Information. 2.2.7.2.4 struct EntityID ImplementationID Refer to section 2.1.5 on Entity Identifier. 2.2.7.2.5 bytes ImplementationUse[128] This area may be used by the implementation to store any additional implementation specific information.
UDF 2.60
30
March 1, 2005
Layout of Type 2 Partition Map for virtual partition Length Name Contents
Partition Map Type Partition Map Length Reserved 1 Partition Type Identifier Volume Sequence Number Partition Number Reserved 2 Uint8 = 2 Uint8 = 64 #00 bytes EntityID Uint16 Uint16 #00 bytes
Partition Type Identifier: Flags = 0 Identifier = *UDF Virtual Partition Identifier Suffix is recorded as defined in section 2.1.5 Volume Sequence Number = volume upon which the VAT and Partition is recorded Partition Number = the partition number in the Type 1 Partition Map in the same logical volume descriptor.
UDF 2.60
31
March 1, 2005
Layout of Type 2 Partition Map for sparable partition RBP Length Name Contents
0 1 2 4 36 38 40 42 43 44 48 48 + 4 * N_ST 1 1 2 32 2 2 2 1 1 4 4 * N_ST 16 - 4 * N_ST Partition Map Type Partition Map Length Reserved 1 Partition Type Identifier Volume Sequence Number Partition Number Packet Length Number of Sparing Tables (=N_ST) Reserved 2 Size of each Sparing Table Locations of Sparing Tables Pad Uint8 = 2 Uint8 = 64 #00 bytes EntityID Uint16 Uint16 Uint16 Uint8 #00 byte Uint32 Uint32 #00 bytes
Partition Type Identifier: Flags = 0 Identifier = *UDF Sparable Partition Identifier Suffix is recorded as defined in section 2.1.5. Partition Number = the number of this partition. Shall identify a Partition Descriptor associated with this partition. Packet Length = the number of user data blocks per fixed packet. This value is specified in the medium specific sections of the Appendices in section 6. Number of Sparing Tables = the number of redundant tables recorded. This shall be a value in the range of 1 to 4. Size of each Sparing Table = Length, in bytes, allocated for each Sparing Table. Locations of Sparing Tables = the start locations of each Sparing Table specified as a media block address. Implementations should align the start of each Sparing Table with the beginning of a packet. Implementations should record at least two Sparing Tables in physically distant locations.
UDF 2.60
32
March 1, 2005
Layout of Type 2 Partition Map for metadata partition RBP Length Name Contents
0 1 2 4 36 38 40 44 48 52 56 58 59 1 1 2 32 2 2 4 4 4 4 2 1 5 Partition Map Type Partition Map Length Reserved 1 Partition Type Identifier Volume Sequence Number Partition Number Metadata File Location Metadata Mirror File Location Metadata Bitmap File Location Allocation Unit Size (blocks) Alignment Unit Size (blocks) Flags Reserved 2 Uint8 = 2 Uint8 = 64 #00 bytes EntityID Uint16 Uint16 Uint32 Uint32 Uint32 Uint32 Uint16 Uint8 #00 bytes
Partition Type Identifier: Flags = 0 Identifier = *UDF Metadata Partition Identifier Suffix is recorded as in section 2.1.5. Partition Number = the number of this partition. Shall identify a Partition Descriptor associated with this partition. This shall match the partition number in the Type 1 Partition Map or Type 2 Sparable Partition Map, one and only one of which shall also be recorded as appropriate to the media type. Metadata File Location = address of the block containing the File Entry for the Metadata File. This address shall be interpreted as a logical block number within the physical or sparable partition associated with this Partition Map (see above Partition Number field). Metadata Mirror File Location = address of block containing the File Entry for the metadata file mirror. This address shall be interpreted as a logical block number within the physical or sparable partition associated with this Partition Map (see above Partition Number field). Metadata Bitmap File Location = the address of the block containing the File Entry for the Metadata Bitmap File. This address shall be interpreted as a logical block number within the physical or sparable partition associated with this Partition Map (see above Partition Number field). If the value of the Metadata Bitmap File Location field is equal to #FFFFFFFF, no File Entry for the Metadata Bitmap File is defined. Allocation Unit Size = the number of logical blocks per Allocation Unit for the metadata file (and mirror file) associated with this Partition Map. This value shall be an integer multiple of the larger of the following three values: (media ECC Block Size (divided by) logical block size); Packet Length (if a type 2 Sparable Partition Map is recorded); 32. Alignment Unit Size (blocks) = all extents allocated to the Metadata File (or Mirror File) must have a starting Lbn which is an integer multiple of this value. This value shall be an integer multiple of the larger of the following: (media ECC Block Size (divided by) logical block size); Packet Length (if a type 2 Sparable Partition Map is recorded). Flags: Bit 0: Duplicate Metadata Flag: When set, indicates that the Metadata Mirror File has its own unique allocation (i.e. it duplicates the data in the Metadata File). When clear indicates that the Metadata Mirror File allocation descriptors describe the same allocation as the Metadata File allocation descriptors (i.e. the data is not duplicated, and the data blocks are shared between both main and mirror files, but each File Entry and its associated allocation descriptors are unique and distinct). Bits 1-7: Reserved. Shall be set to zero on write, and ignored on read.
UDF 2.60
33
March 1, 2005
NOTE 1: The Metadata Partition shall have an entry in the LVID Size Table and Free Space Table (see 2.2.6). NOTE 2: The Metadata File Location, Metadata Mirror File Location and Metadata Bitmap File Location Uint32 fields define File Entry locations. The number of blocks allocated for each File Entry shall be one logical block.
UDF 2.60
34
March 1, 2005
most current virtual sector 1 that exists, even though it exists at a new Logical Block Address. The use of virtual addressing allows any desired structure to become effectively Rewritable. The structure is Rewritable when every pointer that references it does so only by its Virtual Address. When a replacement structure is written, the virtual reference does not need to change. The proper entry in the VAT is changed to reflect the new Logical Block Address of the corresponding Virtual Address and all virtual references then indirectly point to the new structure. All structures that require updating, such as directory ICBs, shall be referenced by a Virtual Address. As each structure is updated, its corresponding entry in the VAT ICB shall be updated. The VAT shall be recorded as a sequence of Uint32 entries in a file. Each entry shall be the offset, in sectors, into the physical partition in which the VAT is located. The first entry shall be for the virtual partition sector 0, the second entry for virtual partition sector 1, etc. The Uint32 entries shall follow the VAT header. The entry for the previous VAT ICB allows for viewing the file system as it appeared in an earlier state. If this field is #FFFFFFFF, then no such ICB is specified. Virtual Allocation Table structure Offset 0 2 4 132 136 140 144 146 148 150 152 152 + L_IU 156 + L_IU Information Length - 4 Length 2 2 128 4 4 4 2 2 2 2 L_IU 4 4 4 Name Length of Header (=L_HD) Length of Implementation Use (=L_IU) Logical Volume Identifier Previous VAT ICB location Number of Files Number of Directories Minimum UDF Read Revision Minimum UDF Write Revision Maximum UDF Write Revision Reserved Implementation Use VAT entry 0 VAT entry 1 VAT entry n Contents Uint16 Uint16 dstring Uint32 Uint32 Uint32 Uint16 Uint16 Uint16 #00 bytes bytes Uint32 Uint32 Uint32
Length of Header - Indicates the amount of data preceding the VAT entries. This value shall be 152 + L_IU. Length of Implementation Use - Shall specify the number of bytes in the Implementation Use field. If this field is non-zero, the value shall be at least 32 and be an integral multiple of 4.
UDF 2.60
35
March 1, 2005
Logical Volume Identifier - Shall identify the logical volume. This field shall be used by implementations instead of the corresponding field in the Logical Volume Descriptor. The value of this field should be the same as the field in the LVD until changed by the user. Previous VAT ICB Location - Shall specify the logical block number of an earlier VAT ICB in the partition identified by the Partition Map entry. If this field is #FFFFFFFF, no such ICB is specified. Number of Files - Defined in 2.2.6.4. The contents of this field shall be used instead of the corresponding LVID field. Number of Directories - Defined in 2.2.6.4. The contents of this field shall be used instead of the corresponding LVID field. Minimum UDF Read Revision - Defined in 2.2.6.4. The contents of this field shall be used instead of the corresponding LVID field. Minimum UDF Write Revision - Defined in 2.2.6.4. The contents of this field shall be used instead of the corresponding LVID field. Maximum UDF Write Revision - Defined in 2.2.6.4. The contents of this field shall be used instead of the corresponding LVID field. Implementation Use - If non-zero in length, shall begin with an EntityID identifying the usage of the remainder of the Implementation Use area. VAT Entry - VAT entry n shall identify the logical block number of the virtual block n. An entry of #FFFFFFFF indicates that the virtual sector is currently unused. The LBN specified is located in the partition identified by the Partition Map entry. The number of entries in the table can be determined from the VAT file size in the ICB: Number of entries = (Information Length - L_HD) / 4.
UDF 2.60
36
March 1, 2005
Sparing Tables point to space allocated for sparing and contains a list of mappings of defective sectors to their replacements. Separate copies of the Sparing Tables shall be recorded in separate packets. All instances of the Sparing Table shall be kept up to date. Partitions map logical space to physical space. Normally, this is a linear mapping where an offset and a length are specified. A sparable partition is based on this mapping, where the offset and length of a partition within physical space is specified by a Partition Descriptor (see 2.2.14). A sparable partition shall begin and end on a packet boundary. The Sparing Table further specifies an exception list of logical to physical mappings. All mappings are one fixed packet or ECC block in length. The Packet Length (in blocks) is specified in the Sparable Partition Map. Available sparing areas and instances of the Sparing Table may be anywhere on the media, either inside or outside of a partition. If overlapping with a partition, the overlapping part shall be marked as allocated and shall be included in the NonAllocatable Space Stream. The mapped locations should be filled in at format time; the original locations are assigned dynamically as errors occur. Each Sparing Table shall be structured as shown below. BP
0 16 48 50 52 56
Length
16 32 2 2 4 8*RT_L
Contents
tag = 0 EntityID Uint16 #00 bytes Uint32 Map Entries
UDF 2.60
37
March 1, 2005
Original Location Logical Block Address of the packet to be spared. The address of a packet is the address of the first user data block of a packet. If this field is #FFFFFFFF, then this entry is available for sparing. If this field is #FFFFFFF0, then the corresponding mapped location is marked as defective and should not be used for mapping. Original Locations of #FFFFFFF1 through #FFFFFFFE are reserved. Mapped Location Physical Block Address of active data. Requests to the original packet location are redirected to the packet location identified here. All Mapped Location entries shall be valid, including those entries for which the Original Location is #FFFFFFF0, #FFFFFFFF, or reserved. If the mapped location overlaps a partition, that partition shall have that space marked as allocated and that space shall be part of the Non-Allocatable Space Stream.
The File Entries for the Metadata, Metadata Mirror and Metadata Bitmap files shall not be referenced by any structure other than the Metadata Partition Map and shall have a
UDF 2.60
38
March 1, 2005
File Link Count of 0. These files, when present, shall be recorded in the physical/sparable partition referenced by the Metadata Partition Map. The Metadata Partition Map (see 2.2.10) defines a partition space in which all metadata (FSD, ICBs, Allocation Descriptors, and directory data) shall be recorded, with the sole exception of the ICBs and data comprising the Metadata, Metadata Mirror, and Metadata Bitmap files as described above. File Entries describing directories or Stream Directories shall use either immediate allocation (i.e. the data is embedded in the File Entry - see ECMA 167 4/14.6.8 flag bits 0-2) or SHORT_ADs to describe the data space of the directory, since this data resides in the Metadata Partition along with the File Entry itself. File Entries describing any other type of file data (including Named Streams) shall use either immediate allocation, or LONG_ADs that shall reference the physical or sparable partition referenced by the Metadata Partition Map, to describe the data space of the file. In the special two partitions case mentioned in 2.2.10, with a read-only partition and an overwritable partition on one volume, the data space of the file or Named Stream may also be located in the read-only partition. The Extent Location field of any Allocation Descriptor referencing data recorded in the Metadata Partition shall be interpreted as a block offset into the Metadata File. For example logical block 40 in the Metadata Partition corresponds to byte offset (40 * logical block size) in the Metadata File, which in turn (through the Allocation Descriptors for the Metadata File) corresponds to some logical block in the associated physical/sparable partition. Implementations shall support both the duplicate and shared allocation modes for the Metadata Mirror File (see above and 2.2.10, Metadata Partition Map, Flags field). The File Entry for the Metadata Mirror shall be actively maintained along with the Metadata File File Entry, but should be updated after the Metadata File File Entry. If the Duplicate Metadata Flag is set in the Metadata Partition Map Flags field, the Metadata Mirror File shall be maintained dynamically so that it contains identical contents to the Metadata File at all times. Unused logical blocks in the Metadata File and Metadata Mirror File may not be identical. In this case blocks in the Metadata Partition may be read from the same offset in either the Metadata Mirror File or the Metadata File. Data should be written first to the Metadata File and second to the Metadata Mirror File. When the Duplicate Metadata Flag in the Metadata Partition Map Flags field is set, implementations and repair utilities should consider the Metadata File content to be primary over that of the Metadata Mirror File. For example, a repair utility could repair the volume based on metadata read from the Metadata File (excepting unreadable portions which would be read from the Mirror) and then replace the contents of the Metadata Mirror File with that of the (now consistent) Metadata File.
UDF 2.60
39
March 1, 2005
Logical blocks allocated to the Metadata or Metadata Mirror File shall be marked as allocated in the partition Unallocated Space Bitmap, therefore a mechanism to determine available blocks within the Metadata Partition is needed. This is accomplished through the Metadata Bitmap File. A Metadata Bitmap File shall not be recorded for a read-only partition and for a pseudo-overwritable partition.
LVD FSD (1,0) Type 1 map (ref 0) Type 2 map (ref 1) Metadata Partition. Duplicate MD Flag 1 MD File FE (0,0) MD Mirror FE (0,X) MD Bitmap FE (0,1) ...
Partition unallocated 0 space bitmap.
LBN 16 LBN 0
METADATA FILE FILE ENTRY (A) Allocation Descriptors (0,16,64) (0,256,32) MD BITMAP FILE FILE ENTRY (B) Allocation Descriptors (immediate)
FSD (D) Root Dir ICB (1,1) Sys. Stream Dir ICB (1,2) ...
Extent addresses shown in form (part ref, start lbn) or... (part ref, start lbn, length (blocks))
0
LBN 256
1 (unallocated)
LBN X
=
0
BIT 0 BIT 3
S B D
1 (unallocated)
BIT 95
NOTE: Because the Duplicate Metadata Flag is set in the metadata partition map, the mirror file has its own unique allocation. If this flag was not set, the Mirror File FE ADs would reference the same blocks as the Metadata File ADs.
NOTE: The LBN values used in the diagram above are for illustrative purposes only and are not fixed. The partition reference numbers used are determined by the order of the Partition Maps in the LVD. A more detailed description of these files and how they are used follows in section 2.2.13.1.
UDF 2.60
40
March 1, 2005
UDF 2.60
41
March 1, 2005
The File Entries for the Metadata File and Metadata Mirror File shall have NULL Stream Directory ICB and Extended Attribute ICB fields.
UDF 2.60
42
March 1, 2005
UDF 2.60
43
March 1, 2005
2.2.13.6 Recommended procedure for reclaiming space from the Metadata Partition
Blocks allocated to the Metadata File, and its mirror, shall only be returned to the volume in one of the following two ways: Truncation of the Metadata File and its mirror. Marking the AD(s) for a region of the Metadata File, and its mirror, as sparse (not allocated) and setting the corresponding bits in the Metadata Bitmap File to zero, indicating these blocks are not available for use. Any region to be removed shall: Currently contain no referenced metadata (i.e. all corresponding bits in the Metadata Bitmap File shall already be set (one)). Match the size/alignment restrictions laid down in section 2.2.13.1. In the truncation case (Metadata Partition being truncated): 1. Update the SBD in the Metadata Bitmap File to reduce the bitmap size. 2. Update the Metadata Bitmap File File Entry Information Length to reflect the decreased bitmap size. 3. Update the Metadata File, and mirror, File Entry Information Length fields to remove the region. 4. Mark the de-allocated blocks as available in the partition Unallocated Space Bitmap. In the mark sparse case (region in middle of Metadata Partition being removed): 1. Clear the corresponding bits in the Metadata Bitmap File to zero. 2. Generate sparse (not allocated) Allocation Descriptor(s) in the Metadata File (and its mirror) for the region being de-allocated. 3. Mark the de-allocated blocks as available in the partition Unallocated Space Bitmap.
UDF 2.60
44
March 1, 2005
UDF 2.60
45
March 1, 2005
read-only partition (e.g. an overwritable partition on a Write-Once medium or in a Read-Only drive). NOTE: The above rule is important in order to enable read-only access by a UDF 2.50 implementation for media with a higher UDF revision (e.g. UDF 2.60) using a pseudo-overwritable partition and a Minimum UDF Read Revision value of 2.50.
UDF 2.60
46
March 1, 2005
NOTE: The value zero for TagIdentifier is not defined by ECMA 167, but it is used by UDF for the Sparing Table.
UDF 2.60
47
March 1, 2005
UDF 2.60
48
March 1, 2005
UDF 2.60
49
March 1, 2005
This field shall indicate that the scope of this File Set Descriptor conforms to the domain defined in this document, therefore the Domain Identifier ID value shall be set to: "*OSTA UDF Compliant" As described in section 2.1.5 on Entity Identifier the Identifier Suffix field of this EntityID shall contain the revision of this document for which the contents of the Logical Volume is compatible. For more information on the proper handling of this field see section 2.1.5. NOTE: The Identifier Suffix field of this EntityID SoftWriteProtect and HardWriteProtect flags. contains
UDF 2.60
50
March 1, 2005
UDF 2.60
51
March 1, 2005
In order to assist a UDF implementation that may have read the standard without this interpretation, implementations shall follow these rules when a FIDs Deleted bit is set: If the compression ID of the File Identifier is 8, rewrite the compression ID to 254. If the compression ID of the File Identifier is 16, rewrite the compression ID to 255. Leave the remaining bytes of the File Identifier unchanged In this way a utility wishing to undelete a file or directory can recover the original name by reversing the rewrite of the compression ID. NOTE: Implementations should re-use FIDs that have the Deleted bit set to one and ICBs set to zero in order to avoid growing the size of the directory unnecessarily. 2.3.4.2.2 Parent bit and Directory bit There is a flaw in the following statement in ECMA 167 4/14.4.3, below figure 13: If the Parent bit is set to ONE, then the Directory bit shall be set to ONE. In spite of this statement, the Directory bit in a parent FID shall only be set to ONE if the FID identifies a directory or the System Stream Directory. If the parent FID identifies a file, the Directory bit shall be set to ZERO. The latter is the case for a parent FID in a Stream Directory that is attached to a file.
Section 3.2.1 Logical Volume Header Descriptor describes how UDF UniqueID field in Implementation Use bytes of the long_ad in the File Identifier Descriptor and the UniqueID field in the File Entry and Extended File Entry are set.
UDF 2.60
52
March 1, 2005
UDF 2.60
53
March 1, 2005
2.3.5.3 ParentICBLocation
For ICB Strategy Type 4 this field shall not be used and contain all zero bytes. For ICB Strategy Type 4096 the use of this field is optional. NOTE: In ECMA 167-4/14.6.7 it states, If this field contains 0, then no such ICB is specified. This is a flaw in the ECMA 167 standard in that an implementation could store an ICB at logical block address 0. Therefore, if you decide to use this field, do not store an ICB at logical block address 0.
UDF 2.60
54
March 1, 2005
UDF 2.60
55
March 1, 2005
NOTE 1: The total length of a File Entry shall not exceed the size of one logical block. NOTE 2: If a Metadata Partition Map is recorded in a volume then all File Entries, Allocation Descriptor Extents and directory data shall be recorded in the Metadata Partition i.e. in logical blocks allocated to the Metadata and/or Metadata Mirror File (see section 2.2.13 for details including exceptions).
UDF 2.60
56
March 1, 2005
UDF 2.60
57
March 1, 2005
UDF 2.60
58
March 1, 2005
UDF 2.60
identifying file data, directories, or stream data shall identify physical space. ICBs recorded in virtual space shall use long_ad Allocation Descriptors to identify physical space. The use of short_ad Allocation Descriptors would identify file data in virtual space if the ICB were in virtual space. Descriptors recorded in virtual space shall have the virtual logical block number recorded in the Tag Location field.
NOTE 4: For volumes in which a Metadata Partition Map is recorded: Allocation Descriptors identifying directory or stream directory data shall identify metadata space. Allocation Descriptors identifying file or stream data shall identify physical space. Allocation Descriptors recorded in metadata space shall use SHORT_ADs when identifying extents also in metadata space. Allocation Descriptors having an extent type of 3 (continuation) shall identify an extent in the same partition in which the type 3 descriptor itself is recorded. Descriptors recorded in metadata space shall have their metadata space logical block number recorded in their descriptor tag Tag Location field, if applicable. /* ECMA 167 4/14.14.2 */ ExtentLength; ExtentLocation; ImplementationUse[6];
To allow use of the ImplementationUse field by UDF and also by implementations the following structure shall be recorded within the 6-byte Implementation Use field.
struct ADImpUse { Uint16 flags; byte impUse[4]; } /* * ADImpUse Flags (NOTE: bits 1-15 reserved for future use by UDF) */ #define EXTENTErased (0x01)
In the interests of efficiency on Rewritable media that benefits from preprocessing, the EXTENTErased flag shall be set to ONE to indicate an erased extent. This applies only to extents of type not recorded but allocated.
UDF 2.60
60
March 1, 2005
UDF 2.60
61
March 1, 2005
2.3.12 Pathname
2.3.12.1 Path Component
struct PathComponent { Uint8 Uint8 Uint16 char } /* ECMA 167 4/14.16.1 */ ComponentType; LengthofComponentIdentifier; ComponentFileVersionNumber; ComponentIdentifier[ ];
2.3.12.1.1 Uint16 ComponentFileVersionNumber There shall be only one version of a file as specified below with the value being set to ZERO. Shall be set to ZERO.
UDF 2.60
62
March 1, 2005
3.1.1.1 Uint8
Centiseconds;
For operating systems that do not support the concept of centiseconds the implementation shall ignore this field. For operating systems that do not support the concept of centiseconds the implementation shall set this field to ZERO.
3.1.1.2 Uint8
HundredsofMicroseconds;
For operating systems that do not support the concept of hundreds of Microseconds the implementation shall ignore this field. For operating systems that do not support the concept of a hundreds of Microseconds the implementation shall set this field to ZERO.
3.1.1.3 Uint8
Microseconds;
For operating systems that do not support the concept of microseconds the implementation shall ignore this field. For operating systems that do not support the concept of microseconds the implementation shall set this field to ZERO.
UDF 2.60
63
March 1, 2005
UDF 2.60
64
March 1, 2005
the File Identifier Descriptor (see 2.3.4.3), and UniqueID is incremented by the policy described above. When a name is linked to an existing file or directory, the lower 32-bits of Next UniqueID are assigned to UDF UniqueID in the Implementation Use bytes of the ICB field in the File Identifier Descriptor (see 2.3.4.3), and UniqueID is incremented by the policy described above. The lower 32-bits shall be the same in the File Entry/Extended File Entry and its first File Identifier Descriptor, but they shall differ in subsequent FIDs. All UDF implementations shall maintain the UDF UniqueID in the FID and UniqueID in the FE/EFE as described in this section. The LVHD in a closed Logical Volume Integrity Descriptor shall have a valid UniqueID. For file systems using a VAT, the function of the LVHD UniqueID field in the LVID is taken over by the VAT ICB File Entry UniqueID field with the addition that the first UniqueID value to be used for newly created objects will be the VAT ICB UniqueID value incremented once according to the incrementing policy described for Next UniqueID above in this section. In this way, no other object will have the same UniqueID value as the VAT ICB File Entry.
UDF 2.60
65
March 1, 2005
UDF 2.60
66
March 1, 2005
UDF 2.60
67
March 1, 2005
A file is written to (the contents of the data associated with a file are modified). An Extended Attribute associated with the file is modified. A Named Stream associated with a file is modified.
Bit 8 (Sticky): Ignored. Shall be set to ZERO. Bit 10 (System): Ignored. Shall be set to ZERO. 3.3.2.1.3 UNIX Bits 6, 7 & 8 (Setuid, Setgid, Sticky): These bits are mapped to/from the corresponding standard UNIX file system bits. Bit 10 (System): Ignored. Shall be set to ZERO upon file creation only, otherwise maintained. 3.3.2.1.4 OS/400 Bits 6 & 7 (Setuid & Setgid): Ignored. In the interests of maintaining security under environments, which do support these bits; bits 6 and 7 shall be set to ZERO if any one of the following conditions are true: A file is created. The attributes/permissions associated with a file, are modified. A file is written to (the contents of the data associated with a file are modified). An Extended Attribute associated with the file is modified. A Named Stream associated with a file is modified. Bit 8 (Sticky): Ignored. Shall be set to ZERO. Bit 10 (System): Ignored. Shall be set to ZERO upon file creation only, otherwise maintained.
UDF 2.60
68
March 1, 2005
NOTE: The total length of a File Entry shall not exceed the size of one logical block.
UDF 2.60
69
March 1, 2005
For operating systems that do not support the concept of a group identifier the implementation shall set this field to 232 - 1 to indicate an invalid GID, unless otherwise specified by the user.
The concept of permissions that deals with security is not completely portable between operating systems. This document attempts to maintain consistency among implementations in processing the permission bits by addressing the following basic issues: 1. How should an implementation handle Owner, Group and Other permissions when the operating system has no concept of User and Group Ids? 2. How should an implementation process permission bits when encountered, specifically permission bits that do not directly map to an operating system supported permission bit? 3. What default values should be used for permission bits that do not directly map to an operating system supported permission bit when creating a new file?
UDF 2.60
70
March 1, 2005
would be considered writable if the logical OR of OWNER_Write, GROUP_Write and OTHER_Write was equal to one. When setting a specific permission the implementation should set all three (owner, group, other) sets of permission bits. For example to mark a file as writable the OWNER_Write, GROUP_Write and OTHER_Write should all be set to one.
0 1 1 1 Note 2 Note 2
0 1 1 1 Note 2 Note 2
0 1 1 1 Note 2 Note 2
0 1 1 1 Note 2 Note 2
0 1 1 1 Note 2 Note 2
NOTE 1: Under UNIX only the owner of a file/directory may change its attributes. Under OS/400 if a file or directory is marked as writable (Write permission set) then the Attribute permission bit should be set. NOTE 2: The Delete permission bit should be set based upon the status of the Write permission bit. Under DOS, OS/2 and Macintosh, if a file or directory is marked as writable (Write permission set) then the file is considered deletable and the Delete permission bit should be set. If a file is Read-Only then the Delete permission bit should not be set. This applies to file create as well as changing attributes of a file.
Processing Permissions
Implementation shall process the permission bits according to the following table that describes how to process the permission bits under the operating systems covered by this document. The table addresses the issues associated with permission bits that do not directly map to an operating system supported permission bit.
UDF 2.60
71
March 1, 2005
Description The file may be read The directory may be read The files contents may be modified Files or subdirectories may be created, deleted or renamed The file may be executed. The directory may be searched for a specific file or subdirectory. The files permissions may be changed. The directorys permissions may be changed. The file may be deleted. The directory may be deleted.
DOS E E E E I E E E E E
OS/2 E E E E I E E E E E
Win 95 E E E E I E E E E E
Win NT E E E E I E E E E E
Mac OS E I E E I E E E E E
UNIX E E E E E E I I I I
OS/400 E E E E I E I I I I
The Execute bit for a directory, sometimes referred to as the search bit, has special meaning. This bit enables a directory to be searched, but not have its contents listed. For example assume a directory called PRIVATE exists which only has the Execute permission and does not have the Read permission bit set. The contents of the directory PRIVATE can not be listed. Assume there is a file within the PRIVATE directory called README. The user can get access to the README file since the PRIVATE directory is searchable. To be able to list the contents of a directory both the Read and Execute permission bits must be set for the directory. To be able to create, delete and rename a file or subdirectory both the Write and Execute permission bits must be set for the directory. To get a better understanding of the Execute bit for a directory reference any UNIX book that covers file and directory permissions. The rules defined by the Execute bit for a directory shall be enforced by all implementations. The exception to this rule applies to Macintosh implementations. A Macintosh implementation may ignore the status of the Read bit in determining the accessibility of a directory NOTE 3: To be able to delete a file or subdirectory the Delete permission bit for the file or subdirectory must be set, and both the Write and Execute permission bits must be set for the directory it occupies.
UDF 2.60
72
March 1, 2005
UDF 2.60
73
March 1, 2005
3.3.4.3.1 byte FileTimes If this field contains a file creation time it shall be interpreted as the creation time of the associated file. If the main File Entry is an Extended File Entry, the file creation time in this structure shall be ignored and the file creation time from the main File Entry shall be used. If the main File Entry is an Extended File Entry, this structure shall not be recorded with a file creation time. If the main File Entry is not an Extended File Entry and the File Times Extended Attribute does not exist or does not contain the file creation time then an implementation shall use the Modification Time field of the File Entry to represent the file creation time.
UDF 2.60
74
March 1, 2005
UDF 2.60
75
March 1, 2005
UDF 2.60
76
March 1, 2005
The ImplementationUse area for this extended attribute shall be structured as follows: FreeEASpace format Name
Header Checksum Free EA Space
RBP
0 2
Length
2 IU_L-2
Contents
Uint16 bytes
This extended attribute allows an implementation to shrink/grow the total size of other extended attributes without rewriting the complete Extended Attributes Space. The FreeEASpace extended attribute may be overwritten and the space re-used by any implementation that sees a need to overwrite it. 3.3.4.5.1.2 DVD Copyright Management Information This extended attribute shall be used to store DVD Copyright Management Information. This extended attribute shall be stored as an Implementation Use Extended Attribute whose ImplementationIdentifier shall be set to: "*UDF DVD CGMS Info" The ImplementationUse area for this extended attribute shall be structured as follows: DVD CGMS Info format Name
Header Checksum CGMS Information Data Structure Type Protection System Information
RBP
0 2 3 4
Length
2 1 1 4
Contents
Uint16 byte Uint8 bytes
This extended attribute allows DVD Copyright Management Information to be stored. The interpretation of this format shall be defined in the DVD specification published by the DVD Format/Logo Licensing Corporation, see 6.9.3. Support for this extended attribute is optional. MS-DOS, Windows 95, Windows NT Ignored. Not supported. Extended attributes for existing files on the media shall be preserved.
3.3.4.5.2
UDF 2.60
77
March 1, 2005
3.3.4.5.3 OS/2 OS/2 supports an unlimited number of extended attributes, which shall be stored as a Named Stream as defined in 3.3.8.2. To enhance performance the following Implementation Use Extended Attribute will be created. 3.3.4.5.3.1 OS2EALength This attribute specifies the OS/2 Extended Attribute Stream (3.3.8.2) information length. Since this value needs to be reported back to OS/2 under certain directory operations, for performance reasons it should be recorded in the ExtendedAttributes field of the File Entry. This extended attribute shall be stored as an Implementation Use Extended Attribute whose ImplementationIdentifier shall be set to: "*UDF OS/2 EALength" The ImplementationUse area for this extended attribute shall be structured as follows: OS2EALength format Name
Header Checksum OS/2 Extended Attribute Length
RBP
0 2
Length
2 4
Contents
Uint16 Uint32
The value recorded in the OS2ExtendedAttributeLength field shall be equal to the Information Length field of the File Entry for the OS2EA stream. 3.3.4.5.4 Macintosh OS The Macintosh OS requires the use of the following extended attributes. 3.3.4.5.4.1 MacVolumeInfo This extended attribute contains Macintosh volume information which shall be stored as an Implementation Use Extended Attribute whose ImplementationIdentifier shall be set to: "*UDF Mac VolumeInfo" The ImplementationUse area for this extended attribute shall be structured as follows: MacVolumeInfo format Name
Header Checksum Last Modification Date Last Backup Date Volume Finder Information
RBP
0 2 14 26
Length
2 12 12 32
Contents
Uint16 Timestamp Timestamp Uint32
UDF 2.60
78
March 1, 2005
The MacVolumeInfo extended attribute shall be recorded as an extended attribute of the root directory File Entry. 3.3.4.5.4.2 MacFinderInfo This extended attribute contains Macintosh Finder information for the associated file or directory. Since this information is accessed frequently, for performance reasons it should be recorded in the ExtendedAttributes field of the File Entry. The MacFinderInfo extended attribute shall be stored as an Implementation Use Extended Attribute whose ImplementationIdentifier shall be set to: "*UDF Mac FinderInfo" The ImplementationUse area for this extended attribute shall be structured as follows: MacFinderInfo format for a directory Length Name
2 2 4 16 16 Header Checksum Reserved for padding Parent Directory ID Directory Information Directory Extended Information
RBP
0 2 4 8 24
Contents
Uint16 Uint16 = 0 Uint32 UDFDInfo UDFDXInfo
RBP
0 2 4 8 24 40 44
Length
2 2 4 16 16 4 4
Contents
Uint16 Uint16 = 0 Uint32 UDFFInfo UDFFXInfo Uint32 Uint32
The MacFinderInfo extended attribute shall be recorded as an extended attribute of every file and directory within the Logical Volume. The following structures used within the MacFinderInfo structure are listed below for clarity. For complete information on these structures refer to the Macintosh books called Inside Macintosh. The volume and page number listed with each structure correspond to a specific Inside Macintosh volume and page.
UDF 2.60
79
March 1, 2005
RBP
0 2
Contents
Int16 Int16
RBP
0 2 4 6
Contents
Int16 Int16 Int16 Int16
RBP
0 8 10 14
Contents
UDFRect Int16 UDFPoint Int16
RBP
0 4 8 9 10 12
Contents
UDFPoint Int32 Uint8 Uint8 Int16 Int32
RBP
0 4 8 10 14
Contents
Uint32 Uint32 Uint16 UDFPoint Int16
RBP
0 2 8 9 10 12
Contents
Int16 bytes Int8 Int8 Int16 Int32
NOTE: The above-mentioned structures have their original Macintosh names preceded by UDF to indicate that they are actually different
UDF 2.60
80
March 1, 2005
from the original Macintosh structures. On the media the UDF structures are stored little endian as opposed to the original Macintosh structures that are in big endian format. 3.3.4.5.5 UNIX Ignored. Not supported. Extended attributes for existing files on the media shall be preserved. 3.3.4.5.6 OS/400 OS/400 requires the use of the following extended attributes. 3.3.4.5.6.1 OS400DirInfo This attribute specifies the OS/400 extended directory information. Since this value needs to be reported back to OS/400 for normal directory information processing, for performance reasons it should be recorded in the ExtendedAttributes field of the File Entry. This extended attribute shall be stored as an Implementation Use Extended Attribute whose ImplementationIdentifier shall be set to: *UDF OS/400 DirInfo. The ImplementationUse area for this extended attribute shall be structured as follows: OS400DirInfo format Name
Header Checksum Reserved for padding DirectoryInfo
RBP
0 2 4
Length
2 2 44
Contents
Uint16 Uint16 = 0 bytes
For complete information on the structure of the DirectoryInfo field recorded in the OS400DirInfo format, refer to the following IBM document: IBM OS/400 UDF Implementation Optical Storage Solutions, Department HTT IBM Rochester, Minnesota
UDF 2.60
81
March 1, 2005
UDF 2.60
82
March 1, 2005
The ApplicationUse area for this extended attribute shall be structured as follows: FreeAppEASpace format Length Name 2 Header Checksum IU_L-2 Free EA Space
RBP 0 2
This extended attribute allows an implementation to shrink/grow the total size of other extended attributes without rewriting the complete Extended Attributes Space. The FreeAppEASpace extended attribute may be overwritten and the space re-used by any implementation who sees a need to overwrite it.
UDF 2.60
83
March 1, 2005
UDF 2.60
84
March 1, 2005
The modification time field of the main Extended File Entry should be updated whenever any associated named stream is modified. The Access Time field of the main Extended File Entry should be updated whenever any associated named stream is accessed. The SETUID and SETGID bits of the ICB Tag flags field in the main Extended File Entry should be cleared whenever any associated named stream is modified. The ICB for a Named Stream directory shall have a file type of 13. All Named Streams shall have a file type of 5. All systems shall make the main data stream available, even on implementations that do not implement Named Streams.
UDF 2.60
85
March 1, 2005
Since the System Streams listed above have the Metadata flag set, the implementation shall not pass the name of the System Stream across the plug-in file system interface of a platform.
For implementations which perform incremental updates of volumes on Write-Once or Rewritable media (e.g., on-line file systems), the following rules apply: May be created and maintained if not present Shall be maintained if present and volume is clean Should be repaired and maintained, but may be deleted, if present and volume is dirty
For these rules, a volume is clean if either a valid Close Logical Volume Integrity Descriptor or a valid Virtual Allocation Table is recorded.
UDF 2.60
86
March 1, 2005
3.3.7.1.1 UDF Unique ID Mapping Data The contents of the Unique ID Mapping Stream are described by the tables UDF Unique ID Mapping Data and UDF Unique ID Mapping Entry. The mapping data contains some header fields before an array of mapping entries. The fields of these structures are described below their corresponding table. UDF Unique ID Mapping Data
RBP 0 32 36 40 48 Length 32 4 4 8 16*MEC Name Implementation Identifier Flags Mapping Entry Count (=MEC) Reserved Mapping Entries Contents EntityID Uint32 Uint32 Bytes (= #00) IDMappingEntry
Index Bit set to ONE is called Index Mode. In Index Mode, the UDF UniqueID, once decremented by 16 (the value Next UniqueID is initialized to), can be used as an index into the array Mapping Entries. Mapping Entry Count is the size, in entries, of the array Mapping Entries. Mapping Entries is an array of UDF Unique ID Mapping Entry structures. There is one mapping entry for every non-stream, non-parent File Identifier Descriptor. Whenever the volume is consistent, the array is always sorted in ascending order of UDF UniqueID. 3.3.7.1.2 UDF Unique ID Mapping Entry UDF Unique ID Mapping Entry
RBP 0 4 8 12 14 Length 4 4 4 2 2 Name UDF Unique ID Parent Logical Block Number Object Logical Block Number Parent Partition Reference Number Object Partition Reference Number Contents Uint32 Uint32 Uint32 Uint16 Uint16
UDF Unique ID is the value found in the FID identifying the object. Parent Logical Block Number is the logical block number of the ICB identifying the directory that contains the FID identifying the object.
UDF 2.60
87
March 1, 2005
Object Logical Block Number is the logical block number from the long_ad ICB field of the FID identifying the object. Parent Partition Reference Number is the partition reference number of the ICB identifying the directory that contains the FID identifying the object. Object Partition Reference Number is the partition reference number from the long_ad ICB field of the FID identifying the object. In Index Mode, the first entry has a UDF Unique ID of 16 and subsequent entries are required to have a UDF Unique ID value of one more than the preceding entry. If not in Index Mode, invalid entries may be removed in order to shrink the array. Invalid entries are represented by having a value of zero in all fields, except the UDF Unique ID field. Invalid entries are the result of objects that were deleted from the medium or entries at the end of the Mapping Entries array that are not yet in use. There shall only be valid entries for non-stream, non-parent FIDs. NOTE: The UDF Unique ID value of a mapping entry for an object needs not be equal to the Unique ID value found in the File Entry of the object. The correctness of a mapping entry can be verified performing the following steps: 1. Read the File Entry of the parent directory of the object using the Parent Logical Block Number and the Parent Partition Reference Number of the mapping entry. 2. Find in the parent directory a FID with a UDF Unique ID value equal to the UDF Unique ID of the mapping entry. 3. The long_ad ICB field of this FID shall contain logical block number and partition reference number values equal to the Object Logical Block Number and Object Partition Reference Number values of the mapping entry respectively.
UDF 2.60
88
March 1, 2005
The stream shall be marked with the attributes Metadata (bit 4 of file characteristics set to ONE) and System (bit 10 of ICB Tag flags field set to ONE). The stream's Allocation Descriptors shall identify all non-allocatable packets. The Allocation Descriptors shall have allocation type 1 (allocated but not recorded). The Information Length in the File Entry of this stream shall be zero; so all Allocation Descriptors are in the file tail. This stream shall include both defective packets found at format time and space allocated for sparing at format time.
UDF 2.60
89
March 1, 2005
power calibration settings which have been used by various drives and/or hosts, under various conditions, to record data on this disc, as well as other relevant information which may be used to determine which of the recorded calibration settings may be appropriate for use in a future situation. While every effort has been made to anticipate and include all necessary information to make effective use of the recorded power calibration information possible, it is up to the individual implementation to determine if, when and how such information will actually be used. The Power Calibration Table may be recorded as a System Stream of the File Set Descriptor according to the rules of 3.3.5. The name of the System Stream shall be as follows: *UDF Power Cal Table Implementations that do not support the Power Calibration Table shall not delete this System Stream. Further, any implementation which supports and/or uses the Power Calibration Table shall not delete or modify any records from such table which the implementation, through its use thereof, did not clearly and specifically obsolete or update. The stream shall be formatted as follows: 3.3.7.3.1 Power Calibration Table Stream RBP 0 32 36 Length 32 4 * Name Implementation Identifier Number of Records Power Calibration Table Records Contents EntityID [ UDF 2.1.5] Uint32 [1/7.1.5] bytes
Implementation Identifier: See UDF section 2.1.5. Number of Records: Shall specify the number of records contained in the power calibration table Power Calibration Table Records: A series of power calibration table records for drives which have written to this disc. The length of this table is variable, but shall be a multiple of four bytes. Recording of data in any unstructured field shall be left justified and padded on the right with #20 bytes.
UDF 2.60
90
March 1, 2005
Length 2 2 32 16 4 16 8 12 12 2 6 [DUA_L]
Power Calibration Table Record Layout Name Record Length Drive Unique Area Length [DUA_L] Vendor ID Product ID Firmware Revision Level Serial Number/Device Unique ID Host ID Originating TimeStamp Updated TimeStamp Speed Power Calibration Values Drive Unique Area
Contents Uint16 [1/7.1.3] Uint16 [1/7.1.3] bytes bytes bytes bytes bytes Timestamp [1/7.3] Timestamp [1/7.3] Uint16 [1/7.1.3] bytes bytes
Record Length The length of this Power Calibration Table Record in bytes, including the optional variable length Drive Unique Area. Shall be a multiple of four bytes. Drive Unique Area Length The length of the optional Drive Unique Area recorded at the end of this record in bytes. Shall be a multiple of four bytes. Vendor ID The Vendor ID reported by the drive. Product ID The Product ID reported by the drive. Firmware Revision Level The Firmware Revision Level reported by the drive. Serial Number/Device Unique ID A serial number or other unique identifier for the specific drive, of the model specified by the vendor and product Ids given, which has successfully used the power calibration values reported herein to record data on this disc. Host ID The host serial number, ethernet ID, or other value (or combination of values) used by an implementation to identify the specific host computer to which the drive was attached when it successfully used the power calibration values reported herein to record data on this disc. An implementation shall attempt to provide a unique value for each host, but is not required to guarantee the values uniqueness. Originating TimeStamp The date and time at which the power calibration values recorded herein were initially verified to have been successfully used.
UDF 2.60
91
March 1, 2005
Updated TimeStamp The date and time at which the power calibration values recorded herein were most recently verified to have been successfully used. Speed The recording speed, as reported by the drive, at which power calibration values recorded herein were successfully used. This value is the number of kilobytes per second (bytes per second / 1000) that the data was written to the disc by the drive (truncating any fractions). For example, a speed of 176 means data was written to the disc at 176 Kbytes/second, which is the basic CD-DA (Digital Audio) data rate (a.k.a. 1X for CD-DA). A speed of 353 means data was written to the disc at 353 Kbytes/second, or twice the basic CD-DA data rate (a.k.a. 2X for CD-DA). CD-ROM recording rates should be adjusted upward (roughly 15%) to the corresponding CD-DA rates to determine the correct speed value (e.g. A 1X CD-ROM data rate should be recorded as a 1X CD-DA, which is a speed of 176). Note that these are raw data rates and do not reflect all overhead resulting from (additional) headers, error correction data, etc. Power Calibration Values The vendor-specific power calibration values reported by the drive. Drive Unique Area Optional area for recording unrestricted information unique to the drive (such as drive operating temperature), which certain implementations may use to enhance the use of the recorded power calibration information or the operation of the associated drive. The drive manufacturer shall define recording of data in this field. This area shall be an integral multiple of four bytes in length.
Backup Time is the latest time that a backup of this volume was performed.
UDF 2.60
92
March 1, 2005
RBP
0 1 2 4 4+L_N
Length
1 1 2 L_N L_V
Contents
Uint8 Uint8 Uint16 bytes bytes
For a complete description of Full EAs (FEA) please reference the following IBM document: Installable File System for OS/2 Version 2.0 OS/2 File Systems Department PSPC Boca Raton, Florida February 17, 1992
UDF 2.60
93
March 1, 2005
UDF 2.60
94
March 1, 2005
4.2.1.1 FileType
Any open/close/read/write requests for file(s) that have any of the following values in this field shall result in an Access Denied error condition under nonUNIX operating system environments: File Type values 0 (Unknown), 6 (block device), 7 (character device), 9 (FIFO), and 10 (C_ISSOCK). Any open/close/read/write requests to a file of type 12 (Symbolic Link) shall access the file/directory to which the symbolic link is pointing.
UDF 2.60
95
March 1, 2005
96
March 1, 2005
supported the user of the implementation shall be provided with a method to select the UDF translation algorithms. It is recommended that the default displayable algorithm be the UDF defined algorithm. The primary goal of these algorithms is to produce a unique file name that meets the specific operating system restrictions without having to scan the entire directory in which the file resides. C source code for the following algorithms may be found in appendix 6.7 of this document. NOTE 1: In the definition of the following algorithms anytime a d-character is specified in quotes, the Unicode hexadecimal value will also be specified. The following algorithms reference CS0 Hex representation, which corresponds to using the Unicode values #0030 - #0039, and #0041 - #0046 to represent a value in hex. In addition, the following algorithms reference CS0 Base41 representation, which corresponds to augmenting the CS0 Hex representation to use #0047 - #005A, #0023, #005F, #007E, #002D and #0040 to represent digits 16-40. The following algorithms could still result in name-collisions being reported to the user of an implementation. However, the rationale includes the need for efficient access to the contents of a directory and consistent name translations across logical volume mounts and file system driver implementations, while allowing the user to obtain access to any file within the directory (through possibly renaming a file). Some name transformations in section 4.2.2.1 result in two namespaces being visible at once in a given directory the space of primary names, those which are physically recorded in a directory; and the space of generated names, those which are derived from the primary names. This is distinct from transformations that take an otherwise illegal name and render it into a legal form, the illegal name not being considered part of the namespace of the directory on that system. For UDF implementations using such transforms, the implementation should search a directory in two passes: pass one should match against the primary namespace and pass two should match against the generated namespace. A match in the primary namespace should be preferred to a match against the generated namespace. Definitions: A FileIdentifier shall be considered as being composed of two parts, a file name and file extension. The character . (#002E) shall be considered as the separator for the FileIdentifier of a file; characters appearing subsequent to the last . (#002E) shall be considered as constituting the file extension if and only if it is less than or
UDF 2.60
97
March 1, 2005
equal to 5 characters in length, otherwise the file extension shall not exist. Characters appearing prior to the file extension, excluding the last . (#002E), shall be considered as constituting the file name. NOTE 2: Even though OS/2, Macintosh, and UNIX do not have an official concept of a filename extension it is common file naming conventions to end a file with . Followed by a 1 to 5 character extension. Therefore the following algorithms attempt to preserve the file extension up to a maximum of 5 characters. 4.2.2.1.1 MS-DOS Due to the restrictions imposed by the MS DOS operating system environments on the FileIdentifier associated with a file the following methodology shall be employed to handle FileIdentifier(s) under the above-mentioned operating system environments. Exception: Implementations on non-MS-DOS systems that may normally provide dual namespaces (8.3 and non-8.3) using this transformation may omit or provide a mechanism for disabling its use. Restrictions: The file name component of the FileIdentifier shall not exceed 8 characters. The file extension component of the FileIdentifier shall not exceed 3 characters. 1. FileIdentifier Lookup: Upon request for a lookup of a FileIdentifier, a caseinsensitive comparison shall be performed. 2. Validate FileIdentifier: If the FileIdentifier is a valid MS-DOS file identifier then do not apply the following steps. 3. Remove Spaces: All embedded spaces within the identifier shall be removed. 4. Invalid Characters: A FileIdentifier that contains characters considered invalid within a file name or file extension (as defined above), or not displayable in the current environment, shall have them translated into _ (#005F). (the File Identifier on the media is NOT modified). Multiple sequential invalid or non-displayable characters shall be translated into a single _ (#005F) character. Reference appendix 6.7.1 on invalid characters for a complete list. 5. Leading Periods: In the event that there do not exist any characters prior to the first . (#002E) character, leading . (#002E) characters shall be disregarded up to the first non . (#002E) character, in the application of this heuristic. 6. Multiple Periods: In the event that the FileIdentifier contains multiple . (#002E) characters, all characters appearing subsequent to the last . (#002E) shall be considered as constituting the file extension if and only if it is less than or equal to 5 characters in length, otherwise the file extension shall not
UDF 2.60
98
March 1, 2005
exist. Characters appearing prior to the file extension, excluding the last . (#002E), shall be considered as constituting the file name. All embedded . (#002E) characters within the file name shall be removed. 7. Long Extension: In the event that the number of characters constituting the file extension at this step in the process is greater than 3, the file extension shall be regarded as having been composed of the first 3 characters amongst the characters constituting the file extension at this step in the process. 8. Long Filename: In the event that the number of characters constituting the file name at this step in the process is greater than 8, the file name shall be truncated to 4 characters. 9. FileIdentifier CRC: Since through the above process character information from the original FileIdentifier is lost the chance of creating a duplicate FileIdentifier in the same directory increases. To greatly reduce the chance of having a duplicate FileIdentifier the file name shall be modified to contain a CRC of the original FileIdentifier. The file name shall be composed of the first 4 characters constituting the file name at this step in the process, followed by the separator # (#0023), followed by the 3 digit CS0 Base41 representation of the 16-bit CRC of the UNICODE expansion of the original filename. 10. The new file identifier shall be translated to all upper case. 4.2.2.1.2 OS/2 Due to the restrictions imposed by the OS/2 operating system environment, on the FileIdentifier associated with a file the following methodology shall be employed to handle FileIdentifier(s) under the above-mentioned operating system environment: 1. FileIdentifier Lookup: Upon request for a lookup of a FileIdentifier, a case-sensitive comparison may be performed. If the case-sensitive comparison is not done or if it fails, a case-insensitive comparison shall be performed. 2. Validate FileIdentifier: If the FileIdentifier is a valid OS/2 file identifier then do not apply the following steps. 3. Invalid Characters: A FileIdentifier that contains characters considered invalid within an OS/2 file name, or not displayable in the current environment shall have them translated into _ (#005F). Multiple sequential invalid or non-displayable characters shall be translated into a single _ (#005F) character. Reference appendix 6.7.2 on invalid characters for a complete list. 4. Trailing Periods and Spaces: All trailing . (#002E) and (#0020) shall be removed. 5. FileIdentifier CRC: Since through the above process character information from the original FileIdentifier is lost the chance of creating a duplicate
UDF 2.60
99
March 1, 2005
FileIdentifier in the same directory increases. To greatly reduce the chance of having a duplicate FileIdentifier the file name shall be modified to contain a CRC of the original FileIdentifier. If there is a file extension then the new FileIdentifier shall be composed of up to the first (254 (length of (new file extension) + 1 (for the .)) 5 (for the #CRC)) characters constituting the file name at this step in the process, followed by the separator # (#0023); followed by a 4 digit CS0 Hex representation of the 16-bit CRC of the original CS0 FileIdentifier, followed by . (#002E) and the file extension at this step in the process. Otherwise if there is no file extension the new FileIdentifier shall be composed of up to the first (254 5 (for the #CRC)) characters constituting the file name at this step in the process. Followed by the separator # (#0023); followed by a 4 digit CS0 Hex representation of the 16-bit CRC of the original CS0 FileIdentifier. 4.2.2.1.3 Macintosh Due to the restrictions imposed by the Macintosh operating system environment, on the FileIdentifier associated with a file the following methodology shall be employed to handle FileIdentifier(s) under the above-mentioned operating system environment: 1. FileIdentifier Lookup: Upon request for a lookup of a FileIdentifier, a case-sensitive comparison may be performed. If the case-sensitive comparison is not done or if it fails, a case-insensitive comparison shall be performed. 2. Validate FileIdentifier: If the FileIdentifier is a valid Macintosh file identifier then do not apply the following steps. 3. Invalid Characters: A FileIdentifier that contains characters considered invalid within a Macintosh file name, or not displayable in the current environment, shall have them translated into _ (#005F). Multiple sequential invalid or non-displayable characters shall be translated into a single _ (#005F) character. Reference appendix 6.7.2 on invalid characters for a complete list 4. Long FileIdentifier: In the event that the number of characters constituting the FileIdentifier at this step in the process is greater than 31 (maximum name length for the Macintosh operating system), the new FileIdentifier will consist of the first 26 characters of the FileIdentifier at this step in the process. 5. FileIdentifier CRC: Since through the above process character information from the original FileIdentifier is lost the chance of creating a duplicate FileIdentifier in the same directory increases. To greatly reduce the chance of having a duplicate FileIdentifier the file name shall be modified to contain a CRC of the original FileIdentifier.
UDF 2.60
100
March 1, 2005
If there is a file extension then the new FileIdentifier shall be composed of up to the first (31 (length of (new file extension) + 1 (for the .)) 5 (for the #CRC)) characters constituting the file name at this step in the process, followed by the separator # (#0023); followed by a 4 digit CS0 Hex representation of the 16-bit CRC of the original CS0 FileIdentifier, followed by . (#002E) and the file extension at this step in the process. Otherwise if there is no file extension the new FileIdentifier shall be composed of up to the first (31 5(for the #CRC)) characters constituting the file name at this step in the process. Followed by the separator # (#0023); followed by a 4 digit CS0 Hex representation of the 16-bit CRC of the original CS0 FileIdentifier. 4.2.2.1.4 Windows 95 & Windows NT Due to the restrictions imposed by the Windows 95 and Windows NT operating system environments, on the FileIdentifier associated with a file the following methodology shall be employed to handle FileIdentifier(s) under the abovementioned operating system environment: 1. FileIdentifier Lookup: Upon request for a lookup of a FileIdentifier, a case-sensitive comparison may be performed. If the case-sensitive comparison is not done or if it fails, a case-insensitive comparison shall be performed. 2. Validate FileIdentifier: If the FileIdentifier is a valid file identifier for Windows 95 or Windows NT then do not apply the following steps. 3. Invalid Characters: A FileIdentifier that contains characters considered invalid within a file name of the supported operating system, or not displayable in the current environment shall have them translated into _ (#005F). Multiple sequential invalid or non-displayable characters shall be translated into a single _ (#005F) character. Reference appendix 6.7.2 on invalid characters for a complete list. 4. Trailing Periods and Spaces: All trailing . (#002E) and (#0020) shall be removed. 5. FileIdentifier CRC: Since through the above process character information from the original FileIdentifier is lost the chance of creating a duplicate FileIdentifier in the same directory increases. To greatly reduce the chance of having a duplicate FileIdentifier the file name shall be modified to contain a CRC of the original FileIdentifier. If there is a file extension then the new FileIdentifier shall be composed of up to the first (255 (length of (new file extension) + 1 (for the .)) 5 (for the #CRC)) characters constituting the file name at this step in the process, followed by the separator # (#0023); followed by a 4 digit CS0 Hex representation of the 16-bit CRC of the original CS0 FileIdentifier, followed by . (#002E) and the file extension at this step in the process.
UDF 2.60
101
March 1, 2005
Otherwise if there is no file extension the new FileIdentifier shall be composed of up to the first (255 5 (for the #CRC)) characters constituting the file name at this step in the process. Followed by the separator # (#0023); followed by a 4 digit CS0 Hex representation of the 16-bit CRC of the original CS0 FileIdentifier. 4.2.2.1.5 UNIX Due to the restrictions imposed by UNIX operating system environments, on the FileIdentifier associated with a file the following methodology shall be employed to handle FileIdentifier(s) under the above-mentioned operating system environment: 1. FileIdentifier Lookup: Upon request for a lookup of a FileIdentifier, a casesensitive comparison shall be performed. 2. Validate FileIdentifier: If the FileIdentifier is a valid UNIX file identifier for the current system environment then do not apply the following steps. 3. Invalid Characters: A FileIdentifier that contains characters considered invalid within a UNIX file name for the current system environment, or not displayable in the current environment shall have them translated into _ (#005E). Multiple sequential invalid or non-displayable characters shall be translated into a single _ (#005E) character. Reference appendix 6.7.2 on invalid characters for a complete list 4. Long FileIdentifier: In the event that the number of characters constituting the FileIdentifier at this step in the process is greater than MAXNameLength (maximum name length for the specific UNIX operating system), the new FileIdentifier will consist of the first MAXNameLength-5 characters of the FileIdentifier at this step in the process. 5. FileIdentifier CRC: Since through the above process character information from the original FileIdentifier is lost the chance of creating a duplicate FileIdentifier in the same directory increases. To greatly reduce the chance of having a duplicate FileIdentifier the file name shall be modified to contain a CRC of the original FileIdentifier. If there is a file extension then the new FileIdentifier shall be composed of up to the first (MAXNameLength (length of (new file extension) + 1 (for the .)) 5 (for the #CRC)) characters constituting the file name at this step in the process, followed by the separator # (#0023); followed by a 4 digit CS0 Hex representation of the 16-bit CRC of the original CS0 FileIdentifier, followed by . (#002E) and the file extension at this step in the process. Otherwise if there is no file extension the new FileIdentifier shall be composed of up to the first (MAXNameLength 5 (for the #CRC)) characters constituting the file name at this step in the process. Followed by the separator # (#0023); followed by a 4 digit CS0 Hex representation of the 16bit CRC of the original CS0 FileIdentifier.
UDF 2.60
102
March 1, 2005
4.2.2.1.6 OS/400 Due to the restrictions imposed by OS/400 operating system environments, on the FileIdentifier associated with a file the following methodology shall be employed to handle FileIdentifier(s) under the above mentioned operating system environment. 1. FileIdentifier Lookup: Upon request for a lookup of a FileIdentifier, a casesensitive comparison may be performed. If the case-sensitive comparison is not done or if it fails, a case-insensitive comparision shall be performed. 2. Validate FileIdentifier: If the FileIdentifier is a valid file identifier for OS/400 then do not apply the following steps. 3. Invalid Characters: A FileIdentifier that contains characters considered invalid within an OS/400 file name, or not displayable in the current environment shall have them translated into _ (#005F). Multiple sequential invalid or non-displayable characters shall be translated into a single _ (#005F) character. 4. Trailing Spaces: All trailing (#0020) shall be removed. 5. FileIdentifier CRC: Since through the above process character information from the original FileIdentifier is lost the chance of creating a duplicate FileIdentifier in the same directory increases. To greatly reduce the chance of having a duplicate FileIdentifier the filename shall be modified to contain a CRC of the original FileIdentifier. If there is a file extension then the new FileIdentifier shall be composed of up to the first (255 (length of (new file extension) + 1 (for the .)) 5 (for the #CRC)) characters constituting the file name at this step in the process, followed by the separator # (#0023); followed by a 4 digit CS0 Hex representation of the 16-bit CRC of the original CS0 FileIdentifier, followed by . (#002E) and the file extension at this step in the process. Otherwise if there is no file extension the new FileIdentifier shall be composed of up to the first (255 5 (for the new #CRC)) characters constituting the file name at this step in the process. Followed by the separator # (#0023); followed by a 4 digit CS0 hex representation of the 16-bit CRC of the original CS0 FileIdentifier. NOTE: Invalid characters for OS/400 are only the forward slash / (#002F) character. Non-displayable characters for OS/400 are any characters that do not translate to code page 500 (EBCDIC Multilingual).
UDF 2.60
103
March 1, 2005
5. Informative
5.1 Descriptor Lengths
The following table summarizes the UDF limitations on the lengths of the Descriptors described in ECMA 167. Descriptor Anchor Volume Descriptor Pointer Volume Descriptor Pointer Implementation Use Volume Descriptor Primary Volume Descriptor Partition Descriptor Logical Volume Descriptor Unallocated Space Descriptor Terminating Descriptor Logical Volume Integrity Descriptor File Set Descriptor File Identifier Descriptor Allocation Extent Descriptor Indirect Entry Terminal Entry File Entry Extended File Entry Extended Attribute Header Descriptor Unallocated Space Entry Space Bitmap Descriptor Partition Integrity Entry Sparing Table Length in bytes 512 512 512 512 512 no max no max 512 no max 512 Maximum of a Logical Block Size 24 52 36 Maximum of a Logical Block Size Maximum of a Logical Block Size 24 Maximum of a Logical Block Size no max N/A no max
UDF 2.60
104
March 1, 2005
For the purposes of interchange, UDF must clarify the correct interpretation of this section. This part specifies that an unrecorded sector logically contains #00 bytes. However, the converse argument that a sector containing only #00 bytes is unrecorded is not implied, and such a sector is not an unrecorded sector for the purposes of ECMA 167. Only the standard governing the recording of sectors on the media can provide the rule for determining if a sector is unrecorded. For example, a blank check condition would provide correct determination for a WORM device. The following additional ECMA 167 sections reference the rule defined 3/8.1.2.2: 3/8.4.2, 3/8.8.2, 4/3.1, 4/8.3.1 and 4/8.10. By derivation, paragraph 6.6 (ICB Strategy Type 4096) is also affected. Since unrecorded sectors/blocks are terminating conditions for sequences of descriptors, an implementation must be careful to know that the underlying storage media provides a notion of unrecorded sectors before assuming that not writing to a sector is detectable. Otherwise, reliance on the incorrect converse argument mentioned above may result. Explicit terminating descriptors must be used when an appropriate unrecorded sector would be undetectable.
UDF 2.60
105
March 1, 2005
6. Appendices
6.1 UDF Entity Identifier Definitions
Entity Identifier
*OSTA UDF Compliant *UDF LV Info *UDF FreeEASpace *UDF FreeAppEASpace *UDF DVD CGMS Info *UDF OS/2 EALength *UDF Mac VolumeInfo *UDF Mac FinderInfo *UDF Virtual Partition *UDF Sparable Partition *UDF OS/400 DirInfo *UDF Sparing Table *UDF Metadata Partition
Description
Indicates the contents of the specified logical volume or file set is compliant with domain defined by this document. Contains additional Logical Volume identification information. Contains free unused space within the implementation extended attributes space. Contains free unused space within the application extended attributes space. Contains DVD Copyright Management Information Contains OS/2 extended attribute length. Contains Macintosh volume information. Contains Macintosh finder information. Describes UDF Virtual Partition Describes UDF Sparable Partition OS/400 Extended directory information Contains information for handling defective areas on the media Describes UDF Metadata Partition
UDF 2.60
106
March 1, 2005
Byte Value
#2A, #4F, #53, #54, #41, #20, #55, #44, #46, #20, #43, #6F, #6D, #70, #6C, #69, #61, #6E, #74 #2A, #55, #44, #46, #20, #4C, #56, #20, #49, #6E, #66, #6F #2A, #55, #44, #46, #20, #46, #72, #65, #65, #45, #41, #53, #70, #61, #63, #65 #2A, #55, #44, #46, #20, #46, #72, #65, #65, #41, #70, #70, #45, #41, #53, #70, #61, #63, #65 #2A, #55, #44, #46, #20, #44, #56, #44, #20, #43, #47, #4D, #53, #20, #49, #6E, #66, #6F #2A, #55, #44, #46, #20, #4F, #53, #2F, #32, #20, #45, #41, #4C, #65, #6E, #67, #74, #68 #2A, #55, #44, #46, #20, #4F, #53, #2F, #34, #30, #30, #20, #44, #69, #72, #49, #6E, #66, #6F #2A, #55, #44, #46, #20, #4D, #61, #63, #20, #56, #6F, #6C, #75, #6D, #65, #49, #6E, #66, #6F #2A, #55, #44, #46, #20, #4D, #61, #63, #20, #49, #69, #6E, #64, #65, #72, #49, #6E, #66, #6F #2A, #55, #44, #46, #20, #56, #69, #72, #74, #75, #61, #6C, #20, #50, #61, #72, #74, #69, #74, #69, #6F, #6E #2A, #55, #44, #46, #20, #53, #70, #61, #72, #61, #62, #6C, #65, #20, #50, #61, #72, #74, #69, #74, #69, #6F, #6E #2A, #55, #44, #46, #20, #53, #70, #61, #72, #69, #6E, #67, #20, #54, #61, #62, #6C, #65 #2A, #55, #44, #46, #20, #4D, #65, #74, #61, #64, #61, #74, #61, #20, #50, #61, #72, #74, #69, #74, #69, #6F, #6E
UDF 2.60
107
March 1, 2005
6.3.1 OS Class
The OS Class field will identify under which class of operating system the specified descriptor was recorded. The valid values for this field are as follows: Value 0 1 2 3 4 5 6 7 8 9 10-255 Operating System Class Undefined DOS OS/2 Macintosh OS UNIX Windows 9x Windows NT OS/400 BeOS Windows CE Reserved
UDF 2.60
108
March 1, 2005
6.3.2 OS Identifier
The OS Identifier field will identify under which operating system the specified descriptor was recorded. The valid values for this field are as follows: OS Class 0 1 2 3 3 4 4 4 4 4 4 4 4 4 5 6 7 8 9 OS Identifier
Any Value
Operating System Identified Undefined DOS/Windows 3.x OS/2 Macintosh OS 9 and older. Macintosh OS X and later releases. UNIX - Generic UNIX - IBM AIX UNIX - SUN OS / Solaris UNIX - HP/UX UNIX - Silicon Graphics Irix UNIX - Linux UNIX - MKLinux UNIX - FreeBSD UNIX - NetBSD Windows 9x generic (includes Windows 98/ME) Windows NT generic (includes Windows 2000,XP,Server 2003, and later releases based on the same code base) OS/400 BeOS - generic Windows CE - generic
0 0 0 1 0 1 2 3 4 5 6 7 8 0 0 0 0 0
UDF 2.60
109
March 1, 2005
UDF 2.60
110
March 1, 2005
unicodeIndex++; } returnValue = unicodeIndex; } return(returnValue); } /*********************************************************************** * DESCRIPTION: * Takes a string of unicode wide characters and returns an OSTA CS0 * compressed unicode string. The unicode MUST be in the byte order of * the compiler in order to obtain correct results. Returns an error * if the compression ID is invalid. * * NOTE: This routine assumes the implementation already knows, by * the local environment, how many bits are appropriate and * therefore does no checking to test if the input characters fit * into that number of bits or not. * * RETURN VALUE * * The total number of bytes in the compressed OSTA CS0 string, * including the compression ID. * A -1 is returned if the compression ID is invalid. */ int CompressUnicode( int numberOfChars, /* (Input) number of unicode characters. */ int compID, /* (Input) compression ID to be used. */ unicode_t *unicode, /* (Input) unicode characters to compress. */ byte *UDFCompressed) /* (Output) compressed string, as bytes. */ { int byteIndex, unicodeIndex; if (compID != 8 && compID != 16) { byteIndex = -1; /* Unsupported compression ID ! */ } else { /* Place compression code in first byte. */ UDFCompressed[0] = compID; byteIndex = 1; unicodeIndex = 0; while (unicodeIndex < numberOfChars) { if (compID == 16) { /* First, place the high bits of the char * into the byte stream. */ UDFCompressed[byteIndex++] = (unicode[unicodeIndex] & 0xFF00) >> 8; } /*Then place the low bits into the stream. */ UDFCompressed[byteIndex++] = unicode[unicodeIndex] & 0x00FF; unicodeIndex++; } } return(byteIndex); }
UDF 2.60
111
March 1, 2005
0x50A5, 0xD1AD, 0x4294, 0xC39C, 0x74C7, 0xF5CF, 0x66F6, 0xE7FE, 0x1861, 0x9969, 0x0A50, 0x8B58, 0x3C03, 0xBD0B, 0x2E32, 0xAF3A, 0xC12D, 0x4025, 0xD31C, 0x5214, 0xE54F, 0x6447, 0xF77E, 0x7676, 0x89E9, 0x08E1, 0x9BD8, 0x1AD0, 0xAD8B, 0x2C83, 0xBFBA, 0x3EB2,
0x60C6, 0xE1CE, 0x72F7, 0xF3FF, 0x44A4, 0xC5AC, 0x5695, 0xD79D, 0x2802, 0xA90A, 0x3A33, 0xBB3B, 0x0C60, 0x8D68, 0x1E51, 0x9F59, 0xF14E, 0x7046, 0xE37F, 0x6277, 0xD52C, 0x5424, 0xC71D, 0x4615, 0xB98A, 0x3882, 0xABBB, 0x2AB3, 0x9DE8, 0x1CE0, 0x8FD9, 0x0ED1,
0x70E7, 0xF1EF, 0x62D6, 0xE3DE, 0x5485, 0xD58D, 0x46B4, 0xC7BC, 0x3823, 0xB92B, 0x2A12, 0xAB1A, 0x1C41, 0x9D49, 0x0E70, 0x8F78, 0xE16F, 0x6067, 0xF35E, 0x7256, 0xC50D, 0x4405, 0xD73C, 0x5634, 0xA9AB, 0x28A3, 0xBB9A, 0x3A92, 0x8DC9, 0x0CC1, 0x9FF8, 0x1EF0
UDF 2.60
112
March 1, 2005
} #ifdef MAIN unsigned char bytes[] = { 0x70, 0x6A, 0x77 }; main() { unsigned short x; x = cksum(bytes, sizeof bytes); printf("checksum: calculated=%4.4x, correct=%4.4x\en", x, 0x3299); exit(0); } #endif
UDF 2.60
113
March 1, 2005
The CRC table in the previous listing was generated by the following program:
#include /* * */ <stdio.h>
main(argc, argv) int argc; char *argv[]; { unsigned long crc, poly; int n, i; sscanf(argv[1], "%lo", &poly); if(poly & 0xffff0000){ fprintf(stderr, "polynomial is too large\en"); exit(1); } printf("/*\en * CRC 0%o\en */\en", poly); printf("static unsigned short crc_table[256] = {\en"); for(n = 0; n < 256; n++){ if(n % 8 == 0) printf(" "); crc = n << 8; for(i = 0; i < 8; i++){ if(crc & 0x8000) crc = (crc << 1) ^ poly; else crc <<= 1; crc &= 0xFFFF; } if(n == 255) printf("0x%04X ", crc); else printf("0x%04X, ", crc); if(n % 8 == 7) printf("\en"); } printf("};\en"); exit(0); }
All the above CRC code was devised by Don P. Mitchell of AT&T Bell Laboratories and Ned W. Rhodes of Software Systems Group. It has been published in "Design and Validation of Computer Protocols," Prentice Hall, Englewood Cliffs, NJ, 1991, Chapter 3, ISBN 0-13-539925-4. Copyright is held by AT&T. AT&T gives permission for the free use of the above source code.
UDF 2.60
114
March 1, 2005
DE IE DE IE DE IE
NOTE: This strategy builds an ICB hierarchy that is a simple linked list of direct entries.
UDF 2.60
115
March 1, 2005
*/
UDF 2.60
116
March 1, 2005
nameLen = udfNameLen; } else { /* A DOS extension was found, process it first. */ extLen = udfNameLen - index - 1; nameLen = index; targetIndex = 0; bytesLeft = DOS_EXT_LEN; while (++index < udfNameLen && bytesLeft > 0) { /* Get the current character and convert it to upper */ /* case. current = UnicodeToUpper(udfName[index]); if (current == ' ') { /* If a space is found, a CRC must be appended to */ /* the mangled file name. */ needsCRC = TRUE; } else { /* Determine if this is a valid file name char and /* calculate its corresponding BCS character byte /* length (zero if the char is not legal or /* undisplayable on this system). charLen = (IsFileNameCharLegal(current)) ? NativeCharLength(current) : 0; /* If the char is larger than the available space /* in the buffer, pretend it is undisplayable. if (charLen > bytesLeft) charLen = 0;
*/
*/ */ */ */
*/ */
if (charLen == 0) { /* Undisplayable or illegal characters are */ /* substituted with an underscore ("_"), and */ /* required a CRC code appended to the mangled */ /* file name. */ needsCRC = TRUE; charLen = 1; current = '_'; /* Skip over any following undiplayable or */ /* illegal chars. */ while (index +1 <udfNameLen && (!IsFileNameCharLegal(udfName[index + 1]) || NativeCharLength(udfName[index + 1]) == 0)) index++; } /* Assign the resulting char to the next index in */ /* the extension buffer and determine how many BCS */ /* bytes are left. */ ext[targetIndex++] = current; bytesLeft -= charLen; } } /* Save the number of Unicode characters in the extension */ extLen = targetIndex; /* /* /* if } /* Now process the actual file name. */ index = 0; targetIndex = 0; crcIndex = 0; overlayBytes = -1; bytesLeft = DOS_NAME_LEN; while (index < nameLen && bytesLeft > 0) { /* Get the current character and convert it to upper case. */ current = UnicodeToUpper(udfName[index]); if (current ==' ' ||current == '.') { /* Spaces and periods are just skipped, a CRC code */ /* must be added to the mangled file name. */ needsCRC = TRUE; } else { If the extension was too large, or it was zero length */ (i.e. the name ended in a period), a CRC code must be */ appended to the mangled name. */ (index < udfNameLen || extLen == 0) needsCRC = TRUE;
UDF 2.60
117
March 1, 2005
/* Determine if this is a valid file name char and */ /* calculate its corresponding BCS character byte */ /* length (zero if the char is not legal or */ /* undisplayable on this system). */ charLen = (IsFileNameCharLegal(current)) ? NativeCharLength(current) : 0; /* If the char is larger than the available space in */ /* the buffer, pretend it is undisplayable. */ if (charLen > bytesLeft) charLen = 0; if (charLen == 0) { /* Undisplayable or illegal characters are */ /* substituted with an underscore ("_"), and */ /* required a CRC code appended to the mangled */ /* file name. */ needsCRC = TRUE; charLen = 1; current = '_'; /* Skip over any following undiplayable or illegal */ /* chars. */ while (index +1 <nameLen && (!IsFileNameCharLegal(udfName[index + 1]) || NativeCharLength(udfName[index + 1]) == 0)) index++; /* Terminate loop if at the end of the file name. */ if (index >= nameLen) break; } /* Assign the resulting char to the next index in the */ /* file name buffer and determine how many BCS bytes */ /* are left. */ dosName[targetIndex++] = current; bytesLeft -= charLen; /* This figures out where the CRC code needs to start */ /* in the file name buffer. */ if (bytesLeft >= DOS_CRC_LEN) { /* If there is enough space left, just tack it */ /* onto the end. */ crcIndex = targetIndex; } else { /* If there is not enough space left, the CRC */ /* must overlay a character already in the file */ /* name buffer. Once this condition has been */ /* met, the value will not change. */ if (overlayBytes < 0) { /* Determine the index and save the length of */ /* the BCS character that is overlayed. It */ /* is possible that the CRC might overlay */ /* half of a two-byte BCS character depending */ /* upon how the character boundaries line up. */ overlayBytes = (bytesLeft + charLen > DOS_CRC_LEN)?1 :0; crcIndex = targetIndex - 1; } } } /* Advance to the next character. */ index++; } /* If the scan did not reach the end of the file name, or the */ /* length of the file name is zero, a CRC code is needed. */ if (index < nameLen || index == 0) needsCRC = TRUE; /* If the name has illegal characters or and extension, it */ /* is not a DOS device name. */ if (needsCRC == FALSE && extLen == 0) { /* If this is the name of a DOS device, a CRC code should */ /* be appended to the file name. */ if (IsDeviceName(udfName, udfNameLen)) needsCRC = TRUE; }
UDF 2.60
118
March 1, 2005
/* Append the CRC code to the file name, if needed. */ if (needsCRC) { /* Get the CRC value for the original Unicode string */ UINT16 udfCRCValue = CalculateCRC(udfName, udfNameLen); /* Determine the character index where the CRC should */ /* begin. */ targetIndex = crcIndex; /* If the character being overlayed is a two-byte BCS */ /* character, replace the first byte with an underscore. */ if (overlayBytes > 0) dosName[targetIndex++] = '_'; /* Append the encoded CRC value with delimiter. */ dosName[targetIndex++] = '#'; dosName[targetIndex++] = crcChar[udfCRCValue / (DOS_CRC_MODULUS * DOS_CRC_MODULUS)]; udfCRCValue %= DOS_CRC_MODULUS * DOS_CRC_MODULUS; dosName[targetIndex++] = crcChar[udfCRCValue / DOS_CRC_MODULUS]; udfCRCValue %= DOS_CRC_MODULUS; dosName[targetIndex++] = crcChar[udfCRCValue]; } /* Append the extension, if any. */ if (extLen > 0) { /* Tack on a period and each successive byte in the */ /* extension buffer. */ dosName[targetIndex++] = '.'; for (index = 0; index < extLen; index++) dosName[targetIndex++] = ext[index]; } /* Return the length of the resulting Unicode string. */ return (UINT16)targetIndex; } /*******************************************************************/ /* UDFDOSVolumeLabel() */ /* Translate udfLabel to dosLabel using OSTA compliant algorithm. */ /* dosLabel must be a Unicode string buffer at least 11 characters */ /* in length. */ /*******************************************************************/ UINT16 UDFDOSVolumeLabel(UNICODE_CHAR* dosLabel, UNICODE_CHAR* udfLabel, UINT16 udfLabelLen) { INT16 index; INT16 targetIndex; INT16 crcIndex; INT16 charLen; INT16 overlayBytes; INT16 bytesLeft; UNICODE_CHAR current; BOOLEAN needsCRC; needsCRC = FALSE; /* Scan end of label to see if there are any trailing spaces. */ index = udfLabelLen; while (index-- > 0) { if (udfLabel[index] != ' ') break; } /* /* /* if } index = 0; targetIndex = 0; crcIndex = 0; overlayBytes = -1; bytesLeft = DOS_LABEL_LEN; while (index < udfLabelLen && bytesLeft > 0) { If there are trailing spaces, adjust the length of the */ string to exclude them and indicate that a CRC code is */ needed. */ (index +1 !=udfLabelLen) { udfLabelLen = index + 1; needsCRC = TRUE;
UDF 2.60
119
March 1, 2005
/* Get the current character and convert it to upper case. */ current = UnicodeToUpper(udfLabel[index]); if (current == '.') { /* Periods are just skipped, a CRC code must be added */ /* to the mangled file name. */ needsCRC = TRUE; } else { /* Determine if this is a valid file name char and */ /* calculate its corresponding BCS character byte */ /* length (zero if the char is not legal or */ /* undisplayable on this system). */ charLen = (IsVolumeLabelCharLegal(current)) ? NativeCharLength(current) : 0; /* If the char is larger than the available space in */ /* the buffer, pretend it is undisplayable. */ if (charLen > bytesLeft) charLen = 0; if (charLen == 0) { /* Undisplayable or illegal characters are */ /* substituted with an underscore ("_"), and */ /* required a CRC code appended to the mangled */ /* file name. */ needsCRC = TRUE; charLen = 1; current = '_'; /* Skip over any following undiplayable or illegal */ /* chars. */ while (index +1 <udfLabelLen && (!IsVolumeLabelCharLegal(udfLabel[index + 1]) || NativeCharLength(udfLabel[index + 1]) == 0)) index++; /* Terminate loop if at the end of the file name. */ if (index >= udfLabelLen) break; } /* Assign the resulting char to the next index in the */ /* file name buffer and determine how many BCS bytes */ /* are left. */ dosLabel[targetIndex++] = current; bytesLeft -= charLen; /* This figures out where the CRC code needs to start */ /* in the file name buffer. */ if (bytesLeft >= DOS_CRC_LEN) { /* If there is enough space left, just tack it */ /* onto the end. */ crcIndex = targetIndex; } else { /* If there is not enough space left, the CRC */ /* must overlay a character already in the file */ /* name buffer. Once this condition has been */ /* met, the value will not change. */ if (overlayBytes < 0) { /* Determine the index and save the length of */ /* the BCS character that is overlayed. It */ /* is possible that the CRC might overlay */ /* half of a two-byte BCS character depending */ /* upon how the character boundaries line up. */ overlayBytes = (bytesLeft + charLen > DOS_CRC_LEN) ?1 :0; crcIndex = targetIndex - 1; } } } /* Advance to the next character. */ index++; } /* If the scan did not reach the end of the file name, or the */ /* length of the file name is zero, a CRC code is needed. */ if (index < udfLabelLen || index == 0) needsCRC = TRUE; /* Append the CRC code to the file name, if needed. */
UDF 2.60
120
March 1, 2005
if (needsCRC) { /* Get the CRC value for the original Unicode string */ UINT16 udfCRCValue = CalculateCRC(udfName, udfNameLen); /* Determine the character index where the CRC should */ /* begin. */ targetIndex = crcIndex; /* If the character being overlayed is a two-byte BCS */ /* character, replace the first byte with an underscore. */ if (overlayBytes > 0) dosLabel[targetIndex++] = '_'; /* Append the encoded CRC value with delimiter. */ dosLabel[targetIndex++] = '#'; dosLabel[targetIndex++] = crcChar[udfCRCValue / (DOS_CRC_MODULUS * DOS_CRC_MODULUS)]; udfCRCValue %= DOS_CRC_MODULUS * DOS_CRC_MODULUS; dosLabel[targetIndex++] = crcChar[udfCRCValue / DOS_CRC_MODULUS]; udfCRCValue %= DOS_CRC_MODULUS; dosLabel[targetIndex++] = crcChar[udfCRCValue]; } /* Return the length of the resulting Unicode string. */ return (UINT16)targetIndex; } /*******************************************************************/ /* UnicodeToUpper() */ /* Convert the given character to upper-case Unicode. */ /*******************************************************************/ UNICODE_CHAR UnicodeToUpper(UNICODE_CHAR value) { /* Actual implementation will vary to accommodate the target */ /* operating system API services. */ /* Just handle the ASCII range for the time being. */ return (value >= 'a' && value <= 'z') ? value - ('a' - 'A') : value; } /*******************************************************************/ /* IsFileNameCharLegal() */ /* Determine if this is a legal file name id character. */ /*******************************************************************/ BOOLEAN IsFileNameCharLegal(UNICODE_CHAR value) { /* Control characters are illegal. */ if (value <' ') return FALSE; /* Test for illegal ASCII characters. */ switch (value) { case '\\': case '/': case ':': case '*': case '?': case '\"': case '<': case '>': case '|': case ';': case '^': case ',': case '&': case '+': case '=': case '[': case ']': return FALSE; default: return TRUE; } } /*******************************************************************/
UDF 2.60
121
March 1, 2005
/* IsVolumeLabelCharLegal() */ /* Determine if this is a legal volume label character. */ /*******************************************************************/ BOOLEAN IsVolumeLabelCharLegal(UNICODE_CHAR value) { /* Control characters are illegal. */ if (value <' ') return FALSE; /* Test for illegal ASCII characters. */ switch (value) { case '\\': case '/': case ':': case '*': case '?': case '\"': case '<': case '>': case '|': case '.': case ';': case '^': case ',': case '&': case '+': case '=': case '[': case ']': return FALSE; default: return TRUE; } } /*******************************************************************/ /* NativeCharLength() */ /* Determines the corresponding native length (in bytes) of the */ /* given Unicode character. Returns zero if the character is */ /* undisplayable on the current system. */ /*******************************************************************/ INT16 NativeCharLength(UNICODE_CHAR value) { /* Actual implementation will vary to accommodate the target */ /* operating system API services. */ /* This is an example of a conservative test. A better test */ /* will utilize the platforms language/codeset support to */ /* determine how wide this character is when converted to the */ /* active variable width character set. */ return 1; } /*******************************************************************/ /* IsDeviceName() */ /* Determine if the given Unicode string corresponds to a DOS */ /* device name (e.g. "LPT1", "COM4", etc.). Since the set of */ /* valid device names with vary from system to system, and */ /* a means for determining them might not be readily available, */ /* this functionality is only suggested as an optional */ /* implementation enhancement. */ /*******************************************************************/ BOOLEAN IsDeviceName(UNICODE_CHAR* name, UINT16 nameLen) { /* Actual implementation will vary to accommodate the target */ /* operating system API services. */ /* Just return FALSE for the time being. */ return FALSE; }
UDF 2.60
122
March 1, 2005
/*********************************************************************** * The following two typedef's are to remove compiler dependancies. * byte needs to be unsigned 8-bit, and unicode_t needs to * be unsigned 16-bit. */ typedef unsigned int unicode_t; typedef unsigned char byte; /*** PROTOTYPES ***/ int IsIllegal(unicode_t ch); unsigned short unicode_cksum(register unsigned short *s, register int n); /* Define a function or macro which determines if a Unicode character is * printable under your implementation. */ int UnicodeIsPrint(unicode_t); /*********************************************************************** * Translates a long file name to one using a MAXLEN and an illegal * char set in accord with the OSTA requirements. Assumes the name has * already been translated to Unicode. * * RETURN VALUE * * Number of unicode characters in translated name. */ int UDFTransName( unicode_t *newName,/*(Output)Translated name. Must be of length MAXLEN*/ unicode_t *udfName, /* (Input) Name from UDF volume.*/
UDF 2.60
123
March 1, 2005
int udfLen, /* (Input) Length of UDF Name. { int index, newIndex = 0, needsCRC = FALSE; int extIndex, newExtIndex = 0, hasExt = FALSE; #ifdef (OS2 | WIN_95 | WIN_NT) int trailIndex = 0; #endif unsigned short valueCRC; unicode_t current; const char hexChar[] = "0123456789ABCDEF"; for (index = 0; index < udfLen; index++) { current = udfName[index];
*/
if (IsIllegal(current) || !UnicodeIsPrint(current)) { needsCRC = TRUE; /* Replace Illegal and non-displayable chars with underscore. */ current = ILLEGAL_CHAR_MARK; /* Skip any other illegal or non-displayable characters. */ while(index+1 < udfLen && (IsIllegal(udfName[index+1]) || !UnicodeIsPrint(udfName[index+1]))) { index++; } } /* Record position of extension, if one is found. */ if (current == PERIOD && (udfLen - index -1) <= EXT_SIZE) { if (udfLen == index + 1) { /* A trailing period is NOT an extension. */ hasExt = FALSE; } else { hasExt = TRUE; extIndex = index; newExtIndex = newIndex; } } #ifdef (OS2 | WIN_95 | WIN_NT) /* Record position of last char which is NOT period or space. */ else if (current != PERIOD && current != SPACE) { trailIndex = newIndex; } #endif if (newIndex < MAXLEN) { newName[newIndex++] = current; } else { needsCRC = TRUE; } } #ifdef (OS2 | WIN_95 | WIN_NT) /* For OS2, 95 & NT, truncate any trailing periods and\or spaces. */ if (trailIndex != newIndex - 1) { newIndex = trailIndex + 1; needsCRC = TRUE; hasExt = FALSE; /* Trailing period does not make an extension. */ } #endif
UDF 2.60
124
March 1, 2005
if (needsCRC) { unicode_t ext[EXT_SIZE]; int localExtIndex = 0; if (hasExt) { int maxFilenameLen; /* Translate extension, and store it in ext. */ for(index = 0; index<EXT_SIZE && extIndex + index +1 < udfLen; index++ ) { current = udfName[extIndex + index + 1]; if (IsIllegal(current) || !UnicodeIsPrint(current)) { needsCRC = 1; /* Replace Illegal and non-displayable chars * with underscore. */ current = ILLEGAL_CHAR_MARK; /* Skip any other illegal or non-displayable * characters. */ while(index + 1 < EXT_SIZE && (IsIllegal(udfName[extIndex + index + 2]) || !UnicodeIsPrint(udfName[extIndex + index + 2]))) { index++; } } ext[localExtIndex++] = current; } /* Truncate filename to leave room for extension and CRC. */ maxFilenameLen = ((MAXLEN - 5) - localExtIndex - 1); if (newIndex > maxFilenameLen) { newIndex = maxFilenameLen; } else { newIndex = newExtIndex; } } else if (newIndex > MAXLEN - 5) { /*If no extension, make sure to leave room for CRC. */ newIndex = MAXLEN - 5; } newName[newIndex++] = CRC_MARK; /* Add mark for CRC. */ /*Calculate CRC from original filename from FileIdentifier. */ valueCRC = unicode_cksum(udfName, udfLen); /* Convert 16-bits of CRC to hex characters. */ newName[newIndex++] = hexChar[(valueCRC & 0xf000) >> 12]; newName[newIndex++] = hexChar[(valueCRC & 0x0f00) >> 8]; newName[newIndex++] = hexChar[(valueCRC & 0x00f0) >> 4]; newName[newIndex++] = hexChar[(valueCRC & 0x000f)]; /* Place a translated extension at end, if found. */ if (hasExt) { newName[newIndex++] = PERIOD; for (index = 0;index < localExtIndex ;index++ ) { newName[newIndex++] = ext[index]; } } } return(newIndex); }
UDF 2.60
125
March 1, 2005
#ifdef (OS2 | WIN_95 | WIN_NT) /*********************************************************************** * Decides if a Unicode character matches one of a list * of ASCII characters. * Used by OS2 version of IsIllegal for readability, since all of the * illegal characters above 0x0020 are in the ASCII subset of Unicode. * Works very similarly to the standard C function strchr(). * * RETURN VALUE * * Non-zero if the Unicode character is in the given ASCII string. */ int UnicodeInString( unsigned char *string, /* (Input) String to search through. */ unicode_t ch) /* (Input) Unicode char to search for. */ { int found = FALSE; while (*string != '\0' && found == FALSE) { /* These types should compare, since both are unsigned numbers. */ if (*string == ch) { found = TRUE; } string++; } return(found); } #endif /* OS2 */ /*********************************************************************** * Decides whether the given character is illegal for a given OS. * * RETURN VALUE * * Non-zero if char is illegal. */ int IsIllegal(unicode_t ch) { #ifdef MAC /* Only illegal character on the MAC is the colon. */ if (ch == 0x003A) { return(1); } else { return(0); } #elif defined UNIX /* Illegal UNIX characters are NULL and slash. */ if (ch == 0x0000 || ch == 0x002F) { return(1); } else { return(0); } #elif defined (OS2 | WIN_95 | WIN_NT) /* Illegal char's for OS/2 according to WARP toolkit. */ if (ch < 0x0020 || UnicodeInString("\\/:*?\"<>|", ch)) { return(1); } else { return(0); } #endif }
UDF 2.60
126
March 1, 2005
UDF 2.60
127
March 1, 2005
NOTE: The disc may also include the ISO 9660 file system. If the disc contains both UDF and ISO 9660 file systems it shall be known as a UDF Bridge disc. This UDF Bridge disc will allow playing DVD-ROM media in computers, which may only support ISO 9660. As UDF computer implementations are provided, the need for ISO 9660 will disappear, and future discs should contain only UDF. If you intend to do any DVD development with UDF, please make sure that you fill out the OSTA UDF Developer Registration Form located in appendix 6.18. For planned operating system, check the Other box and write in DVD.
UDF 2.60
128
March 1, 2005
File and directory names shall be compressed as 8 bits per character using OSTA Compressed Unicode format. A DVD player shall not be required to follow symbolic links to any files. The DVD-Video files shall be stored in a subdirectory named "VIDEO_TS" directly under the root directory. Directory names are standardized in the DVD Specifications for Read-Only Disc document. NOTE 2: The DVD Specifications for Read-Only Disc is a document, published by the DVD Format/Logo Licensing Corporation, see 6.9.3. This document describes the names of all DVD-Video files and a DVD-Video directory, which will be stored on the media, and additionally, describes the contents of the DVD-Video files.
The file named "VIDEO_TS.IFO" in the VIDEO_TS subdirectory shall be read first.
All the above constraints apply only to the directory and files that the DVD player needs to access. There may be other files and directories on the media which are not intended for the DVD player and do not meet the above listed constraints. These other files and directories are ignored by the DVD player. This is what enables the ability to have both entertainment-based and computer-based content on the same disc.
UDF 2.60
129
March 1, 2005
Descriptor CRC in bytes 8-11 are good additional verifications to perform. MVDS_Location and MVDS_Length are read from this structure.
UDF 2.60
130
March 1, 2005
UDF 2.60
131
March 1, 2005
UDF 2.60
132
March 1, 2005
6.10.2.1 Requirements
Writing which conforms to this section of the standard shall be performed using fixed length packets. Writing shall be performed using Mode 1 or Mode 2, Form 1 sectors. On one disc, either Mode 1 or Mode 2 Form 1 shall be used. NOTE: According to the Multisession CD Specification, all data sessions on a disc must be of the same type (Mode 1, or Mode 2 Form 1). If Mode 2 Form 1 is used, then the subheader bytes of all sectors used by the user data files and by the UDF structures shall have the following value: File number = 0 Channel number = 0 Submode = 08h Coding information = 0 The host shall perform read/modify/write to enable the apparent writing of single 2K sectors. The Packet Length shall be set when the disc is formatted. The Packet Length shall be 32 sectors (64 KB). Defective packets known at format time shall be allocated by the Non-Allocatable Space Stream (see 3.3.7.2). Sparing shall be managed by the host via the sparable partition and a Sparing Table. Discs shall be formatted prior to use.
6.10.2.2 Formatting
Formatting shall consist of writing a lead-in, user data area, and lead-out. These areas may be written in any order. A verification pass may follow this physical format. Defective packets found during the verification pass shall be enumerated in the NonAllocatable Space Stream (see 3.3.7.2). Finally, file system root structures shall be recorded. These mandatory file system and root structures include the Volume Recognition Sequence, Anchor Volume Descriptor Pointers, a Volume Descriptor Sequence, a File Set Descriptor and a Root Directory. The Anchor Volume Descriptor Pointers shall be recorded at sectors 256 and N - 256, where N is the Logical Sector Number of the last addressable sector. Allocation for sparing shall occur during the format process. The sparing allocation may be zero in length. The free space descriptors shall be recorded and shall reflect space allocated to defective areas and sector sparing areas. The format may include all available space on the medium. However, if requested by the user, a subset may be formatted to save formatting time. That smaller format may be later grown to the full available space.
UDF 2.60
133
March 1, 2005
UDF 2.60
134
March 1, 2005
UDF 2.60
135
March 1, 2005
UDF 2.60
136
March 1, 2005
6.11.2.1 Requirements
An intermediate state is allowed for media on which only one AVDP is recorded; this single AVDP shall be at sector 256 or sector 512 and according to the multisession rules in 6.11.3. The Logical Volume Integrity Descriptor shall be recorded and the volume marked as open. Logical Volume integrity can be verified by finding the VAT ICB at the last recorded Logical Sector Number. If the VAT ICB is present, the volume is clean; otherwise it is dirty. The Partition Header Descriptor shall specify no Unallocated Space Table, no Unallocated Space Bitmap, no Freed Space Table, and no Freed Space Bitmap. The drive is capable of reporting free space directly, eliminating the need for a separate descriptor. Each surface shall contain 0 or 1 read-only partitions, 0 or 1 write-once partitions, and 0 or 1 virtual partitions. Media using VAT should contain 1 write-once partition and 1 virtual partition.
The implementation specific data may contain repeated copies of the VAT and VAT ICB. Compatibility with drives that do not accurately report the location of the last sector will be enhanced. Implementations shall ensure that enough space is available to record the end of session data. Recording the end of session data brings a volume into compliance with ECMA 167.
UDF 2.60
137
March 1, 2005
There shall be no more than one writable partition or session at one time, and this session shall be the last session on the disc. A new Main and Reserve Volume Descriptor Sequence may exist in each added session, and may be different than earlier VDSs. If the last session on a medium does not contain a valid UDF file system, the disc is not a UDF disc. Only the UDF structures in the last session, and any UDF structures and data referenced through them, are valid. The UDF session may contain pointers to data or metadata in other sessions, pointers to data or metadata only within the UDF session, or a combination of both.
UDF 2.60
138
March 1, 2005
N - 256
CD enhanced disc
1 session
st
Used by UDF
Managed by UDF
UDF 2.60
139
March 1, 2005
Managed by UDF
UDF 2.60
140
March 1, 2005
UDF 2.60
141
March 1, 2005
6. 7. 8.
Space Table, Freed Space Table and Freed Space Bitmap shall not be recorded. Non-Allocatable Space Stream shall be recorded. ICB Strategy Type 4 shall be used. Short Allocation Descriptors or the embedded data shall be recorded in the Allocation Descriptors field of the File Entry or Extended File Entry. Long Allocation Descriptors shall not be recorded in this field.
UDF 2.60
142
March 1, 2005
UDF 2.60
143
March 1, 2005
6.13.2.1 Requirements
Sparing shall be managed by the host via the Sparable Partition and a Sparing Table. The sparing Packet Length shall be 16 sectors (32 KB, one ECC block). Defective packets known at format time shall be allocated by the Non-Allocatable Space Stream, see 3.3.7.2.
UDF 2.60
144
March 1, 2005
The physical formating may be followed by a verification pass. Defects found during the verification pass shall be enumerated in the Non-Allocatable Space Stream, see 3.3.7.2. Finally, file system root structures shall be recorded. These mandatory file system and root structures include the Volume Recognition Sequence, the Anchor Volume Descriptor Pointers, the Volume Descriptor Sequences, a File Set Descriptor and a Root Directory. Allocation for sparing shall occur during the formatting process. The sparing allocation may be zero in length. The unallocated space descriptors shall be recorded and shall reflect the space allocated to not-spared defective areas and sector sparing areas. The format may include all available space on the medium. However, formatting may be interrupted upon request by the user. Formatting may later be continued to the full space.
UDF 2.60
145
March 1, 2005
UDF 2.60
146
March 1, 2005
UDF 2.60
147
March 1, 2005
Figure 1 below illustrates the track layout for a freshly formatted medium where the Metadata Mirror File is not being recorded. Track #1 contains the volume structure (including the AVDP at LSN 256) as well as related file structures. The Duplicate Metadata Flag in the Metadata Partition Map is set to zero. The format utility has allocated an extent (track) for metadata recording while Track #3 comprises the majority of recordable volume space to be utilized as required.
Track #1 (used)
Metadata Mirror File FE
Track #2 (reserved)
File Set Descriptor File Entry (root directory)
Track #3 (reserved)
Track #4 (used)
Volume Structure
Metadata File FE
unrecorded area
unrecorded area
Spare Area
UDF 2.60
148
March 1, 2005
Spare Area
AVDP
Figure 2 below also illustrates the track layout for a freshly formatted medium where the Metadata Mirror File will be recorded. The Duplicate Metadata Flag in the Metadata Partition Map is set to one. Hence an extent has been allocated for the contents of the Metadata Mirror File.
Track #1 (used)
Metadata Mirror File FE
Track #2 (reserved)
File Set Descriptor File Entry (root directory)
Track #3 (reserved)
Track #4 (reserved)
File Set Descriptor File Entry (root directory)
Track #5 (used )
Volume Structure
Metadata File FE
unrecorded area
unrecorded area
unrecorded area
Spare Area
Figure 3 below illustrates track layout on media after files have been recorded (note that in this case the Metadata Mirror File is not being recorded). In this illustration, Track #2 is in the used state; hence Track #4 was allocated for additional recording of metadata (Track #3 is being used to record data).
Track #1 (used)
Metadata Mirror File FE
Track #2 (used)
File Set Descriptor File Entry (root directory) ...
Track #3 (used)
Track #4 (reserved)
Track #5 (reserved)
Track #6 (used)
Volume Structure
Metadata File FE
unrecorded area
unrecorded area
FE (Data-A) FE (Data-B)
Spare Area
UDF 2.60
149
March 1, 2005
Spare Area
Data-A
Data-B
Data-C
AVDP
...
Spare Area
AVDP ..
UDF 2.60
150
March 1, 2005
UDF 2.60
151
March 1, 2005
UDF 2.60
152
March 1, 2005
1. For SRM with LOW, the Partition Descriptor Access Type shall be 0 (pseudooverwritable). 2. For SRM without LOW, the Partition Descriptor Access Type shall be 1 (readonly) or 2 (write-once). For File Structure: 3. Unallocated Space Table and Unallocated Space Bitmap shall not be recorded. 4. Only ICB Strategy Type 4 shall be used. Requirements for Defect Management: Spare Area shall be assigned for a BD-R medium formatted for SRM with LOW (POW). In general, Spare Areas with the default size are assigned at format time.
UDF 2.60
153
March 1, 2005
UDF 1.02 Allocation Extent Descriptor Path Component File Version Number Parent Directory Entries Device Specification Extended Attribute Maximum Logical Extent Length Unallocated Space Entry DVD Copyright Management Information Logical Volume Identifier Extent Length Field of an Allocation Descriptor Non-relocatable & Contiguous Flags Revision of Requirements for DVD-ROM Revision Access Control Volume Set Identifier UniqueIDs for Extended Attributes Clarification of Dstrings Application FreeEASpace Extended Attribute Update of Identifier Suffix to 1.02 UDF 1.50 Update of Identifier Suffix to 1.50 Virtual Partition Map Entry Allocation of Sparable Partition Map Addition of Virtual Allocation Table Addition of Sparing Table Addition of Non-Allocatable Space List Reccommmendations for CD Media
2-002 2-003 2-004 2-005 2-006 2-008 2-009 2-010 2-012 2-013 2-014 2-015 2-017 2-018 2-019 2-020 2-021 2-025 2-026 2-027 2-028 2-029 2-030 2-031
UDF 2.60
154
March 1, 2005
Desciption UDF 2.00 Change 1.50 to 2.00 Clarified Domain flags Unicode 2.0 Support Named Streams Unique ID Table as a Named Stream Mac Resource Fork as a Named Stream Location Field of the Extended Attribute Header Access Control Lists Descriptor Tags spanning block boundaries Power Calibration Stream Support for CD-R Multisession Required Value of fields in LVID for virtual partition on CD-R System Stream to indicate volume backup time New VAT Restricting Virtual Addresses File Times Extended Attribute OS/2 EA Stream Non-Allocatable Space Stream UDF 2.01 Tag serial number & disaster recovery Change to DOS name transform algorithm Directory search order for dual namespaces Termination in strategy 4096 clarification Compression Ids 254/255 clarification Mac Resource Fork can only be in files Requirements for CD media AVDP Placement Non relocatable bit clarification Various editorial corrections PCA stream fix Parent of system stream directory OS/400 updates Missing EntityID definitions Various editorial corrections New OS types PVD Application Identifier field clarification Descriptor CRC length POSIX permissions clarifications Clarification of 3,2,1,1 Volume recognition sequence Path length FID LengthOfImplementationUse Editorial non-allocatable space stream Allocation extent descriptor CRC length File types 248 to 255 Real-time files on DVD-RAM Packet length specification Overlapping structures with conflicting field Information length reconstruction Timezone interpretation Missing partition descriptor and sparable partition Basic restrictions & requirements PD correction PVD and LVD volume sequence number Additions to 5.1 informative table Clarify uniqueID use for EAs/streams
DCN
Updated in UDF Revision 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01 2.01
Minimum UDF Read Revision 1.02 1.02 1.02 2.00 1.02 2.00 1.02 2.00 1.02 1.02 1.50 1.50 2.00 2.00 1.50 1.02 2.00 1.02 1.02 1.02 1.02 2.00 2.00 1.50 1.50 1.02 2.00 2.00 2.00 2.00 2.00 1.02 1.02 2.00 2.00 1.02 1.02 1.02 2.00 2.00 2.00 2.00 2.00 2.00 1.02 1.02 1.50 1.02 2.00 2.00
Minimum UDF Write Revision 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 1.02 1.02 1.02 1.02 2.00 2.00 1.50 1.50 1.02 2.00 2.00 2.00 2.00 2.00 1.02 1.02 2.00 2.00 2.00 1.02 1.02 2.00 2.00 2.00 2.00 2.00 2.00 1.02 1.02 1.50 1.02 2.00 2.00
2-033 2-034 2-035 2-036 2-037 2-038 2-043 2-044 2-047 2-048 2-050 2-051 2-055 2-056 2-057 2-058 2-061 2-062 5000 5002 5004 5006 5007 5008 5009 5013 5014 5015 5018 5019 5020 5021 5024 5025 5026 5027 5029 5030 5031 5032 5034 5035 5036 5037 5038 5039 5040 5041 5042 5044 5045 5046 5047 5048
UDF 2.60
155
March 1, 2005
Description UDF 2.50 FID File Identifier length and Unicode uniqueness Disallow overlapping partitions Strategy 4096 only for WORM media UDF Unique ID Mapping Data Extended Attribute block alignment UDF Defined Named Streams section File Identifier translation code repair Correction of is_fileset_soft_protected rule Disallow hard linked directories Requirements for DVD-RAM/RW/R interchangeability Unique ID for System Stream Directory Shared description for some LVID and VAT fields Recommendations for Mount Rainier formatted media Recommendations for DVD+R and DVD+RW Section 3.3.6 put out of order UDF UniqueID clarifications Clarify partition Access Type 3 and 4 Icbtag Parent ICB Location issue Clarification of Volume Recognition Sequence Metadata Partition Map Partition Alignment & ECC Block Size Definition Non-allocatable space stream usage clarifications
DCN
Updated in UDF Revision 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.60 2.60 2.60 2.60 2.60 2.60 2.60 2.60 2.60 2.60 2.60 2.60 2.60 2.60 2.60 2.60 2.60 2.60 2.60 2.60 2.60 2.60
Minimum UDF Read Revision 1.02 1.02 1.02 2.50 1.02 2.00 1.02 2.00 1.02 2.00 2.50 2.01 1.02 1.50 2.00 2.00 2.01 1.02 1.02 2.50 1.02 1.50 2.50 2.50 2.50 2.50 2.50 2.50 1.50 1.02 2.50 1.02 2.60 2.50 2.50 2.60 2.50 2.60 2.01 1.02 2.60 2.60 2.00
Minimum UDF Write Revision 2.01 1.02 1.02 2.50 1.02 2.00 1.02 2.00 2.50 2.00 2.50 2.01 1.02 1.50 2.00 2.00 2.01 2.50 2.01 2.50 2.50 1.50 2.50 2.50 2.50 2.50 2.50 2.50 1.50 1.02 2.50 1.02 2.60 2.50 2.50 2.60 2.50 2.60 2.01 1.02 2.60 2.60 2.00
5049 5061 5062 5063 5064 5065 5066 5069 5070 5071 5072 5074 5075 5076 5077 5078 5079 5081 5082 5086 5089 5090 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121
UDF 2.60
Editorial corrections for UDF revision after UDF 2.50. Virtual, metadata and read-only partitions No Metadata Bitmap File required for read-only Equivalence for Metadata File and Mirror File Next extent for Metadata File and Metadata Mirror File Terminating Descriptor in Metadata Partition Metadata Mirror File FEs and AEDs always far apart Clarify overlapping of Sparing Table with a partition Descriptor CRC Length Uint16 overflow rules Clarification of NOTE on page 41 Appoint OS Identifier for UNIX - NetBSD Pseudo OverWrite Method BD non-POW media recommendations for UDF 2.50 Main and Reserve VDS far apart BD-R recommendations for UDF 2.60 Enable UDF 2.50 POW read compatibility Consequences of Pseudo OverWrite Method Common aspects of recording for different media Clarify location of Partition Header Descriptor Zero Inf. Length for Non-Allocatable Space Stream Minimum UDF Read Revision for UDF 2.60 media Clarification of Directory bit in parent FID
UDF 2.60
156
March 1, 2005
Note 2 in section 2.1.5.2 explains how a Developer ID should look like. For the latest information on OSTA and UDF visit the OSTA web site, see POINTS OF CONTACT on the first page of this document. The Developer Registration Form is printed on the next page of this document.
UDF 2.60
157
March 1, 2005
Please indicate what value you plan to use as EntityID *Developer ID to identify your implementation. The Developer ID should uniquely identify your company as well as your product, see section 2.1.5.2 note 2 in the latest UDF specification.
_____________________________________________________________________________ O Please add my email address to the OSTA UDF email reflector. O Please send an OSTA Membership kit.
UDF 2.60
158
March 1, 2005
A
Access Control List, 93, 94, 155 Access Type, 9, 27, 32, 45, 54, 141, 144, 146, 150, 151, 152, 153, 156 ACL. See Access Control List AD. See Allocation Descriptor Alignment Unit Size, 33, 41 Allocation Descriptor, 7, 9, 33, 38, 39, 41, 42, 43, 44, 55, 56, 58, 59, 60, 61, 89, 142, 154 Allocation Extent Descriptor, 8, 9, 41, 61, 104 Allocation Unit Size, 33, 41 Anchor Volume Descriptor Pointer, 7, 8, 19, 20, 23, 47, 104, 129, 133, 134, 136, 137, 138, 145, 146, 148, 151, 155 Application Entity Identifier. See Entity Identifier Application Identifier Suffix. See Entity Identifier AVDP. See Anchor Volume Descriptor Pointer
B
BD. See Blu-ray Disc BeOS, 108, 109 Blu-ray Disc, 151, 152, 153 BDAV, 151, 153 BDMV, 151, 153 BD-R, 151, 152, 153 BD-RE, 151, 152, 153 BD-ROM, 151, 153 bridge. See UDF Bridge
Developer Registration Form, 1, 108, 128, 157, 158 direct entry, 115 Domain, 1, 17, 24, 25, 49, 50, 106, 155 Domain Entity Identifier. See Entity Identifier Domain Identifier, 15, 17, 24, 25, 48, 49, 50 Domain Identifier Suffix. See Entity Identifier DOS, 66, 67, 71, 72, 77, 98, 108, 109, 116 dstring, 12, 13, 16, 22, 29, 30, 35, 49, 154 Duplicate Metadata Flag, 33, 38, 39, 41, 42, 43, 148, 149 DVD, 77, 106, 107, 128, 129, 130, 131, 154 DVD Copyright Management Information, 77, 106, 154 DVD+MRW, 146 DVD+R, 144, 147 DVD+RW, 144 DVD-R, 141, 142, 143, 147 DVD-RAM, 141, 143 DVD-ROM, 128, 137 DVD-RW, 141, 143 DVD-Video, 128, 129
E
EA. See Extended Attribute ECC block, 4, 23, 33, 37, 46, 144, 151, 156 ECMA 167, 1, 2, 3, 4, 157 EFE. See Extended File Entry Entity Identifier, 8, 14, 15, 25, 28, 50, 53, 106, 107, 108 Application Entity Identifier, 14, 18 Application Identifier Suffix, 14, 15, 18 Domain Entity Identifier, 14, 17 Domain Identifier Suffix, 14, 15, 17 Identifier Suffix, 14, 17, 18, 25, 31, 32, 33, 37, 50, 108, 154 Implementation Entity Identifier, 14, 18 Implementation Identifier Suffix, 14, 15, 16, 18 Suffix Type, 14, 15, 16 UDF Entity Identifier, 14, 18, 106, 107 UDF Identifier Suffix, 14, 15, 16, 18 Extended Attribute, 3, 7, 42, 56, 69, 73, 76, 77, 78, 79, 81, 82, 83, 85, 106 Extended Attribute Header Descriptor, 73, 104 Extended File Entry, 7, 52, 57, 64, 65, 73, 74, 83, 84, 85, 104, 142 Extent Length, 8, 9, 10, 41, 57, 58, 59, 154
C
CD-MRW, 146 CD-R, 3, 4, 5, 31, 34, 89, 132, 134, 135, 147 CD-ROM, 4, 92, 132, 137 CD-RW, 4, 31, 36, 132, 135 Character Set, 11, 12, 21, 22, 24, 29, 48, 49, 96 charspec, 12, 21, 22, 24, 29, 48, 49 checksum EA Header Checksum, 76, 77, 78, 79, 81, 82, 83, 127 Tag Checksum, 20, 47, 129 CRC CRC Calculation, 112, 114 Descriptor CRC, 8, 20, 47, 130 Descriptor CRC Length, 8, 20, 42, 47, 59, 61 File Identifier CRC, 99, 100, 101, 102, 103 CS0, 11, 12, 16, 22, 24, 29, 49, 95, 97, 99, 100, 101, 102, 103, 110
F
FE. See File Entry FID. See File Identifier Descriptor File Entry, 6, 7, 9, 15, 33, 34, 38, 39, 41, 42, 44, 52, 56, 57, 64, 65, 69, 72, 73, 74, 78, 79, 81, 83, 84, 86, 88, 89, 104, 128, 130, 131, 142 File Identifier, 12, 51, 52, 53, 66, 96, 97, 98, 99, 100, 101, 102, 103, 116, 156 File Identifier CRC. See CRC
D
defect management, 31, 36, 134, 144, 146, 147, 150, 152, 153 Descriptor CRC. See CRC Descriptor CRC Length. See CRC Descriptor Tag, 19, 20, 37, 42, 47, 53, 59, 61 Developer ID, 15, 16, 75, 157, 158
UDF 2.60
159
March 1, 2005
File Identifier Descriptor, 6, 7, 9, 12, 15, 28, 41, 51, 52, 53, 57, 64, 65, 66, 72, 84, 85, 86, 87, 88, 93, 96, 104, 130, 131, 155, 156 File Link Count, 39, 56, 57, 84 File Set Descriptor, 7, 9, 15, 17, 25, 39, 41, 48, 49, 50, 83, 85, 86, 88, 90, 104, 130, 133, 145 File Set Descriptor Sequence, 25 File Set Identifier, 48, 95, 116 File Structure, 4, 17, 47, 66, 95, 141, 142, 143, 148, 151, 152, 153 File Type, 34, 41, 42, 54, 75, 85, 95, 136, 143, 153, 155 free space, 26, 27, 128, 137 Free Space Table, 26, 27, 34, 128 Freed Space Bitmap, 45, 50, 137, 141, 142 Freed Space Table, 45, 50, 137, 141, 142 FSD. See File Set Descriptor
Logical Volume Integrity Descriptor, 7, 9, 16, 25, 26, 27, 34, 36, 59, 64, 65, 72, 86, 104, 137, 145, 146, 155, 156 Logical Volume Integrity Sequence. See Integrity Sequence LV. See Logical Volume LVD. See Logical Volume Descriptor LVID. See Logical Volume Integrity Descriptor
M
Mac OS. See Macintosh Macintosh, 3, 28, 64, 66, 67, 71, 72, 76, 78, 79, 80, 81, 82, 93, 98, 100, 106, 108, 109, 123 Maximum UDF Write Revision, 27, 28, 35, 36 Metadata bit, 84, 85, 86, 93 Metadata Bitmap File, 33, 34, 38, 39, 40, 42, 43, 44, 54, 150, 151, 156 Metadata File, 33, 34, 38, 39, 41, 42, 43, 44, 54, 147, 150, 151, 152, 156 Metadata Mirror File, 33, 34, 38, 39, 40, 41, 42, 43, 54, 56, 147, 148, 149, 150, 151, 152, 156 Metadata Partition, 32, 34, 38, 39, 40, 42, 43, 44, 51, 56, 106 Metadata Partition Map, 16, 32, 33, 38, 39, 41, 42, 43, 51, 56, 60, 148, 149, 150, 153, 156 Minimum UDF Read Revision, 10, 27, 28, 35, 36, 46, 141, 154, 156 Minimum UDF Write Revision, 27, 28, 35, 36, 141, 154, 156 Mount Rainier, 146 MRW. See Mount Rainier Multisession, 3, 132, 133, 135, 136, 137, 138, 139, 150, 153, 155
H
HardWriteProtect, 17, 25, 48, 50
I
ICB ICB, 4, 6, 7, 34, 35, 36, 38, 39, 41, 42, 48, 51, 52, 54, 56, 58, 60, 64, 65, 66, 67, 69, 73, 84, 85, 87, 88, 92, 95, 96, 115, 132, 142, 153 ICB hierarchy, 86, 115 ICB Tag, 9, 41, 42, 54, 56, 58, 67, 69, 75, 85, 89, 95, 115, 136, 156 Parent ICB Location, 54, 156 VAT ICB. See VAT Identifier Suffix. See Entity Identifier Implementation Entity Identifier. See Entity Identifier Implementation Identifier Suffix. See Entity Identifier Implementation Use Volume Descriptor, 7, 15, 29, 104 Indirect Entry, 104, 115 Information Control Block. See ICB Information Length, 35, 36, 41, 42, 43, 44, 56, 57, 78, 89, 155 Integrity Sequence, 9, 24, 25, 142 interchange level FSD Interchange Level, 48, 49 PVD Interchange Level, 21, 22, 59 IUVD. See Implementation Use Volume Descriptor
N
Named Stream. See streams Next Writable Address, 5, 7, 147, 150 Non-Allocatable Space, 37, 38, 86, 88, 133, 141, 142, 144, 145, 146, 151, 154, 155, 156 Number of Directories, 27, 28, 34, 35, 36 Number of Files, 27, 28, 35, 36 NWA. See Next Writable Address
O
Orphan Space, 105 OS Class, 18, 108, 109 OS Identifier, 18, 108, 109, 156 OS/2, 3, 66, 67, 71, 72, 76, 78, 82, 93, 96, 98, 99, 106, 107, 108, 109, 123, 155 OS/400, 66, 68, 71, 72, 81, 103, 106, 107, 108, 109, 155 OSTA contact information, i, 108, 157 OSTA CS0 Charspec. See CS0 OSTA email reflector, i, 108, 157, 158 OSTA UDF Committee, i, 108, 157 Overwritable, 4, 8, 45, 141, 144, 147
L
Logical Block Size, 8, 9, 24, 33, 39, 41, 58, 61, 104, 128 Logical Sector Size, 8, 24, 130, 144, 151 Logical Volume, 6, 7, 8, 9, 24, 25, 26, 27, 28, 29, 36, 50, 51, 59, 64, 79, 97, 105, 106, 137 Logical Volume Descriptor, 6, 7, 8, 9, 15, 17, 24, 25, 28, 31, 32, 36, 40, 104, 130, 136, 155 Logical Volume Header Descriptor, 52, 57, 64 Logical Volume Identifier, 9, 24, 29, 35, 36, 48, 49, 95, 116, 154
UDF 2.60
160
March 1, 2005
overwritable (Partition Access Type), 9, 32, 39, 45, 46, 141, 144, 146, 152
P
packet, 4, 5, 6, 31, 32, 36, 37, 38, 89, 133, 134, 141, 142, 144 Packet Length, 31, 32, 33, 37, 46, 133, 144, 155 Parent ICB Location. See ICB Partition Access Type. See Access Type Partition Descriptor, 7, 9, 15, 32, 33, 37, 45, 50, 104, 130, 150, 151, 152, 153, 155 Partition Header Descriptor, 46, 50, 137, 156 Partition Integrity Entry, 9, 16, 59, 104 Partition Map, 5, 6, 9, 24, 25, 31, 32, 33, 34, 36, 40, 134 Partition Number, 6, 31, 32, 33, 45, 130 Partition Reference Number, 5, 40, 87, 88 Path Component, 62 Pathname, 62 PD. See Partition Descriptor POW. See Pseudo OverWrite power calibration, 16, 86, 89, 90, 91, 92, 155 Primary Volume Descriptor, 7, 8, 9, 15, 21, 104, 155 Pseudo OverWrite, 5, 7, 45, 147, 150, 152, 153, 156 pseudo-overwritable (Partition Access Type), 9, 27, 32, 38, 40, 45, 46, 50, 147, 150, 153 PVD. See Primary Volume Descriptor
Named Stream, 4, 28, 37, 38, 39, 51, 57, 60, 64, 67, 68, 78, 83, 84, 85, 86, 93, 94, 155 Stream Directory, 28, 39, 41, 42, 51, 52, 57, 60, 64, 83, 84, 85 System Stream, 83, 85, 86, 88, 90, 92, 155 System Stream Directory, 48, 52, 64, 83, 84, 85, 86, 88 Suffix Type. See Entity Identifier Symbolic Link, 95, 129, 153 System Stream. See streams System Stream Directory. See streams
T
Tag Location, 20, 42, 47, 60 Tag Serial Number, 19, 20, 47, 155 Terminal Entry, 104 Terminating Descriptor, 41, 104, 105 Timestamp, 8, 13, 14, 63, 78, 91, 92
U
UDF Bridge, 128, 132, 135, 136, 138, 139 UDF Entity Identifier. See Entity Identifier UDF Identifier Suffix. See Entity Identifier Unallocated Space Bitmap, 40, 44, 50, 88, 134, 137, 141, 142, 143, 150, 151, 152, 153 Unallocated Space Descriptor, 7, 8, 9, 26, 104 Unallocated Space Entry, 9, 58, 104, 154 Unallocated Space Table, 50, 88, 134, 137, 141, 142, 150, 151, 152, 153 Unicode, 11, 12, 53, 96, 97, 99, 110, 129, 155, 156 UniqueID Next UniqueID, 26, 64, 65, 87 UDF UniqueID, 52, 57, 64, 65, 86, 87, 88, 156 UniqueID, 26, 56, 57, 64, 69, 72, 154 UNIX, 66, 68, 71, 72, 81, 93, 94, 95, 98, 102, 108, 109, 123, 156 unrecorded sector, 105, 148, 150 USD. See Unallocated Space Descriptor used track, 5, 147 User Interface, 2, 95
R
Read-Only, 4, 46, 71, 86, 129, 131, 132, 137, 151 read-only (Partition Access Type), 9, 27, 32, 38, 39, 40, 46, 50, 134, 137, 151, 153, 156 Real-Time file, 54, 136, 143, 155 Record Structure, 10, 62 Recordable, 4, 89, 151, 152 reserved track, 5, 148, 150 Rewritable, 4, 5, 8, 35, 45, 50, 59, 60, 86, 141, 145, 146, 151, 152 rewritable (Partition Access Type), 9, 45 Root Directory, 25, 28, 34, 48, 51, 57, 64, 79, 129, 130, 133, 142, 143, 145, 153
S
SBD. See Space Bitmap Descriptor session, 4, 5, 132, 133, 134, 135, 136, 137, 138, 147 Size Table, 26, 27, 34 SoftWriteProtect, 17, 25, 50 Space Bitmap Descriptor, 7, 8, 42, 44, 59, 104, 143 Sparable Partition Map, 16, 31, 32, 33, 36, 37, 46, 88, 141, 142, 151, 154 sparing, 37, 38, 89, 132, 133, 134, 144, 145 Sparing Table, 16, 20, 31, 32, 36, 37, 47, 104, 106, 107, 133, 134, 141, 142, 143, 144, 146, 151, 154, 156 Strategy Type, 9, 48, 54, 105, 115, 128, 142, 153 Stream Directory. See streams streams
V
VAT VAT, 6, 7, 16, 31, 34, 35, 36, 65, 86, 132, 136, 137, 141, 142, 154 VAT ICB, 6, 34, 35, 36, 65, 72, 136, 137, 142 Virtual Allocation Table. See VAT VDS. See Volume Descriptor Sequence Virtual Allocation Table. See VAT virtual partition, 31, 137 Virtual Partition Map, 6, 16, 31, 32, 34, 59, 136, 141, 142, 154 Volume Descriptor Pointer, 104 Volume Descriptor Sequence, 7, 10, 23, 129, 130, 133, 136, 138, 141, 145, 153, 156 Volume Identifier, 21, 95, 116
UDF 2.60
161
March 1, 2005
Volume Recognition Sequence, 7, 8, 19, 129, 133, 135, 137, 138, 145, 155, 156 Volume Set, 8, 9, 21, 22, 24, 25, 29, 153, 154 Volume Set Identifier, 21, 22, 95, 116 Volume Structure, 4, 17, 20, 47, 64, 95, 141, 142, 143, 148, 151, 152 VRS. See Volume Recognition Sequence
Windows CE, 108, 109 Windows NT, 66, 67, 71, 72, 77, 94, 101, 108, 109, 123 WORM, 8, 9, 25, 48, 54, 105, 156 Write-Once, 4, 5, 9, 23, 46, 53, 54, 86, 142, 152 write-once (Partition Access Type), 9, 54, 137, 143, 153
W
Windows, 66, 67, 77, 109 Windows 95, 66, 67, 71, 72, 77, 101, 108, 109, 123
UDF 2.60
162
March 1, 2005