Lines Matching refs:ino

46 	ext2_ino_t	ino;  member
313 icount->list[i].ino = hint->list[i].ino; in ext2fs_create_icount2()
338 ext2_ino_t ino, int pos) in insert_icount_el() argument
345 if (icount->last_lookup && icount->last_lookup->ino == ino) in insert_icount_el()
350 new_size = icount->list[(unsigned)icount->count-1].ino; in insert_icount_el()
378 el->ino = ino; in insert_icount_el()
389 ext2_ino_t ino, int create) in get_icount_el() argument
397 (ino > icount->list[(unsigned)icount->count-1].ino))) { in get_icount_el()
398 return insert_icount_el(icount, ino, (unsigned) icount->count); in get_icount_el()
405 if (ino == icount->list[icount->cursor].ino) in get_icount_el()
408 printf("Non-cursor get_icount_el: %u\n", ino); in get_icount_el()
414 if (ino == icount->list[mid].ino) { in get_icount_el()
418 if (ino < icount->list[mid].ino) in get_icount_el()
428 return insert_icount_el(icount, ino, low); in get_icount_el()
432 static errcode_t set_inode_count(ext2_icount_t icount, ext2_ino_t ino, in set_inode_count() argument
440 key.dptr = (unsigned char *) &ino; in set_inode_count()
457 icount->fullmap[ino] = icount_16_xlate(count); in set_inode_count()
461 el = get_icount_el(icount, ino, 1); in set_inode_count()
469 static errcode_t get_inode_count(ext2_icount_t icount, ext2_ino_t ino, in get_inode_count() argument
477 key.dptr = (unsigned char *) &ino; in get_inode_count()
492 *count = icount->fullmap[ino]; in get_inode_count()
496 el = get_icount_el(icount, ino, 0); in get_inode_count()
519 if (icount->list[i-1].ino >= icount->list[i].ino) { in ext2fs_icount_validate()
521 bad, i-1, icount->list[i-1].ino, in ext2fs_icount_validate()
522 i, icount->list[i].ino); in ext2fs_icount_validate()
529 errcode_t ext2fs_icount_fetch(ext2_icount_t icount, ext2_ino_t ino, __u16 *ret) in ext2fs_icount_fetch() argument
534 if (!ino || (ino > icount->num_inodes)) in ext2fs_icount_fetch()
538 if (ext2fs_test_inode_bitmap2(icount->single, ino)) { in ext2fs_icount_fetch()
543 !ext2fs_test_inode_bitmap2(icount->multiple, ino)) { in ext2fs_icount_fetch()
548 get_inode_count(icount, ino, &val); in ext2fs_icount_fetch()
553 errcode_t ext2fs_icount_increment(ext2_icount_t icount, ext2_ino_t ino, in ext2fs_icount_increment() argument
560 if (!ino || (ino > icount->num_inodes)) in ext2fs_icount_increment()
564 curr_value = icount_16_xlate(icount->fullmap[ino] + 1); in ext2fs_icount_increment()
565 icount->fullmap[ino] = curr_value; in ext2fs_icount_increment()
566 } else if (ext2fs_test_inode_bitmap2(icount->single, ino)) { in ext2fs_icount_increment()
571 if (set_inode_count(icount, ino, 2)) in ext2fs_icount_increment()
574 ext2fs_unmark_inode_bitmap2(icount->single, ino); in ext2fs_icount_increment()
581 if (ext2fs_test_inode_bitmap2(icount->multiple, ino)) { in ext2fs_icount_increment()
582 get_inode_count(icount, ino, &curr_value); in ext2fs_icount_increment()
584 if (set_inode_count(icount, ino, curr_value)) in ext2fs_icount_increment()
591 ext2fs_mark_inode_bitmap2(icount->single, ino); in ext2fs_icount_increment()
601 get_inode_count(icount, ino, &curr_value); in ext2fs_icount_increment()
603 if (set_inode_count(icount, ino, curr_value)) in ext2fs_icount_increment()
607 ext2fs_mark_inode_bitmap2(icount->multiple, ino); in ext2fs_icount_increment()
613 errcode_t ext2fs_icount_decrement(ext2_icount_t icount, ext2_ino_t ino, in ext2fs_icount_decrement() argument
618 if (!ino || (ino > icount->num_inodes)) in ext2fs_icount_decrement()
624 if (!icount->fullmap[ino]) in ext2fs_icount_decrement()
627 curr_value = --icount->fullmap[ino]; in ext2fs_icount_decrement()
633 if (ext2fs_test_inode_bitmap2(icount->single, ino)) { in ext2fs_icount_decrement()
634 ext2fs_unmark_inode_bitmap2(icount->single, ino); in ext2fs_icount_decrement()
636 ext2fs_unmark_inode_bitmap2(icount->multiple, ino); in ext2fs_icount_decrement()
638 set_inode_count(icount, ino, 0); in ext2fs_icount_decrement()
646 !ext2fs_test_inode_bitmap2(icount->multiple, ino)) in ext2fs_icount_decrement()
649 get_inode_count(icount, ino, &curr_value); in ext2fs_icount_decrement()
653 if (set_inode_count(icount, ino, curr_value)) in ext2fs_icount_decrement()
657 ext2fs_mark_inode_bitmap2(icount->single, ino); in ext2fs_icount_decrement()
659 ext2fs_unmark_inode_bitmap2(icount->multiple, ino); in ext2fs_icount_decrement()
666 errcode_t ext2fs_icount_store(ext2_icount_t icount, ext2_ino_t ino, in ext2fs_icount_store() argument
669 if (!ino || (ino > icount->num_inodes)) in ext2fs_icount_store()
675 return set_inode_count(icount, ino, count); in ext2fs_icount_store()
678 ext2fs_mark_inode_bitmap2(icount->single, ino); in ext2fs_icount_store()
680 ext2fs_unmark_inode_bitmap2(icount->multiple, ino); in ext2fs_icount_store()
684 ext2fs_unmark_inode_bitmap2(icount->single, ino); in ext2fs_icount_store()
690 ext2fs_unmark_inode_bitmap2(icount->multiple, ino); in ext2fs_icount_store()
692 set_inode_count(icount, ino, 0); in ext2fs_icount_store()
696 if (set_inode_count(icount, ino, count)) in ext2fs_icount_store()
698 ext2fs_unmark_inode_bitmap2(icount->single, ino); in ext2fs_icount_store()
700 ext2fs_mark_inode_bitmap2(icount->multiple, ino); in ext2fs_icount_store()
725 ext2_ino_t ino; member
850 printf("icount_fetch(%u) = ", pc->ino); in run_test()
853 retval = ext2fs_icount_store(icount, pc->ino, pc->arg); in run_test()
859 printf("icount_store(%u, %u) = ", pc->ino, pc->arg); in run_test()
862 retval = ext2fs_icount_increment(icount, pc->ino, 0); in run_test()
868 printf("icount_increment(%u) = ", pc->ino); in run_test()
871 retval = ext2fs_icount_decrement(icount, pc->ino, 0); in run_test()
877 printf("icount_decrement(%u) = ", pc->ino); in run_test()
880 retval = ext2fs_icount_fetch(icount, pc->ino, &result); in run_test()