Lines Matching refs:count
126 ASSERT(!to->count && !to->usedbytes); in xfs_attr3_leaf_firstused_from_disk()
180 to->count = be16_to_cpu(hdr3->count); in xfs_attr3_leaf_hdr_from_disk()
194 to->count = be16_to_cpu(from->hdr.count); in xfs_attr3_leaf_hdr_from_disk()
222 hdr3->count = cpu_to_be16(from->count); in xfs_attr3_leaf_hdr_to_disk()
237 to->hdr.count = cpu_to_be16(from->count); in xfs_attr3_leaf_hdr_to_disk()
273 if (ichdr.count == 0) in xfs_attr3_leaf_verify()
514 hdr->count = 0; in xfs_attr_shortform_create()
543 for (i = 0; i < sf->hdr.count; sfe = XFS_ATTR_SF_NEXTENTRY(sfe), i++) { in xfs_attr_shortform_add()
566 sf->hdr.count++; in xfs_attr_shortform_add()
611 end = sf->hdr.count; in xfs_attr_shortform_remove()
633 sf->hdr.count--; in xfs_attr_shortform_remove()
680 for (i = 0; i < sf->hdr.count; in xfs_attr_shortform_lookup()
707 for (i = 0; i < sf->hdr.count; in xfs_attr_shortform_getvalue()
798 for (i = 0; i < sf->hdr.count; i++) { in xfs_attr_shortform_to_leaf()
843 for (i = 0; i < leafhdr.count; entry++, i++) { in xfs_attr_shortform_allfit()
927 for (i = 0; i < ichdr.count; entry++, i++) { in xfs_attr3_leaf_to_shortform()
1007 btree[0].hashval = entries[icleafhdr.count - 1].hashval; in xfs_attr3_leaf_to_node()
1009 icnodehdr.count = 1; in xfs_attr3_leaf_to_node()
1154 ASSERT(args->index >= 0 && args->index <= ichdr.count); in xfs_attr3_leaf_add()
1161 tablesize = (ichdr.count + 1) * sizeof(xfs_attr_leaf_entry_t) in xfs_attr3_leaf_add()
1235 ASSERT(args->index >= 0 && args->index <= ichdr->count); in xfs_attr3_leaf_add_work()
1241 if (args->index < ichdr->count) { in xfs_attr3_leaf_add_work()
1242 tmp = ichdr->count - args->index; in xfs_attr3_leaf_add_work()
1248 ichdr->count++; in xfs_attr3_leaf_add_work()
1279 ASSERT((args->index == ichdr->count - 1) || in xfs_attr3_leaf_add_work()
1318 ASSERT(ichdr->firstused >= ichdr->count * sizeof(xfs_attr_leaf_entry_t) in xfs_attr3_leaf_add_work()
1320 tmp = (ichdr->count - 1) * sizeof(xfs_attr_leaf_entry_t) in xfs_attr3_leaf_add_work()
1367 ichdr_dst->count = 0; in xfs_attr3_leaf_compact()
1381 leaf_dst, ichdr_dst, 0, ichdr_src.count); in xfs_attr3_leaf_compact()
1407 if (leaf1hdr->count > 0 && leaf2hdr->count > 0 && in xfs_attr3_leaf_order()
1410 (be32_to_cpu(entries2[leaf2hdr->count - 1].hashval) < in xfs_attr3_leaf_order()
1411 be32_to_cpu(entries1[leaf1hdr->count - 1].hashval)))) { in xfs_attr3_leaf_order()
1456 int count; in xfs_attr3_leaf_rebalance() local
1471 ASSERT(ichdr2.count == 0); in xfs_attr3_leaf_rebalance()
1511 &count, &totallen); in xfs_attr3_leaf_rebalance()
1518 if (count < ichdr1.count) { in xfs_attr3_leaf_rebalance()
1523 count = ichdr1.count - count; in xfs_attr3_leaf_rebalance()
1525 space += count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_rebalance()
1531 max -= ichdr2.count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_rebalance()
1539 ichdr1.count - count, leaf2, &ichdr2, 0, count); in xfs_attr3_leaf_rebalance()
1541 } else if (count > ichdr1.count) { in xfs_attr3_leaf_rebalance()
1552 count -= ichdr1.count; in xfs_attr3_leaf_rebalance()
1554 space += count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_rebalance()
1560 max -= ichdr1.count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_rebalance()
1568 ichdr1.count, count); in xfs_attr3_leaf_rebalance()
1581 blk1->hashval = be32_to_cpu(entries1[ichdr1.count - 1].hashval); in xfs_attr3_leaf_rebalance()
1582 blk2->hashval = be32_to_cpu(entries2[ichdr2.count - 1].hashval); in xfs_attr3_leaf_rebalance()
1596 if (blk1->index > ichdr1.count) { in xfs_attr3_leaf_rebalance()
1598 blk2->index = blk1->index - ichdr1.count; in xfs_attr3_leaf_rebalance()
1601 } else if (blk1->index == ichdr1.count) { in xfs_attr3_leaf_rebalance()
1613 blk2->index = blk1->index - ichdr1.count; in xfs_attr3_leaf_rebalance()
1653 int count; in xfs_attr3_leaf_figure_balance() local
1666 max = ichdr1->count + ichdr2->count; in xfs_attr3_leaf_figure_balance()
1673 for (count = index = 0; count < max; entry++, index++, count++) { in xfs_attr3_leaf_figure_balance()
1679 if (count == blk1->index) { in xfs_attr3_leaf_figure_balance()
1692 if (count == ichdr1->count) { in xfs_attr3_leaf_figure_balance()
1714 totallen -= count * sizeof(*entry); in xfs_attr3_leaf_figure_balance()
1720 *countarg = count; in xfs_attr3_leaf_figure_balance()
1767 ichdr.count * sizeof(xfs_attr_leaf_entry_t) + in xfs_attr3_leaf_toosmall()
1780 if (ichdr.count == 0) { in xfs_attr3_leaf_toosmall()
1826 ((ichdr.count + ichdr2.count) * in xfs_attr3_leaf_toosmall()
1888 ASSERT(ichdr.count > 0 && ichdr.count < args->geo->blksize / 8); in xfs_attr3_leaf_remove()
1889 ASSERT(args->index >= 0 && args->index < ichdr.count); in xfs_attr3_leaf_remove()
1890 ASSERT(ichdr.firstused >= ichdr.count * sizeof(*entry) + in xfs_attr3_leaf_remove()
1904 tablesize = ichdr.count * sizeof(xfs_attr_leaf_entry_t) in xfs_attr3_leaf_remove()
1973 tmp = (ichdr.count - args->index) * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_remove()
1975 ichdr.count--; in xfs_attr3_leaf_remove()
1979 entry = &xfs_attr3_leaf_entryp(leaf)[ichdr.count]; in xfs_attr3_leaf_remove()
1991 for (i = ichdr.count - 1; i >= 0; entry++, i--) { in xfs_attr3_leaf_remove()
2013 ichdr.count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_remove()
2044 drop_blk->hashval = be32_to_cpu(entry[drophdr.count - 1].hashval); in xfs_attr3_leaf_unbalance()
2061 drophdr.count); in xfs_attr3_leaf_unbalance()
2066 savehdr.count, drophdr.count); in xfs_attr3_leaf_unbalance()
2099 drophdr.count); in xfs_attr3_leaf_unbalance()
2102 tmp_leaf, &tmphdr, tmphdr.count, in xfs_attr3_leaf_unbalance()
2103 savehdr.count); in xfs_attr3_leaf_unbalance()
2108 savehdr.count); in xfs_attr3_leaf_unbalance()
2111 tmp_leaf, &tmphdr, tmphdr.count, in xfs_attr3_leaf_unbalance()
2112 drophdr.count); in xfs_attr3_leaf_unbalance()
2127 save_blk->hashval = be32_to_cpu(entry[savehdr.count - 1].hashval); in xfs_attr3_leaf_unbalance()
2167 ASSERT(ichdr.count < args->geo->blksize / 8); in xfs_attr3_leaf_lookup_int()
2173 probe = span = ichdr.count / 2; in xfs_attr3_leaf_lookup_int()
2183 ASSERT(probe >= 0 && (!ichdr.count || probe < ichdr.count)); in xfs_attr3_leaf_lookup_int()
2194 while (probe < ichdr.count && in xfs_attr3_leaf_lookup_int()
2199 if (probe == ichdr.count || be32_to_cpu(entry->hashval) != hashval) { in xfs_attr3_leaf_lookup_int()
2207 for (; probe < ichdr.count && (be32_to_cpu(entry->hashval) == hashval); in xfs_attr3_leaf_lookup_int()
2271 ASSERT(ichdr.count < args->geo->blksize / 8); in xfs_attr3_leaf_getvalue()
2272 ASSERT(args->index < ichdr.count); in xfs_attr3_leaf_getvalue()
2329 int count) in xfs_attr3_leaf_moveents() argument
2340 if (count == 0) in xfs_attr3_leaf_moveents()
2349 ASSERT(ichdr_s->count > 0 && ichdr_s->count < args->geo->blksize / 8); in xfs_attr3_leaf_moveents()
2350 ASSERT(ichdr_s->firstused >= (ichdr_s->count * sizeof(*entry_s)) in xfs_attr3_leaf_moveents()
2352 ASSERT(ichdr_d->count < args->geo->blksize / 8); in xfs_attr3_leaf_moveents()
2353 ASSERT(ichdr_d->firstused >= (ichdr_d->count * sizeof(*entry_d)) in xfs_attr3_leaf_moveents()
2356 ASSERT(start_s < ichdr_s->count); in xfs_attr3_leaf_moveents()
2357 ASSERT(start_d <= ichdr_d->count); in xfs_attr3_leaf_moveents()
2358 ASSERT(count <= ichdr_s->count); in xfs_attr3_leaf_moveents()
2364 if (start_d < ichdr_d->count) { in xfs_attr3_leaf_moveents()
2365 tmp = ichdr_d->count - start_d; in xfs_attr3_leaf_moveents()
2368 entry_d = &xfs_attr3_leaf_entryp(leaf_d)[start_d + count]; in xfs_attr3_leaf_moveents()
2379 for (i = 0; i < count; entry_s++, entry_d++, desti++, i++) { in xfs_attr3_leaf_moveents()
2391 ichdr_s->count -= 1; in xfs_attr3_leaf_moveents()
2412 ichdr_s->count -= 1; in xfs_attr3_leaf_moveents()
2413 ichdr_d->count += 1; in xfs_attr3_leaf_moveents()
2414 tmp = ichdr_d->count * sizeof(xfs_attr_leaf_entry_t) in xfs_attr3_leaf_moveents()
2425 if (start_s == ichdr_s->count) { in xfs_attr3_leaf_moveents()
2426 tmp = count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_moveents()
2436 tmp = (ichdr_s->count - count) * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_moveents()
2437 entry_s = &xfs_attr3_leaf_entryp(leaf_s)[start_s + count]; in xfs_attr3_leaf_moveents()
2441 tmp = count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_moveents()
2442 entry_s = &xfs_attr3_leaf_entryp(leaf_s)[ichdr_s->count]; in xfs_attr3_leaf_moveents()
2452 ichdr_d->freemap[0].base += ichdr_d->count * sizeof(xfs_attr_leaf_entry_t); in xfs_attr3_leaf_moveents()
2467 int *count) in xfs_attr_leaf_lasthash() argument
2475 if (count) in xfs_attr_leaf_lasthash()
2476 *count = ichdr.count; in xfs_attr_leaf_lasthash()
2477 if (!ichdr.count) in xfs_attr_leaf_lasthash()
2479 return be32_to_cpu(entries[ichdr.count - 1].hashval); in xfs_attr_leaf_lasthash()
2568 ASSERT(args->index < ichdr.count); in xfs_attr3_leaf_clearflag()
2632 ASSERT(args->index < ichdr.count); in xfs_attr3_leaf_setflag()
2711 ASSERT(args->index < ichdr1.count); in xfs_attr3_leaf_flipflags()
2715 ASSERT(args->index2 < ichdr2.count); in xfs_attr3_leaf_flipflags()