Lines Matching refs:count
458 if (leafhdr.count == dp->d_ops->leaf_max_ents(args->geo)) { in xfs_dir2_leafn_add()
465 ASSERT(index == leafhdr.count || in xfs_dir2_leafn_add()
482 lfloglow = leafhdr.count; in xfs_dir2_leafn_add()
531 int *count) /* count of entries in leaf */ in xfs_dir2_leaf_lasthash() argument
544 if (count) in xfs_dir2_leaf_lasthash()
545 *count = leafhdr.count; in xfs_dir2_leaf_lasthash()
546 if (!leafhdr.count) in xfs_dir2_leaf_lasthash()
550 return be32_to_cpu(ents[leafhdr.count - 1].hashval); in xfs_dir2_leaf_lasthash()
590 ASSERT(leafhdr.count > 0); in xfs_dir2_leafn_lookup_for_addname()
612 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_addname()
742 if (leafhdr.count <= 0) in xfs_dir2_leafn_lookup_for_entry()
760 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_entry()
838 ASSERT(index == leafhdr.count || (args->op_flags & XFS_DA_OP_OKNOENT)); in xfs_dir2_leafn_lookup_for_entry()
894 int count) /* count of leaves to copy */ in xfs_dir3_leafn_moveents() argument
898 trace_xfs_dir2_leafn_moveents(args, start_s, start_d, count); in xfs_dir3_leafn_moveents()
903 if (count == 0) in xfs_dir3_leafn_moveents()
911 if (start_d < dhdr->count) { in xfs_dir3_leafn_moveents()
912 memmove(&dents[start_d + count], &dents[start_d], in xfs_dir3_leafn_moveents()
913 (dhdr->count - start_d) * sizeof(xfs_dir2_leaf_entry_t)); in xfs_dir3_leafn_moveents()
914 xfs_dir3_leaf_log_ents(args, bp_d, start_d + count, in xfs_dir3_leafn_moveents()
915 count + dhdr->count - 1); in xfs_dir3_leafn_moveents()
924 for (i = start_s, stale = 0; i < start_s + count; i++) { in xfs_dir3_leafn_moveents()
935 count * sizeof(xfs_dir2_leaf_entry_t)); in xfs_dir3_leafn_moveents()
936 xfs_dir3_leaf_log_ents(args, bp_d, start_d, start_d + count - 1); in xfs_dir3_leafn_moveents()
942 if (start_s + count < shdr->count) { in xfs_dir3_leafn_moveents()
943 memmove(&sents[start_s], &sents[start_s + count], in xfs_dir3_leafn_moveents()
944 count * sizeof(xfs_dir2_leaf_entry_t)); in xfs_dir3_leafn_moveents()
945 xfs_dir3_leaf_log_ents(args, bp_s, start_s, start_s + count - 1); in xfs_dir3_leafn_moveents()
951 shdr->count -= count; in xfs_dir3_leafn_moveents()
953 dhdr->count += count; in xfs_dir3_leafn_moveents()
979 if (hdr1.count > 0 && hdr2.count > 0 && in xfs_dir2_leafn_order()
981 be32_to_cpu(ents2[hdr2.count - 1].hashval) < in xfs_dir2_leafn_order()
982 be32_to_cpu(ents1[hdr1.count - 1].hashval))) in xfs_dir2_leafn_order()
1001 int count; /* count (& direction) leaves */ in xfs_dir2_leafn_rebalance() local
1032 oldsum = hdr1.count + hdr2.count; in xfs_dir2_leafn_rebalance()
1045 if (mid >= hdr1.count) in xfs_dir2_leafn_rebalance()
1046 midhash = be32_to_cpu(ents2[mid - hdr1.count].hashval); in xfs_dir2_leafn_rebalance()
1062 count = hdr1.count - mid + (isleft == 0); in xfs_dir2_leafn_rebalance()
1063 if (count > 0) in xfs_dir2_leafn_rebalance()
1065 hdr1.count - count, blk2->bp, in xfs_dir2_leafn_rebalance()
1066 &hdr2, ents2, 0, count); in xfs_dir2_leafn_rebalance()
1067 else if (count < 0) in xfs_dir2_leafn_rebalance()
1070 hdr1.count, count); in xfs_dir2_leafn_rebalance()
1072 ASSERT(hdr1.count + hdr2.count == oldsum); in xfs_dir2_leafn_rebalance()
1087 if (hdr1.count < hdr2.count) in xfs_dir2_leafn_rebalance()
1089 else if (hdr1.count > hdr2.count) in xfs_dir2_leafn_rebalance()
1092 state->inleaf = swap_blocks ^ (blk1->index <= hdr1.count); in xfs_dir2_leafn_rebalance()
1097 blk2->index = blk1->index - hdr1.count; in xfs_dir2_leafn_rebalance()
1347 (uint)sizeof(ents[0]) * (leafhdr.count - leafhdr.stale)) < in xfs_dir2_leafn_remove()
1430 int count; /* leaf live entry count */ in xfs_dir2_leafn_toosmall() local
1451 count = leafhdr.count - leafhdr.stale; in xfs_dir2_leafn_toosmall()
1452 bytes = dp->d_ops->leaf_hdr_size + count * sizeof(ents[0]); in xfs_dir2_leafn_toosmall()
1466 if (count == 0) { in xfs_dir2_leafn_toosmall()
1505 count = leafhdr.count - leafhdr.stale; in xfs_dir2_leafn_toosmall()
1512 count += hdr2.count - hdr2.stale; in xfs_dir2_leafn_toosmall()
1513 bytes -= count * sizeof(ents[0]); in xfs_dir2_leafn_toosmall()
1590 drop_blk->hashval = be32_to_cpu(dents[drophdr.count - 1].hashval); in xfs_dir2_leafn_unbalance()
1594 drophdr.count); in xfs_dir2_leafn_unbalance()
1598 savehdr.count, drophdr.count); in xfs_dir2_leafn_unbalance()
1599 save_blk->hashval = be32_to_cpu(sents[savehdr.count - 1].hashval); in xfs_dir2_leafn_unbalance()