1 2 3 4 5 6 7 8 9 10 | 698 /* Header of a disk block. More precisely, header of a formatted leaf 699 or internal node, and not the header of an unformatted node. */ 700 struct block_head { 701 __le16 blk_level; /* Level of a block in the tree. */ 702 __le16 blk_nr_item; /* Number of keys/items in a block. */ 703 __le16 blk_free_space; /* Block free space in bytes. */ 704 __le16 blk_reserved; 705 /* dump this in v4/planA */ 706 struct reiserfs_key blk_right_delim_key; /* kept only for compatibility */ 707 }; |
1 2 3 4 5 6 7 | 1086 /* Disk child pointer: The pointer from an internal node of the tree 1087 to a node that is on disk. */ 1088 struct disk_child { 1089 __le32 dc_block_number; /* Disk child's block number. */ 1090 __le16 dc_size; /* Disk child's used space. */ 1091 __le16 dc_reserved; 1092 }; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 460 /* Everything in the filesystem is stored as a set of items. The 461 item head contains the key of the item, its free space (for 462 indirect items) and specifies the location of the item itself 463 within the block. */ 464 465 struct item_head { 466 /* Everything in the tree is found by searching for it based on 467 * its key.*/ 468 struct reiserfs_key ih_key; 469 union { 470 /* The free space in the last unformatted node of an 471 indirect item if this is an indirect item. This 472 equals 0xFFFF iff this is a direct item or stat data 473 item. Note that the key, not this field, is used to 474 determine the item type, and thus which field this 475 union contains. */ 476 __le16 ih_free_space_reserved; 477 /* Iff this is a directory item, this field equals the 478 number of directory entries in the directory item. */ 479 __le16 ih_entry_count; 480 } __attribute__ ((__packed__)) u; 481 __le16 ih_item_len; /* total size of the item body */ 482 __le16 ih_item_location; /* an offset to the item body 483 * within the block */ 484 __le16 ih_version; /* 0 for all old items, 2 for new 485 ones. Highest bit is set by fsck 486 temporary, cleaned after all 487 done */ 488 } __attribute__ ((__packed__)); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 346 // 347 // there are 5 item types currently 348 // 349 #define TYPE_STAT_DATA 0 350 #define TYPE_INDIRECT 1 351 #define TYPE_DIRECT 2 352 #define TYPE_DIRENTRY 3 353 #define TYPE_MAXTYPE 3 354 #define TYPE_ANY 15 // FIXME: comment is required 355 … 509 // 510 // in old version uniqueness field shows key type 511 // 512 #define V1_SD_UNIQUENESS 0 513 #define V1_INDIRECT_UNIQUENESS 0xfffffffe 514 #define V1_DIRECT_UNIQUENESS 0xffffffff 515 #define V1_DIRENTRY_UNIQUENESS 500 516 #define V1_ANY_UNIQUENESS 555 // FIXME: comment is required 517 |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |