Lines Matching defs:index
620 // find this entry in the old_start[] index and mark it completed
850 int lo, hi, index, matches, i;
853 return 0; // table is empty, so insert at index=0
858 index = -1;
866 index = mid;
883 index = hi;
886 // if no existing entry found, find index for new one
887 if (index == -1) {
888 index = (block_num < (*buf_ptr)[hi].block_num) ? hi : hi + 1;
890 // make sure that we return the right-most index in the case of multiple matches
892 i = index + 1;
898 index += matches;
901 return index;
948 int num_to_remove, index, i, overwrite, err;
998 index = blk_index;
1000 while (index < *num_full_ptr && block_end > (off_t)((*buf_ptr)[index].block_num*jhdr_size)) {
1001 if (block_end >= (off_t)(((*buf_ptr)[index].block_num*jhdr_size + (*buf_ptr)[index].block_size))) {
1002 (*buf_ptr)[index].block_num = -2; // mark this for deletion
1005 overlap = block_end - (*buf_ptr)[index].block_num*jhdr_size;
1012 (*buf_ptr)[index].block_num += (overlap / jhdr_size); // make sure overlap is multiple of jhdr_size, or round up
1013 (*buf_ptr)[index].cksum = 0;
1015 new_offset = (*buf_ptr)[index].jnl_offset + overlap; // check for wrap-around
1019 (*buf_ptr)[index].jnl_offset = new_offset;
1021 (*buf_ptr)[index].block_size -= overlap; // sanity check for negative value
1022 if ((*buf_ptr)[index].block_size <= 0) {
1023 panic("jnl: do_overlap: after overlap, new block size is invalid (%u)\n", (*buf_ptr)[index].block_size);
1030 index++;
1034 index--; // start with the last index used within the above loop
1035 while (index >= blk_index) {
1036 if ((*buf_ptr)[index].block_num == -2) {
1037 if (index == *num_full_ptr-1) {
1038 (*buf_ptr)[index].block_num = -1; // it's the last item in the table... just mark as free
1040 bcopy( (*buf_ptr)+(index+1), (*buf_ptr)+(index), (*num_full_ptr - (index + 1)) * sizeof(struct bucket) );
1044 index--;
1068 // on return from lookup_bucket(), blk_index is the index into the table where block_num should be
1069 // inserted (or the index of the elem to overwrite).
1072 // check if the index is within bounds (if we're adding this block to the end of
1085 // returns the index, or -1 on error
1278 //printf("jnl: replay_journal: skipping killed fs block (index %d)\n", i);
1300 printf("jnl: %s: txn starting at %lld (%lld) @ index %3d bnum %lld (%d) with disk cksum != blhdr cksum (0x%.8x 0x%.8x)\n",
3057 uint32_t lower = 0; /* Lowest index to search */
3058 uint32_t upper = trim->extent_count; /* Highest index to search + 1 */
3202 * We need to move extents from index (insert_index + replace_count) through the end of
3668 // range check the end index