Lines Matching refs:index
73 STATIC int xfs_attr_leaf_entsize(xfs_attr_leafblock_t *leaf, int index);
954 error = xfs_attr3_leaf_lookup_int(bp, &nargs); /* set a->index */
1332 * modifies the index/blkno/rmtblk/rmtblkcnt fields to show the
1373 ASSERT(args->index >= 0 && args->index <= ichdr.count);
1454 ASSERT(args->index >= 0 && args->index <= ichdr->count);
1459 entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
1460 if (args->index < ichdr->count) {
1461 tmp = ichdr->count - args->index;
1491 (args->index2 <= args->index)) {
1497 ASSERT((args->index == 0) ||
1499 ASSERT((args->index == ichdr->count - 1) ||
1510 name_loc = xfs_attr3_leaf_name_local(leaf, args->index);
1517 name_rmt = xfs_attr3_leaf_name_remote(leaf, args->index);
1529 XFS_DA_LOGRANGE(leaf, xfs_attr3_leaf_name(leaf, args->index),
1530 xfs_attr_leaf_entsize(leaf, args->index)));
1551 ichdr->usedbytes += xfs_attr_leaf_entsize(leaf, args->index);
1660 * This code adjusts the args->index/blkno and args->index2/blkno2 fields
1800 * Adjust the expected index for insertion.
1805 * the index. We must also track the entry just following the
1808 * inserting. The index/blkno fields refer to the "old" entry,
1811 if (blk1->index > ichdr1.count) {
1813 blk2->index = blk1->index - ichdr1.count;
1814 args->index = args->index2 = blk2->index;
1816 } else if (blk1->index == ichdr1.count) {
1818 args->index = blk1->index;
1828 blk2->index = blk1->index - ichdr1.count;
1829 args->index = blk2->index;
1837 args->index2 = blk2->index;
1843 args->index = args->index2 = blk1->index;
1870 int index;
1888 for (count = index = 0; count < max; entry++, index++, count++) {
1894 if (count == blk1->index) {
1910 index = 0;
1917 index);
2104 ASSERT(args->index >= 0 && args->index < ichdr.count);
2108 entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
2124 entsize = xfs_attr_leaf_entsize(leaf, args->index);
2182 memset(xfs_attr3_leaf_name(leaf, args->index), 0, entsize);
2185 XFS_DA_LOGRANGE(leaf, xfs_attr3_leaf_name(leaf, args->index),
2188 tmp = (ichdr.count - args->index) * sizeof(xfs_attr_leaf_entry_t);
2356 * Return in args->index the index into the entry[] array of either
2424 args->index = probe;
2441 args->index = probe;
2448 args->index = probe;
2457 args->index = probe;
2483 ASSERT(args->index < ichdr.count);
2485 entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
2487 name_loc = xfs_attr3_leaf_name_local(leaf, args->index);
2495 name_rmt = xfs_attr3_leaf_name_remote(leaf, args->index);
2579 * may also need to change the insertion index. Code turned
2589 result++; /* insertion index adjustment */
2681 xfs_attr_leaf_entsize(xfs_attr_leafblock_t *leaf, int index)
2689 if (entries[index].flags & XFS_ATTR_LOCAL) {
2690 name_loc = xfs_attr3_leaf_name_local(leaf, index);
2694 name_rmt = xfs_attr3_leaf_name_remote(leaf, index);
2757 entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
2762 ASSERT(args->index < ichdr.count);
2763 ASSERT(args->index >= 0);
2766 name_loc = xfs_attr3_leaf_name_local(leaf, args->index);
2770 name_rmt = xfs_attr3_leaf_name_remote(leaf, args->index);
2785 name_rmt = xfs_attr3_leaf_name_remote(leaf, args->index);
2823 ASSERT(args->index < ichdr.count);
2824 ASSERT(args->index >= 0);
2826 entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
2833 name_rmt = xfs_attr3_leaf_name_remote(leaf, args->index);
2845 * given by args->blkno/index and set the INCOMPLETE flag on the leaf
2892 entry1 = &xfs_attr3_leaf_entryp(leaf1)[args->index];
2899 ASSERT(args->index < ichdr1.count);
2900 ASSERT(args->index >= 0);
2907 name_loc = xfs_attr3_leaf_name_local(leaf1, args->index);
2911 name_rmt = xfs_attr3_leaf_name_remote(leaf1, args->index);
2937 name_rmt = xfs_attr3_leaf_name_remote(leaf1, args->index);