Ticket #5695: reiserfs-3.5-fix.patch
File reiserfs-3.5-fix.patch, 1.7 KB (added by , 14 years ago) |
---|
-
src/add-ons/kernel/file_systems/reiserfs/SuperBlock.cpp
32 32 \class DirEntry 33 33 \brief Represents the on-disk structure for super block of the FS. 34 34 35 There exist two versions of the structure and this class can deal with 36 both of them. The Init() methods tries to find and read the super block 37 from disk. 35 There exist two versions of the structure and this class can deal with both 36 of them. This class can also handle a very old layout that puts the super 37 block in a different location. The Init() methods tries to find and read 38 the super block from disk. 38 39 */ 39 40 40 41 // read_super_block … … 95 96 status_t 96 97 SuperBlock::Init(int device, off_t offset) 97 98 { 98 // Not sure, if I understand the weird versioning.99 99 status_t error = B_OK; 100 // try old version 100 // try old version and old layout 101 101 if (read_super_block(device, REISERFS_OLD_DISK_OFFSET_IN_BYTES + offset, 102 102 REISERFS_SUPER_MAGIC_STRING, &fOldData) == B_OK) { 103 PRINT(("SuperBlock: ReiserFS 3.5 (old layout)\n")); 104 fFormatVersion = REISERFS_3_5; 105 // try old version and new layout 106 } else if (read_super_block(device, REISERFS_DISK_OFFSET_IN_BYTES + offset, 107 REISERFS_SUPER_MAGIC_STRING, &fOldData) == B_OK) { 103 108 PRINT(("SuperBlock: ReiserFS 3.5\n")); 104 109 fFormatVersion = REISERFS_3_5; 105 // try new version 110 // try new version and new layout 106 111 } else if (read_super_block(device, REISERFS_DISK_OFFSET_IN_BYTES + offset, 107 112 REISER2FS_SUPER_MAGIC_STRING, &fOldData) == B_OK) { 108 113 PRINT(("SuperBlock: ReiserFS 3.6\n"));