Lines Matching refs:index
484 int index,
489 * Find the first stale entry before our index, if any.
491 for (*lowstale = index - 1; *lowstale >= 0; --*lowstale) {
498 * Find the first stale entry at or after our index, if any.
502 for (*highstale = index; *highstale < leafhdr->count; ++*highstale) {
506 if (*lowstale >= 0 && index - *lowstale <= *highstale - index)
515 int index, /* leaf table position */
517 int lowstale, /* index of prev stale leaf */
518 int highstale, /* index of next stale leaf */
519 int *lfloglow, /* low leaf logging index */
520 int *lfloghigh) /* high leaf logging index */
528 * If there are no stale entries, just insert a hole at index.
530 lep = &ents[index];
531 if (index < leafhdr->count)
533 (leafhdr->count - index) * sizeof(*lep));
538 *lfloglow = index;
553 xfs_dir3_leaf_find_stale(leafhdr, ents, index,
561 index - lowstale - 1 < highstale - index)) {
562 ASSERT(index - lowstale - 1 >= 0);
570 if (index - lowstale - 1 > 0) {
572 (index - lowstale - 1) *
576 *lfloghigh = max(index - 1, *lfloghigh);
578 return &ents[index - 1];
584 ASSERT(highstale - index >= 0);
591 if (highstale - index > 0) {
592 memmove(&ents[index + 1], &ents[index],
593 (highstale - index) * sizeof(xfs_dir2_leaf_entry_t));
595 *lfloglow = min(index, *lfloglow);
598 return &ents[index];
626 int highstale = 0; /* index of next stale leaf */
627 int i; /* temporary, index */
628 int index; /* leaf table position */
630 int lfloglow; /* low leaf logging index */
631 int lfloghigh; /* high leaf logging index */
632 int lowstale = 0; /* index of prev stale leaf */
647 * So the index is of the entry to insert in front of.
648 * But if there are dup hash values the index is of the first of those.
650 index = xfs_dir2_leaf_search_hash(args, lbp);
664 for (use_block = -1, lep = &ents[index];
665 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval;
666 index++, lep++) {
765 * insertion index - and we'll shift that one to our insertion
769 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale,
885 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale,
916 int from; /* source leaf index */
919 int to; /* target leaf index */
959 * insertion index - and the caller will shift that one to our insertion
961 * Return new insertion index, where the remaining stale entry is,
968 int *indexp, /* insertion index */
971 int *lowlogp, /* out: low log index */
972 int *highlogp) /* out: high log index */
974 int from; /* source copy index */
975 int highstale; /* stale entry at/after index */
976 int index; /* insertion index */
977 int keepstale; /* source index of kept stale */
978 int lowstale; /* stale entry before index */
979 int newindex=0; /* new insertion index */
980 int to; /* destination copy index */
983 index = *indexp;
985 xfs_dir3_leaf_find_stale(leafhdr, ents, index, &lowstale, &highstale);
992 index - lowstale <= highstale - index))
1002 * Notice the new value of index.
1004 if (index == from)
1029 if (index == from)
1157 int index; /* found entry index */
1166 * Look up name in the leaf block, returning both buffers and index.
1168 error = xfs_dir2_leaf_lookup_int(args, &lbp, &index, &dbp, &leafhdr);
1179 lep = &leafhdr.ents[index];
1200 * Fill in indexp with the found index, and dbpp with the data buffer.
1208 int *indexp, /* out: index in leaf block */
1217 int index; /* index in leaf block */
1243 index = xfs_dir2_leaf_search_hash(args, lbp);
1248 for (lep = &leafhdr->ents[index];
1249 index < leafhdr->count &&
1251 lep++, index++) {
1285 * Compare name and if it's an exact match, return the index
1287 * the index and buffer and continue looking for an exact match.
1292 *indexp = index;
1348 int index; /* index into leaf entries */
1364 error = xfs_dir2_leaf_lookup_int(args, &lbp, &index, &dbp, &leafhdr);
1377 lep = &leafhdr.ents[index];
1404 xfs_dir3_leaf_log_ents(args, &leafhdr, lbp, index, index);
1491 int index; /* index of leaf entry */
1502 error = xfs_dir2_leaf_lookup_int(args, &lbp, &index, &dbp, &leafhdr);
1510 lep = &leafhdr.ents[index];
1531 * Return index in the leaf block (lbp) which is either the first
1535 int /* index value */
1542 int high; /* high leaf index */
1543 int low; /* low leaf index */
1545 int mid=0; /* current leaf index */