Lines Matching refs:INFO
82 return reiserfs_devread ((INFO->journal_block + block) << INFO->blocksize_shift, in journal_read()
93 int transactions = INFO->journal_transactions; in block_read()
94 int desc_block = INFO->journal_first_desc; in block_read()
95 int journal_mask = INFO->journal_block_count - 1; in block_read()
145 translatedNr = INFO->journal_block + ((desc_block + i) & journal_mask); in block_read()
148 blockNr, translatedNr - INFO->journal_block); in block_read()
156 return reiserfs_devread (translatedNr << INFO->blocksize_shift, start, len, buffer); in block_read()
170 unsigned int block_count = INFO->journal_block_count; in journal_init()
184 INFO->journal_first_desc = desc_block; in journal_init()
261 INFO->journal_transactions in journal_init()
309 INFO->version = sb_version(&super); in reiserfs_mount()
310 INFO->blocksize = sb_blocksize(&super); in reiserfs_mount()
311 INFO->fullblocksize_shift = log2 (sb_blocksize(&super)); in reiserfs_mount()
312 INFO->blocksize_shift = INFO->fullblocksize_shift - SECTOR_BITS; in reiserfs_mount()
313 INFO->cached_slots = in reiserfs_mount()
314 (FSYSREISER_CACHE_SIZE >> INFO->fullblocksize_shift) - 1; in reiserfs_mount()
318 INFO->version, INFO->blocksize); in reiserfs_mount()
322 memset (INFO->blocks, 0, sizeof (INFO->blocks)); in reiserfs_mount()
326 || (SECTOR_SIZE << INFO->blocksize_shift) != sb_blocksize(&super)) in reiserfs_mount()
332 INFO->journal_transactions = 0; in reiserfs_mount()
335 INFO->journal_block = sb_journal_block(&super); in reiserfs_mount()
336 INFO->journal_block_count = sb_journal_size(&super); in reiserfs_mount()
337 if (is_power_of_two (INFO->journal_block_count)) in reiserfs_mount()
341 block_read (superblock >> INFO->blocksize_shift, in reiserfs_mount()
345 if (! block_read (sb_root_block(&super), 0, INFO->blocksize, (char*) ROOT)) in reiserfs_mount()
349 INFO->tree_depth = __le16_to_cpu(BLOCKHEAD (cache)->blk_level); in reiserfs_mount()
353 sb_root_block(&super), INFO->tree_depth); in reiserfs_mount()
356 if (INFO->tree_depth >= MAX_HEIGHT) in reiserfs_mount()
358 if (INFO->tree_depth == DISK_LEAF_NODE_LEVEL) in reiserfs_mount()
362 memcpy (LEAF, ROOT, INFO->blocksize); in reiserfs_mount()
395 int num_cached = INFO->cached_slots; in read_tree_node()
401 if (blockNr == INFO->blocks[depth]) in read_tree_node()
411 if (! block_read (blockNr, 0, INFO->blocksize, cache)) in read_tree_node()
420 INFO->blocks[depth] = blockNr; in read_tree_node()
431 struct item_head *ih = INFO->current_ih + 1; in next_key()
436 __le32_to_cpu(INFO->current_ih->ih_key.k_dir_id), in next_key()
437 __le32_to_cpu(INFO->current_ih->ih_key.k_objectid), in next_key()
438 __le32_to_cpu(INFO->current_ih->ih_key.u.v1.k_offset), in next_key()
439 __le32_to_cpu(INFO->current_ih->ih_key.u.v1.k_uniqueness), in next_key()
440 __le16_to_cpu(INFO->current_ih->ih_version)); in next_key()
451 if (depth == INFO->tree_depth) in next_key()
460 printf (" depth=%d, i=%d\n", depth, INFO->next_key_nr[depth]); in next_key()
463 while (INFO->next_key_nr[depth] == 0); in next_key()
465 if (depth == INFO->tree_depth) in next_key()
467 else if (depth <= INFO->cached_slots) in next_key()
471 cache = read_tree_node (INFO->blocks[depth], depth); in next_key()
479 int key_nr = INFO->next_key_nr[depth]++; in next_key()
485 INFO->next_key_nr[depth] = 0; in next_key()
496 INFO->current_ih = ih; in next_key()
497 INFO->current_item = &LEAF[__le16_to_cpu(ih->ih_item_location)]; in next_key()
500 __le32_to_cpu(INFO->current_ih->ih_key.k_dir_id), in next_key()
501 __le32_to_cpu(INFO->current_ih->ih_key.k_objectid), in next_key()
502 __le32_to_cpu(INFO->current_ih->ih_key.u.v1.k_offset), in next_key()
503 __le32_to_cpu(INFO->current_ih->ih_key.u.v1.k_uniqueness), in next_key()
504 __le16_to_cpu(INFO->current_ih->ih_version)); in next_key()
531 depth = INFO->tree_depth; in search_stat()
556 INFO->next_key_nr[depth] = (i == nr_item) ? 0 : i+1; in search_stat()
575 INFO->current_ih = ih; in search_stat()
576 INFO->current_item = &LEAF[__le16_to_cpu(ih->ih_item_location)]; in search_stat()
595 filepos, len, (__u64) IH_KEY_OFFSET (INFO->current_ih) - 1); in reiserfs_read()
598 if (__le32_to_cpu(INFO->current_ih->ih_key.k_objectid) != INFO->fileinfo.k_objectid in reiserfs_read()
599 || IH_KEY_OFFSET (INFO->current_ih) > filepos + 1) in reiserfs_read()
601 search_stat (INFO->fileinfo.k_dir_id, INFO->fileinfo.k_objectid); in reiserfs_read()
607 if (__le32_to_cpu(INFO->current_ih->ih_key.k_objectid) != INFO->fileinfo.k_objectid) { in reiserfs_read()
611 offset = filepos - IH_KEY_OFFSET (INFO->current_ih) + 1; in reiserfs_read()
612 blocksize = __le16_to_cpu(INFO->current_ih->ih_item_len); in reiserfs_read()
619 if (IH_KEY_ISTYPE(INFO->current_ih, TYPE_DIRECT) in reiserfs_read()
630 memcpy (buf, INFO->current_item + offset, to_read); in reiserfs_read()
633 else if (IH_KEY_ISTYPE(INFO->current_ih, TYPE_INDIRECT)) in reiserfs_read()
635 blocksize = (blocksize >> 2) << INFO->fullblocksize_shift; in reiserfs_read()
643 __u32 blocknr = __le32_to_cpu(((__u32 *) INFO->current_item) in reiserfs_read()
644 [offset >> INFO->fullblocksize_shift]); in reiserfs_read()
645 int blk_offset = offset & (INFO->blocksize-1); in reiserfs_read()
646 to_read = INFO->blocksize - blk_offset; in reiserfs_read()
653 reiserfs_devread (blocknr << INFO->blocksize_shift, in reiserfs_read()
707 stat_data_v1(INFO->current_ih) ? sd_v1_mode((struct stat_data_v1 *) INFO->current_item) : in reiserfs_dir()
708 sd_v2_mode((struct stat_data *) (INFO->current_item)), in reiserfs_dir()
709 stat_data_v1(INFO->current_ih) ? sd_v1_size((struct stat_data_v1 *) INFO->current_item) : in reiserfs_dir()
710 sd_v2_size((struct stat_data *) INFO->current_item) in reiserfs_dir()
714 mode = stat_data_v1(INFO->current_ih) ? in reiserfs_dir()
715 sd_v1_mode((struct stat_data_v1 *) INFO->current_item) : in reiserfs_dir()
716 sd_v2_mode((struct stat_data *) INFO->current_item); in reiserfs_dir()
729 filemax = stat_data_v1(INFO->current_ih) ? in reiserfs_dir()
730 sd_v1_size((struct stat_data_v1 *) INFO->current_item) : in reiserfs_dir()
731 sd_v2_size((struct stat_data *) INFO->current_item); in reiserfs_dir()
748 INFO->fileinfo.k_dir_id = dir_id; in reiserfs_dir()
749 INFO->fileinfo.k_objectid = objectid; in reiserfs_dir()
793 filemax = stat_data_v1(INFO->current_ih) ? in reiserfs_dir()
794 sd_v1_size((struct stat_data_v1 *) INFO->current_item) : in reiserfs_dir()
795 sd_v2_size((struct stat_data *) INFO->current_item); in reiserfs_dir()
800 if (__le16_to_cpu(INFO->current_ih->ih_version) == ITEM_VERSION_2 in reiserfs_dir()
801 && sd_size_hi((struct stat_data *) INFO->current_item) > 0) in reiserfs_dir()
804 INFO->fileinfo.k_dir_id = dir_id; in reiserfs_dir()
805 INFO->fileinfo.k_objectid = objectid; in reiserfs_dir()
834 __le32_to_cpu(INFO->current_ih->ih_key.k_dir_id), in reiserfs_dir()
835 __le32_to_cpu(INFO->current_ih->ih_key.k_objectid), in reiserfs_dir()
836 __le32_to_cpu(INFO->current_ih->ih_key.u.v1.k_offset), in reiserfs_dir()
837 __le32_to_cpu(INFO->current_ih->ih_key.u.v1.k_uniqueness), in reiserfs_dir()
838 __le16_to_cpu(INFO->current_ih->ih_version)); in reiserfs_dir()
841 if (__le32_to_cpu(INFO->current_ih->ih_key.k_objectid) != objectid) in reiserfs_dir()
844 name_end = INFO->current_item + __le16_to_cpu(INFO->current_ih->ih_item_len); in reiserfs_dir()
845 de_head = (struct reiserfs_de_head *) INFO->current_item; in reiserfs_dir()
846 num_entries = __le16_to_cpu(INFO->current_ih->u.ih_entry_count); in reiserfs_dir()
849 char *filename = INFO->current_item + deh_location(de_head); in reiserfs_dir()
879 memcpy(&info_save, INFO, sizeof(struct fsys_reiser_info)); in reiserfs_dir()
881 sd_print_item(INFO->current_ih, INFO->current_item); in reiserfs_dir()
884 memcpy(INFO, &info_save, sizeof(struct fsys_reiser_info)); in reiserfs_dir()