AFS3 Dump Stream Tag Registry This is a registry of AFS Dump Stream Tag and Sub-tag values and their parsing rules. All new Tag and Sub-tag assignments are on a first-come first-served basis and must comply with the following rules to ensure that a dump stream containing unrecognized Tag and Sub-tag values can be successfully parsed. 1. All new D_HEADER Tags are a. allocated in the range 0x05 .. 0x14 b. parsed using Tag-Length-Value (TLV) rules c. assigned a private namespace of Sub-tags 2. All valid Sub-tags are allocated in the range 0x15 .. 0x7d 3. The parsing rules of all new sub-tags are determined by the sub-tag value a. Sub-tags allocated in the range 0x15 .. 0x60 are TLV b. Sub-tags allocated in the range 0x61 .. 0x7a immediately followed by a 32-bit integer in network-byte-order. c. Sub-tags allocated in the range 0x7b .. 0x7d are not followed by any data. 4. TLV tags are followed by a variable length "Length" field which is followed by the specified number of octets. The "Length" field is parsed as follows: a. If the first octet is less than or equal to 0x7f, then the Value that follows is that number of octets. b. If the first octet is 0x80, then the Value that follows is of indefinite length. The value data that follows must be self-describing with regards to length. In other words, a parser that understands the data format must be able to identify the end of the value from the contents of the data. If an indefinite length tag or sub-tag is unrecognized, it is a fatal error regardless of whether or not the CRITICAL tag preceded it. c. If the first octet (call it 'L') is between 0x81 and 0x88, the length is the value of the next (L & 0x0f) octets combined in most significant byte (MSB) order. i. 0x81 indicates one byte ii. 0x82 two bytes iii. 0x88 eight bytes d. If the first octet is greater than 0x88, it is an invalid length which is a fatal error. These parsing rules were adopted by the community on 11 Sept 2009. Many Tags and Sub-tags in use prior to that date are in violation of the rules and are designated as "Legacy". All Legacy Tags and Sub-tags must be explicitly understood in order to successfully parse a dump stream containing them. Failure to understand a Legacy Tag or Sub-tag must be treated as a fatal error regardless of whether or not the Tag or Sub-tag was preceded by the CRITICAL tag. D_HEADER Tags (0x01 .. 0x14) ---------------------------- Dec/ASCII Hex Name Source Parsing Rules --------- ----- ------------------------ ------------- ----------------------- 0x01 D_DUMPHEADER IBM Legacy: structure 0x02 D_VOLUMEHEADER IBM Legacy: dataless 0x03 D_VNODE IBM Legacy: structure 0x04 D_DUMPEND IBM Legacy: End of stream D_DUMPHEADER Sub-Tags (0x15 .. 0x7d) ------------------------------------ Dec/ASCII Hex Name Source Parsing Rules --------- ----- ------------------------ ------------- ----------------------- 21 0x15 64-bit Volume ID AuriStor TLV 22 0x16 100ns Dump Times AuriStor TLV 'n' 0x6e Volume Name IBM Legacy: C-String 't' 0x74 32-bit Dump Times IBM Legacy: 32-bit NBO 'v' 0x76 32-bit Volume ID IBM Legacy: 32-bit NBO D_VOLUMEHEADER Sub-Tags (0x15 .. 0x7d) -------------------------------------- Dec/ASCII Hex Name Source Parsing Rules --------- ----- ------------------------ ------------- ----------------------- 21 0x15 64-bit Volume IDs AuriStor TLV 22 0x16 Volume Maximum ACL AuriStor TLV 23 0x17 Volume Sec Levels AuriStor TLV 24 0x18 64-bit Max Quota AuriStor TLV 25 0x19 64-bit Disk Usage AuriStor TLV 26 0x1a 100ns Timestamps AuriStor TLV 27 0x1b 64-bit Features AuriStor TLV 28 0x1c 64-bit Owner AuriStor TLV 29 0x1d 64-bit Min Quota AuriStor TLV 30 0x1e 64-bit File Count AuriStor TLV 'A' 0x41 32-bit Last Access Date OSD Legacy: 32-bit NBO 'B' 0x42 32-bit Backup Date IBM Legacy: 32-bit NBO 'C' 0x43 32-bit Creation Date IBM Legacy: 32-bit NBO 'D' 0x44 32-bit Day Use Date IBM Legacy: 32-bit NBO [deprecated] 'E' 0x45 32-bit Expiration Date IBM Legacy: 32-bit NBO 'F' 0x46 OSD Policy OSD Legacy: 32-bit NBO [deprecated - replaced by 'P'] 'M' 0x4d MOTD IBM Legacy: C-String [deprecated] 'O' 0x4f Offline Message IBM Legacy: C-String 'P' 0x50 OSD Policy OSD Legacy: 32-bit NBO [deprecated - replaced by 'y'] 'U' 0x55 32-bit Update Date IBM Legacy: 32-bit NBO 'V' 0x56 32-bit Update Counter OpenAFS Legacy: 32-bit NBO 'W' 0x57 Week Use Statistics IBM Legacy: structure [deprecated] 'Z' 0x5a Day Use Statistics IBM Legacy: 32-bit NBO [deprecated] 'a' 0x61 Account Number IBM Standard [deprecated] 'b' 0x62 Blessed Flag IBM Legacy: 8-bit 'c' 0x63 32-bit Clone Id IBM Standard 'd' 0x64 32-bit Disk Usage IBM Standard 'f' 0x66 32-bit File Count IBM Standard 'i' 0x69 32-bit Volume Id IBM Standard 'm' 0x6d 32-bit Volume Min Quota IBM Standard 'n' 0x6e Volume Name IBM Legacy: C-String 'o' 0x6f 32-bit Volume Owner IBM Standard 'p' 0x70 32-bit Parent Volume Id IBM Standard 'q' 0x71 32-bit Volume Max Quota IBM Standard 'r' 0x72 OSD Max number of files OSD Standard 's' 0x73 In-Service Flag IBM Legacy: 8-bit 't' 0x74 Volume Type IBM Legacy: 8-bit 'u' 0x75 32-bit Next Uniquifier IBM Standard 'v' 0x76 32-bit Stamp Version IBM Standard [deprecated] 'y' 0x79 OSD Policy OSD Standard D_VNODE Sub-Tags (0x15 .. 0x7d) ------------------------------- Dec/ASCII Hex Name Source Parsing Rules --------- ----- ------------------------ ------------- ----------------------- 21 0x15 File ACL AuriStor TLV [deprecated] 22 0x16 100ns Timestamps AuriStor TLV 23 0x17 64-bit A, O, G IDs AuriStor TLV 24 0x18 96-bit Vnode# Parent# AuriStor TLV 25 0x19 64-bit Data Version AuriStor TLV 26 0x1a 64-bit Ext ACL AuriStor TLV 'A' 0x41 32-bit ACL IBM Legacy: C-String 'L' 0x4c OSD vnode length (hi,lo) OSD TLV 'O' 0x4f OSD metadata string OSD TLV 'P' 0x50 OSD dir policy index OSD Legacy: 32-bit NBO [deprecated - replaced by 'd'] 'a' 0x61 32-bit Author ID IBM Standard 'b' 0x62 Unix Mode Bits IBM Legacy: 16-bit NBO 'd' 0x64 OSD dir policy index OSD Standard 'f' 0x66 File Stream - Small IBM Legacy: structured 'g' 0x67 32-bit Group ID IBM Standard 'h' 0x68 File Stream - Large OpenAFS Legacy: structured 'l' 0x6c Link Count IBM Legacy: 16-bit NBO 'm' 0x6d 32-bit UNIX Modify Time IBM Standard 'o' 0x6f 32-bit Owner ID IBM Standard 'p' 0x70 32-bit Parent Vnode # IBM Standard 's' 0x73 32-bit Server Modify Time IBM Standard 't' 0x74 Vnode Type IBM Legacy: 8-bit 'u' 0x75 32-bit Last Access Time OSD Standard [deprecated] 'v' 0x76 32-bit Data Version IBM Standard 'x' 0x78 OSD File Online Flag OSD Standard 'y' 0x79 OSD vnode length OSD Legacy: structure [deprecated - replaced by 'L'] 'z' 0x7a OSD metadata string OSD Legacy: C-String [deprecated - replaced by 'O'] 123 0x7b white out file or opaque AuriStor Standard directory D_DUMPEND Sub-Tags ------------------ D_DUMPEND indicates the end of the dump stream and cannot be followed by any sub-tags. Miscellaneous Tags ------------------ Dec/ASCII Hex Name Source Parsing Rules --------- ----- ------------------------ ------------- ----------------------- 0x00 Invalid Tag Registrar Dataless 0x7e Next Tag is CRITICAL Registrar Dataless 0x7f Reserved Registrar Dataless Structured Legacy Tags and Sub-Tags ----------------------------------- The structured Legacy sub-tags cannot be parsed without knowledge of the structure fields. This section documents those fields. D_DUMPHEADER 0x01: The D_DUMPHEADER tag is followed by two fields and Sub-tags: 1. a 32-bit NBO unsigned DUMPBEGINMAGIC (0xB3A11322) 2. a 32-bit NBO unsigned DUMPVERSION (0x00000001) 3. zero or more D_DUMPHEADER Sub-tags D_VNODE 0x03: The D_VNODE tag is followed by two fields and Sub-tags: 1. a 32-bit NBO unsigned representing the vnodeNumber 2. a 32-bit NBO unsigned representing the uniqueNumber 3. zero or more D_VNODE Sub-tags D_VOLUMEHEADER 'W' 0x57 Week Use Statistics: The Week Use Statistics are parsed as: 1. a 16-bit NBO count 2. 'count' x 32-bit NBO values D_VNODEHEADER 'f' 0x66 File Stream - Small: The File Stream - Small Sub-tag is used when the stream length in octets does not exceed 0xFFFFFFFF. 1. a 32-bit NBO count of the number of octets in the stream 2. 'count' octets D_VNODEHEADER 'h' 0x68 File Stream - Large: The File Stream - Large Sub-tag is used when the stream length in octets exceeds 0xFFFFFFFF. 1. a 32-bit NBO unsigned 'hi' number of octets 2. a 32-bit NBO unsigned 'lo' number of octets 3. ('hi' << 32 | 'lo') octets D_VNODEHEADER 'y' 0x79 OSD vnode length: The OSD vnode length sub-tag is parsed as 1. a 32-bit NBO unsigned 'hi' number 2. a 32-bit NBO unsigned 'lo' number producing a 64-bit value ('hi' << 32 | 'lo'). Unlike D_VNODEHEADER 'h' this value is not followed by the stream content.