587 |
|| ! devread (superblock, 0, sizeof (struct reiserfs_super_block), |
|| ! devread (superblock, 0, sizeof (struct reiserfs_super_block), |
588 |
(char *) &super)) |
(char *) &super)) |
589 |
return 0; |
return 0; |
590 |
|
|
591 |
if (substring (REISER2FS_SUPER_MAGIC_STRING, super.s_magic) > 0 |
if (substring (REISER2FS_SUPER_MAGIC_STRING, super.s_magic) > 0 |
592 |
&& substring (REISERFS_SUPER_MAGIC_STRING, super.s_magic) > 0) |
&& substring (REISERFS_SUPER_MAGIC_STRING, super.s_magic) > 0) |
593 |
{ |
{ |
601 |
super.s_version = 0; |
super.s_version = 0; |
602 |
} |
} |
603 |
} |
} |
604 |
|
|
605 |
/* check the version number. */ |
/* check the version number. */ |
606 |
if (super.s_version > REISERFS_MAX_SUPPORTED_VERSION) |
if (super.s_version > REISERFS_MAX_SUPPORTED_VERSION) |
607 |
return 0; |
return 0; |
612 |
INFO->blocksize_shift = INFO->fullblocksize_shift - SECTOR_BITS; |
INFO->blocksize_shift = INFO->fullblocksize_shift - SECTOR_BITS; |
613 |
INFO->cached_slots = |
INFO->cached_slots = |
614 |
(FSYSREISER_CACHE_SIZE >> INFO->fullblocksize_shift) - 1; |
(FSYSREISER_CACHE_SIZE >> INFO->fullblocksize_shift) - 1; |
615 |
|
|
616 |
if (super.s_blocksize < FSYSREISER_MIN_BLOCKSIZE |
if (super.s_blocksize < FSYSREISER_MIN_BLOCKSIZE |
617 |
|| super.s_blocksize > FSYSREISER_MAX_BLOCKSIZE |
|| super.s_blocksize > FSYSREISER_MAX_BLOCKSIZE |
618 |
|| (SECTOR_SIZE << INFO->blocksize_shift) != super.s_blocksize) |
|| (SECTOR_SIZE << INFO->blocksize_shift) != super.s_blocksize) |
643 |
printf ("root read_in: block=%d, depth=%d\n", |
printf ("root read_in: block=%d, depth=%d\n", |
644 |
super.s_root_block, INFO->tree_depth); |
super.s_root_block, INFO->tree_depth); |
645 |
#endif /* REISERDEBUG */ |
#endif /* REISERDEBUG */ |
646 |
|
|
647 |
if (INFO->tree_depth >= MAX_HEIGHT) |
if (INFO->tree_depth >= MAX_HEIGHT) |
648 |
return 0; |
return 0; |
649 |
if (INFO->tree_depth == DISK_LEAF_NODE_LEVEL) |
if (INFO->tree_depth == DISK_LEAF_NODE_LEVEL) |