Lines Matching refs:entry
671 * sfep: If not null, pointer will be set to the last attr entry found on
672 -EEXIST. On -ENOATTR pointer is left at the last entry in the list
673 * basep: If not null, pointer is set to the byte offset of the entry in the
675 * the last entry in the list
979 struct xfs_attr_leaf_entry *entry;
988 entry = xfs_attr3_leaf_entryp(leaf);
991 for (i = 0; i < leafhdr.count; entry++, i++) {
992 if (entry->flags & XFS_ATTR_INCOMPLETE)
994 if (!(entry->flags & XFS_ATTR_LOCAL))
1056 * within the data buffer. The next entry starts after the
1098 struct xfs_attr_leaf_entry *entry;
1116 entry = xfs_attr3_leaf_entryp(leaf);
1148 for (i = 0; i < ichdr.count; entry++, i++) {
1149 if (entry->flags & XFS_ATTR_INCOMPLETE)
1151 if (!entry->nameidx)
1153 ASSERT(entry->flags & XFS_ATTR_LOCAL);
1159 nargs.hashval = be32_to_cpu(entry->hashval);
1160 nargs.attr_filter = entry->flags & XFS_ATTR_NSP_ONDISK_MASK;
1295 * Split the leaf node, rebalance, then add the new entry.
1335 * Insert the "new" entry in the correct block.
1378 * (may need to figure in size of entry struct too)
1443 struct xfs_attr_leaf_entry *entry;
1457 * Force open some space in the entry array and fill it in.
1459 entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
1463 memmove(entry + 1, entry, tmp);
1465 XFS_DA_LOGRANGE(leaf, entry, tmp + sizeof(*entry)));
1482 entry->nameidx = cpu_to_be16(ichdr->freemap[mapindex].base +
1484 entry->hashval = cpu_to_be32(args->hashval);
1485 entry->flags = args->attr_filter;
1487 entry->flags |= XFS_ATTR_LOCAL;
1489 entry->flags |= XFS_ATTR_INCOMPLETE;
1496 XFS_DA_LOGRANGE(leaf, entry, sizeof(*entry)));
1498 (be32_to_cpu(entry->hashval) >= be32_to_cpu((entry-1)->hashval)));
1500 (be32_to_cpu(entry->hashval) <= be32_to_cpu((entry+1)->hashval)));
1509 if (entry->flags & XFS_ATTR_LOCAL) {
1520 entry->flags |= XFS_ATTR_INCOMPLETE;
1535 if (be16_to_cpu(entry->nameidx) < ichdr->firstused)
1536 ichdr->firstused = be16_to_cpu(entry->nameidx);
1599 * Copy all entry's in the same (sorted) order,
1655 * taking into account the size of the new entry.
1721 * "inleaf" is true if the new entry should be inserted into blk1.
1805 * the index. We must also track the entry just following the
1806 * new entry for use in an "atomic rename" operation, that entry
1807 * is always the "old" entry and the "new" entry is what we are
1808 * inserting. The index/blkno fields refer to the "old" entry,
1809 * while the index2/blkno2 fields refer to the "new" entry.
1852 * GROT: there will always be enough room in either block for a new entry.
1867 struct xfs_attr_leaf_entry *entry;
1882 half = (max + 1) * sizeof(*entry);
1887 entry = xfs_attr3_leaf_entryp(leaf1);
1888 for (count = index = 0; count < max; entry++, index++, count++) {
1892 * The new entry is in the first block, account for it.
1895 tmp = totallen + sizeof(*entry) +
1909 entry = xfs_attr3_leaf_entryp(leaf1);
1914 * Figure out if next leaf entry would be too much.
1916 tmp = totallen + sizeof(*entry) + xfs_attr_leaf_entsize(leaf1,
1927 * If new entry not in lower block, fix up the count.
1929 totallen -= count * sizeof(*entry);
1931 totallen -= sizeof(*entry) +
2089 struct xfs_attr_leaf_entry *entry;
2105 ASSERT(ichdr.firstused >= ichdr.count * sizeof(*entry) +
2108 entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
2110 ASSERT(be16_to_cpu(entry->nameidx) >= ichdr.firstused);
2111 ASSERT(be16_to_cpu(entry->nameidx) < args->geo->blksize);
2115 * check for adjacency of free'd entry with an existing one,
2117 * adjust any map that borders the entry table,
2134 be16_to_cpu(entry->nameidx)) {
2137 (be16_to_cpu(entry->nameidx) + entsize)) {
2158 ichdr.freemap[after].base = be16_to_cpu(entry->nameidx);
2163 * Replace smallest region (if it is smaller than free'd entry)
2166 ichdr.freemap[smallest].base = be16_to_cpu(entry->nameidx);
2172 * Did we remove the first entry?
2174 if (be16_to_cpu(entry->nameidx) == ichdr.firstused)
2189 memmove(entry, entry + 1, tmp);
2192 XFS_DA_LOGRANGE(leaf, entry, tmp + sizeof(xfs_attr_leaf_entry_t)));
2194 entry = &xfs_attr3_leaf_entryp(leaf)[ichdr.count];
2195 memset(entry, 0, sizeof(xfs_attr_leaf_entry_t));
2198 * If we removed the first entry, re-find the first used byte
2199 * in the name area. Note that if the entry was the "firstused",
2205 entry = xfs_attr3_leaf_entryp(leaf);
2206 for (i = ichdr.count - 1; i >= 0; entry++, i--) {
2207 ASSERT(be16_to_cpu(entry->nameidx) >= ichdr.firstused);
2208 ASSERT(be16_to_cpu(entry->nameidx) < args->geo->blksize);
2210 if (be16_to_cpu(entry->nameidx) < tmp)
2211 tmp = be16_to_cpu(entry->nameidx);
2246 struct xfs_attr_leaf_entry *entry;
2254 entry = xfs_attr3_leaf_entryp(drop_leaf);
2259 drop_blk->hashval = be32_to_cpu(entry[drophdr.count - 1].hashval);
2269 * to make some room in the entry array.
2341 entry = xfs_attr3_leaf_entryp(save_leaf);
2342 save_blk->hashval = be32_to_cpu(entry[savehdr.count - 1].hashval);
2356 * Return in args->index the index into the entry[] array of either
2357 * the found entry, or where the entry should have been (insert before
2358 * that entry).
2369 struct xfs_attr_leaf_entry *entry;
2392 for (entry = &entries[probe]; span > 4; entry = &entries[probe]) {
2394 if (be32_to_cpu(entry->hashval) < hashval)
2396 else if (be32_to_cpu(entry->hashval) > hashval)
2405 if (!(span <= 4 || be32_to_cpu(entry->hashval) == hashval)) {
2414 while (probe > 0 && be32_to_cpu(entry->hashval) >= hashval) {
2415 entry--;
2419 be32_to_cpu(entry->hashval) < hashval) {
2420 entry++;
2423 if (probe == ichdr.count || be32_to_cpu(entry->hashval) != hashval) {
2431 for (; probe < ichdr.count && (be32_to_cpu(entry->hashval) == hashval);
2432 entry++, probe++) {
2436 if (entry->flags & XFS_ATTR_LOCAL) {
2439 name_loc->nameval, entry->flags))
2446 name_rmt->name, entry->flags))
2476 struct xfs_attr_leaf_entry *entry;
2485 entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
2486 if (entry->flags & XFS_ATTR_LOCAL) {
2567 * Copy all entry's in the same (sorted) order,
2726 * Manage the INCOMPLETE flag in a leaf entry
2730 * Clear the INCOMPLETE flag on an entry in a leaf block.
2737 struct xfs_attr_leaf_entry *entry;
2757 entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
2758 ASSERT(entry->flags & XFS_ATTR_INCOMPLETE);
2765 if (entry->flags & XFS_ATTR_LOCAL) {
2774 ASSERT(be32_to_cpu(entry->hashval) == args->hashval);
2779 entry->flags &= ~XFS_ATTR_INCOMPLETE;
2781 XFS_DA_LOGRANGE(leaf, entry, sizeof(*entry)));
2784 ASSERT((entry->flags & XFS_ATTR_LOCAL) == 0);
2796 * Set the INCOMPLETE flag on an entry in a leaf block.
2803 struct xfs_attr_leaf_entry *entry;
2826 entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
2828 ASSERT((entry->flags & XFS_ATTR_INCOMPLETE) == 0);
2829 entry->flags |= XFS_ATTR_INCOMPLETE;
2831 XFS_DA_LOGRANGE(leaf, entry, sizeof(*entry)));
2832 if ((entry->flags & XFS_ATTR_LOCAL) == 0) {
2844 * In a single transaction, clear the INCOMPLETE flag on the leaf entry
2846 * entry given by args->blkno2/index2.