Lines Matching refs:count
112 ASSERT(!to->count && !to->usedbytes); in xfs_attr3_leaf_firstused_from_disk()
166 to->count = be16_to_cpu(hdr3->count); in xfs_attr3_leaf_hdr_from_disk()
180 to->count = be16_to_cpu(from->hdr.count); in xfs_attr3_leaf_hdr_from_disk()
208 hdr3->count = cpu_to_be16(from->count); in xfs_attr3_leaf_hdr_to_disk()
223 to->hdr.count = cpu_to_be16(from->count); in xfs_attr3_leaf_hdr_to_disk()
258 if (!xfs_log_in_recovery(mp) && ichdr.count == 0) in xfs_attr3_leaf_verify()
272 if ((char *)&entries[ichdr.count] > in xfs_attr3_leaf_verify()
587 hdr->count = 0; in xfs_attr_shortform_create()
616 for (i = 0; i < sf->hdr.count; sfe = XFS_ATTR_SF_NEXTENTRY(sfe), i++) { in xfs_attr_shortform_add()
639 sf->hdr.count++; in xfs_attr_shortform_add()
684 end = sf->hdr.count; in xfs_attr_shortform_remove()
706 sf->hdr.count--; in xfs_attr_shortform_remove()
753 for (i = 0; i < sf->hdr.count; in xfs_attr_shortform_lookup()
784 for (i = 0; i < sf->hdr.count; in xfs_attr_shortform_getvalue()
850 for (i = 0; i < sf->hdr.count; i++) { in xfs_attr_shortform_to_leaf()
895 for (i = 0; i < leafhdr.count; entry++, i++) { in xfs_attr_shortform_allfit()
944 for (i = 0; i < sfp->hdr.count; i++) { in xfs_attr_shortform_verify()
1051 for (i = 0; i < ichdr.count; entry++, i++) { in xfs_attr3_leaf_to_shortform()
1131 btree[0].hashval = entries[icleafhdr.count - 1].hashval; in xfs_attr3_leaf_to_node()
1133 icnodehdr.count = 1; in xfs_attr3_leaf_to_node()
1278 ASSERT(args->index >= 0 && args->index <= ichdr.count); in xfs_attr3_leaf_add()
1285 tablesize = (ichdr.count + 1) * sizeof(xfs_attr_leaf_entry_t) in xfs_attr3_leaf_add()
1359 ASSERT(args->index >= 0 && args->index <= ichdr->count); in xfs_attr3_leaf_add_work()
1365 if (args->index < ichdr->count) { in xfs_attr3_leaf_add_work()
1366 tmp = ichdr->count - args->index; in xfs_attr3_leaf_add_work()
1372 ichdr->count++; in xfs_attr3_leaf_add_work()
1403 ASSERT((args->index == ichdr->count - 1) || in xfs_attr3_leaf_add_work()
1442 ASSERT(ichdr->firstused >= ichdr->count * sizeof(xfs_attr_leaf_entry_t) in xfs_attr3_leaf_add_work()
1444 tmp = (ichdr->count - 1) * sizeof(xfs_attr_leaf_entry_t) in xfs_attr3_leaf_add_work()
1491 ichdr_dst->count = 0; in xfs_attr3_leaf_compact()
1505 leaf_dst, ichdr_dst, 0, ichdr_src.count); in xfs_attr3_leaf_compact()
1531 if (leaf1hdr->count > 0 && leaf2hdr->count > 0 && in xfs_attr3_leaf_order()
1534 (be32_to_cpu(entries2[leaf2hdr->count - 1].hashval) < in xfs_attr3_leaf_order()
1535 be32_to_cpu(entries1[leaf1hdr->count - 1].hashval)))) { in xfs_attr3_leaf_order()
1580 int count; in xfs_attr3_leaf_rebalance() local
1595 ASSERT(ichdr2.count == 0); in xfs_attr3_leaf_rebalance()
1628 &count, &totallen); in xfs_attr3_leaf_rebalance()
1635 if (count < ichdr1.count) { in xfs_attr3_leaf_rebalance()
1640 count = ichdr1.count - count; in xfs_attr3_leaf_rebalance()
1642 space += count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_rebalance()
1648 max -= ichdr2.count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_rebalance()
1656 ichdr1.count - count, leaf2, &ichdr2, 0, count); in xfs_attr3_leaf_rebalance()
1658 } else if (count > ichdr1.count) { in xfs_attr3_leaf_rebalance()
1669 count -= ichdr1.count; in xfs_attr3_leaf_rebalance()
1671 space += count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_rebalance()
1677 max -= ichdr1.count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_rebalance()
1685 ichdr1.count, count); in xfs_attr3_leaf_rebalance()
1698 blk1->hashval = be32_to_cpu(entries1[ichdr1.count - 1].hashval); in xfs_attr3_leaf_rebalance()
1699 blk2->hashval = be32_to_cpu(entries2[ichdr2.count - 1].hashval); in xfs_attr3_leaf_rebalance()
1713 if (blk1->index > ichdr1.count) { in xfs_attr3_leaf_rebalance()
1715 blk2->index = blk1->index - ichdr1.count; in xfs_attr3_leaf_rebalance()
1718 } else if (blk1->index == ichdr1.count) { in xfs_attr3_leaf_rebalance()
1730 blk2->index = blk1->index - ichdr1.count; in xfs_attr3_leaf_rebalance()
1770 int count; in xfs_attr3_leaf_figure_balance() local
1783 max = ichdr1->count + ichdr2->count; in xfs_attr3_leaf_figure_balance()
1790 for (count = index = 0; count < max; entry++, index++, count++) { in xfs_attr3_leaf_figure_balance()
1796 if (count == blk1->index) { in xfs_attr3_leaf_figure_balance()
1809 if (count == ichdr1->count) { in xfs_attr3_leaf_figure_balance()
1831 totallen -= count * sizeof(*entry); in xfs_attr3_leaf_figure_balance()
1837 *countarg = count; in xfs_attr3_leaf_figure_balance()
1884 ichdr.count * sizeof(xfs_attr_leaf_entry_t) + in xfs_attr3_leaf_toosmall()
1897 if (ichdr.count == 0) { in xfs_attr3_leaf_toosmall()
1943 ((ichdr.count + ichdr2.count) * in xfs_attr3_leaf_toosmall()
2005 ASSERT(ichdr.count > 0 && ichdr.count < args->geo->blksize / 8); in xfs_attr3_leaf_remove()
2006 ASSERT(args->index >= 0 && args->index < ichdr.count); in xfs_attr3_leaf_remove()
2007 ASSERT(ichdr.firstused >= ichdr.count * sizeof(*entry) + in xfs_attr3_leaf_remove()
2021 tablesize = ichdr.count * sizeof(xfs_attr_leaf_entry_t) in xfs_attr3_leaf_remove()
2090 tmp = (ichdr.count - args->index) * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_remove()
2092 ichdr.count--; in xfs_attr3_leaf_remove()
2096 entry = &xfs_attr3_leaf_entryp(leaf)[ichdr.count]; in xfs_attr3_leaf_remove()
2108 for (i = ichdr.count - 1; i >= 0; entry++, i--) { in xfs_attr3_leaf_remove()
2130 ichdr.count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_remove()
2161 drop_blk->hashval = be32_to_cpu(entry[drophdr.count - 1].hashval); in xfs_attr3_leaf_unbalance()
2178 drophdr.count); in xfs_attr3_leaf_unbalance()
2183 savehdr.count, drophdr.count); in xfs_attr3_leaf_unbalance()
2216 drophdr.count); in xfs_attr3_leaf_unbalance()
2219 tmp_leaf, &tmphdr, tmphdr.count, in xfs_attr3_leaf_unbalance()
2220 savehdr.count); in xfs_attr3_leaf_unbalance()
2225 savehdr.count); in xfs_attr3_leaf_unbalance()
2228 tmp_leaf, &tmphdr, tmphdr.count, in xfs_attr3_leaf_unbalance()
2229 drophdr.count); in xfs_attr3_leaf_unbalance()
2244 save_blk->hashval = be32_to_cpu(entry[savehdr.count - 1].hashval); in xfs_attr3_leaf_unbalance()
2284 if (ichdr.count >= args->geo->blksize / 8) in xfs_attr3_leaf_lookup_int()
2291 probe = span = ichdr.count / 2; in xfs_attr3_leaf_lookup_int()
2301 if (!(probe >= 0 && (!ichdr.count || probe < ichdr.count))) in xfs_attr3_leaf_lookup_int()
2314 while (probe < ichdr.count && in xfs_attr3_leaf_lookup_int()
2319 if (probe == ichdr.count || be32_to_cpu(entry->hashval) != hashval) { in xfs_attr3_leaf_lookup_int()
2327 for (; probe < ichdr.count && (be32_to_cpu(entry->hashval) == hashval); in xfs_attr3_leaf_lookup_int()
2394 ASSERT(ichdr.count < args->geo->blksize / 8); in xfs_attr3_leaf_getvalue()
2395 ASSERT(args->index < ichdr.count); in xfs_attr3_leaf_getvalue()
2435 int count) in xfs_attr3_leaf_moveents() argument
2446 if (count == 0) in xfs_attr3_leaf_moveents()
2455 ASSERT(ichdr_s->count > 0 && ichdr_s->count < args->geo->blksize / 8); in xfs_attr3_leaf_moveents()
2456 ASSERT(ichdr_s->firstused >= (ichdr_s->count * sizeof(*entry_s)) in xfs_attr3_leaf_moveents()
2458 ASSERT(ichdr_d->count < args->geo->blksize / 8); in xfs_attr3_leaf_moveents()
2459 ASSERT(ichdr_d->firstused >= (ichdr_d->count * sizeof(*entry_d)) in xfs_attr3_leaf_moveents()
2462 ASSERT(start_s < ichdr_s->count); in xfs_attr3_leaf_moveents()
2463 ASSERT(start_d <= ichdr_d->count); in xfs_attr3_leaf_moveents()
2464 ASSERT(count <= ichdr_s->count); in xfs_attr3_leaf_moveents()
2470 if (start_d < ichdr_d->count) { in xfs_attr3_leaf_moveents()
2471 tmp = ichdr_d->count - start_d; in xfs_attr3_leaf_moveents()
2474 entry_d = &xfs_attr3_leaf_entryp(leaf_d)[start_d + count]; in xfs_attr3_leaf_moveents()
2485 for (i = 0; i < count; entry_s++, entry_d++, desti++, i++) { in xfs_attr3_leaf_moveents()
2497 ichdr_s->count -= 1; in xfs_attr3_leaf_moveents()
2518 ichdr_s->count -= 1; in xfs_attr3_leaf_moveents()
2519 ichdr_d->count += 1; in xfs_attr3_leaf_moveents()
2520 tmp = ichdr_d->count * sizeof(xfs_attr_leaf_entry_t) in xfs_attr3_leaf_moveents()
2531 if (start_s == ichdr_s->count) { in xfs_attr3_leaf_moveents()
2532 tmp = count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_moveents()
2542 tmp = (ichdr_s->count - count) * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_moveents()
2543 entry_s = &xfs_attr3_leaf_entryp(leaf_s)[start_s + count]; in xfs_attr3_leaf_moveents()
2547 tmp = count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_moveents()
2548 entry_s = &xfs_attr3_leaf_entryp(leaf_s)[ichdr_s->count]; in xfs_attr3_leaf_moveents()
2558 ichdr_d->freemap[0].base += ichdr_d->count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_moveents()
2573 int *count) in xfs_attr_leaf_lasthash() argument
2581 if (count) in xfs_attr_leaf_lasthash()
2582 *count = ichdr.count; in xfs_attr_leaf_lasthash()
2583 if (!ichdr.count) in xfs_attr_leaf_lasthash()
2585 return be32_to_cpu(entries[ichdr.count - 1].hashval); in xfs_attr_leaf_lasthash()
2674 ASSERT(args->index < ichdr.count); in xfs_attr3_leaf_clearflag()
2738 ASSERT(args->index < ichdr.count); in xfs_attr3_leaf_setflag()
2817 ASSERT(args->index < ichdr1.count); in xfs_attr3_leaf_flipflags()
2821 ASSERT(args->index2 < ichdr2.count); in xfs_attr3_leaf_flipflags()