Lines Matching refs:index
441 int index, in xfs_dir3_leaf_find_stale() argument
448 for (*lowstale = index - 1; *lowstale >= 0; --*lowstale) { in xfs_dir3_leaf_find_stale()
459 for (*highstale = index; *highstale < leafhdr->count; ++*highstale) { in xfs_dir3_leaf_find_stale()
463 if (*lowstale >= 0 && index - *lowstale <= *highstale - index) in xfs_dir3_leaf_find_stale()
472 int index, /* leaf table position */ in xfs_dir3_leaf_find_entry() argument
487 lep = &ents[index]; in xfs_dir3_leaf_find_entry()
488 if (index < leafhdr->count) in xfs_dir3_leaf_find_entry()
490 (leafhdr->count - index) * sizeof(*lep)); in xfs_dir3_leaf_find_entry()
495 *lfloglow = index; in xfs_dir3_leaf_find_entry()
510 xfs_dir3_leaf_find_stale(leafhdr, ents, index, in xfs_dir3_leaf_find_entry()
518 index - lowstale - 1 < highstale - index)) { in xfs_dir3_leaf_find_entry()
519 ASSERT(index - lowstale - 1 >= 0); in xfs_dir3_leaf_find_entry()
527 if (index - lowstale - 1 > 0) { in xfs_dir3_leaf_find_entry()
529 (index - lowstale - 1) * in xfs_dir3_leaf_find_entry()
533 *lfloghigh = max(index - 1, *lfloghigh); in xfs_dir3_leaf_find_entry()
535 return &ents[index - 1]; in xfs_dir3_leaf_find_entry()
541 ASSERT(highstale - index >= 0); in xfs_dir3_leaf_find_entry()
548 if (highstale - index > 0) { in xfs_dir3_leaf_find_entry()
549 memmove(&ents[index + 1], &ents[index], in xfs_dir3_leaf_find_entry()
550 (highstale - index) * sizeof(xfs_dir2_leaf_entry_t)); in xfs_dir3_leaf_find_entry()
552 *lfloglow = min(index, *lfloglow); in xfs_dir3_leaf_find_entry()
555 return &ents[index]; in xfs_dir3_leaf_find_entry()
585 int index; /* leaf table position */ in xfs_dir2_leaf_addname() local
607 index = xfs_dir2_leaf_search_hash(args, lbp); in xfs_dir2_leaf_addname()
621 for (use_block = -1, lep = &ents[index]; in xfs_dir2_leaf_addname()
622 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leaf_addname()
623 index++, lep++) { in xfs_dir2_leaf_addname()
726 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale, in xfs_dir2_leaf_addname()
842 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale, in xfs_dir2_leaf_addname()
934 int index; /* insertion index */ in xfs_dir3_leaf_compact_x1() local
941 index = *indexp; in xfs_dir3_leaf_compact_x1()
943 xfs_dir3_leaf_find_stale(leafhdr, ents, index, &lowstale, &highstale); in xfs_dir3_leaf_compact_x1()
950 index - lowstale <= highstale - index)) in xfs_dir3_leaf_compact_x1()
962 if (index == from) in xfs_dir3_leaf_compact_x1()
987 if (index == from) in xfs_dir3_leaf_compact_x1()
1116 int index; /* found entry index */ in xfs_dir2_leaf_lookup() local
1128 if ((error = xfs_dir2_leaf_lookup_int(args, &lbp, &index, &dbp))) { in xfs_dir2_leaf_lookup()
1139 lep = &ents[index]; in xfs_dir2_leaf_lookup()
1176 int index; /* index in leaf block */ in xfs_dir2_leaf_lookup_int() local
1205 index = xfs_dir2_leaf_search_hash(args, lbp); in xfs_dir2_leaf_lookup_int()
1210 for (lep = &ents[index]; in xfs_dir2_leaf_lookup_int()
1211 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leaf_lookup_int()
1212 lep++, index++) { in xfs_dir2_leaf_lookup_int()
1253 *indexp = index; in xfs_dir2_leaf_lookup_int()
1308 int index; /* index into leaf entries */ in xfs_dir2_leaf_removename() local
1325 if ((error = xfs_dir2_leaf_lookup_int(args, &lbp, &index, &dbp))) { in xfs_dir2_leaf_removename()
1338 lep = &ents[index]; in xfs_dir2_leaf_removename()
1362 xfs_dir3_leaf_log_ents(args, lbp, index, index); in xfs_dir2_leaf_removename()
1449 int index; /* index of leaf entry */ in xfs_dir2_leaf_replace() local
1461 if ((error = xfs_dir2_leaf_lookup_int(args, &lbp, &index, &dbp))) { in xfs_dir2_leaf_replace()
1470 lep = &ents[index]; in xfs_dir2_leaf_replace()