Lines Matching refs:index
493 int index,
498 * Find the first stale entry before our index, if any.
500 for (*lowstale = index - 1; *lowstale >= 0; --*lowstale) {
507 * Find the first stale entry at or after our index, if any.
511 for (*highstale = index; *highstale < leafhdr->count; ++*highstale) {
515 if (*lowstale >= 0 && index - *lowstale <= *highstale - index)
524 int index, /* leaf table position */
526 int lowstale, /* index of prev stale leaf */
527 int highstale, /* index of next stale leaf */
528 int *lfloglow, /* low leaf logging index */
529 int *lfloghigh) /* high leaf logging index */
537 * If there are no stale entries, just insert a hole at index.
539 lep = &ents[index];
540 if (index < leafhdr->count)
542 (leafhdr->count - index) * sizeof(*lep));
547 *lfloglow = index;
562 xfs_dir3_leaf_find_stale(leafhdr, ents, index,
570 index - lowstale - 1 < highstale - index)) {
571 ASSERT(index - lowstale - 1 >= 0);
579 if (index - lowstale - 1 > 0) {
581 (index - lowstale - 1) *
585 *lfloghigh = max(index - 1, *lfloghigh);
587 return &ents[index - 1];
593 ASSERT(highstale - index >= 0);
600 if (highstale - index > 0) {
601 memmove(&ents[index + 1], &ents[index],
602 (highstale - index) * sizeof(xfs_dir2_leaf_entry_t));
604 *lfloglow = min(index, *lfloglow);
607 return &ents[index];
635 int highstale = 0; /* index of next stale leaf */
636 int i; /* temporary, index */
637 int index; /* leaf table position */
639 int lfloglow; /* low leaf logging index */
640 int lfloghigh; /* high leaf logging index */
641 int lowstale = 0; /* index of prev stale leaf */
656 * So the index is of the entry to insert in front of.
657 * But if there are dup hash values the index is of the first of those.
659 index = xfs_dir2_leaf_search_hash(args, lbp);
673 for (use_block = -1, lep = &ents[index];
674 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval;
675 index++, lep++) {
774 * insertion index - and we'll shift that one to our insertion
778 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale,
894 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale,
925 int from; /* source leaf index */
928 int to; /* target leaf index */
968 * insertion index - and the caller will shift that one to our insertion
970 * Return new insertion index, where the remaining stale entry is,
977 int *indexp, /* insertion index */
980 int *lowlogp, /* out: low log index */
981 int *highlogp) /* out: high log index */
983 int from; /* source copy index */
984 int highstale; /* stale entry at/after index */
985 int index; /* insertion index */
986 int keepstale; /* source index of kept stale */
987 int lowstale; /* stale entry before index */
988 int newindex=0; /* new insertion index */
989 int to; /* destination copy index */
992 index = *indexp;
994 xfs_dir3_leaf_find_stale(leafhdr, ents, index, &lowstale, &highstale);
1001 index - lowstale <= highstale - index))
1011 * Notice the new value of index.
1013 if (index == from)
1038 if (index == from)
1166 int index; /* found entry index */
1175 * Look up name in the leaf block, returning both buffers and index.
1177 error = xfs_dir2_leaf_lookup_int(args, &lbp, &index, &dbp, &leafhdr);
1188 lep = &leafhdr.ents[index];
1209 * Fill in indexp with the found index, and dbpp with the data buffer.
1217 int *indexp, /* out: index in leaf block */
1226 int index; /* index in leaf block */
1252 index = xfs_dir2_leaf_search_hash(args, lbp);
1257 for (lep = &leafhdr->ents[index];
1258 index < leafhdr->count &&
1260 lep++, index++) {
1294 * Compare name and if it's an exact match, return the index
1296 * the index and buffer and continue looking for an exact match.
1301 *indexp = index;
1357 int index; /* index into leaf entries */
1373 error = xfs_dir2_leaf_lookup_int(args, &lbp, &index, &dbp, &leafhdr);
1386 lep = &leafhdr.ents[index];
1413 xfs_dir3_leaf_log_ents(args, &leafhdr, lbp, index, index);
1500 int index; /* index of leaf entry */
1511 error = xfs_dir2_leaf_lookup_int(args, &lbp, &index, &dbp, &leafhdr);
1519 lep = &leafhdr.ents[index];
1540 * Return index in the leaf block (lbp) which is either the first
1544 int /* index value */
1551 int high; /* high leaf index */
1552 int low; /* low leaf index */
1554 int mid=0; /* current leaf index */