Lines Matching refs:entry
703 * sfep: If not null, pointer will be set to the last attr entry found on
704 -EEXIST. On -ENOATTR pointer is left at the last entry in the list
705 * basep: If not null, pointer is set to the byte offset of the entry in the
707 * the last entry in the list
1011 struct xfs_attr_leaf_entry *entry;
1020 entry = xfs_attr3_leaf_entryp(leaf);
1023 for (i = 0; i < leafhdr.count; entry++, i++) {
1024 if (entry->flags & XFS_ATTR_INCOMPLETE)
1026 if (!(entry->flags & XFS_ATTR_LOCAL))
1088 * within the data buffer. The next entry starts after the
1130 struct xfs_attr_leaf_entry *entry;
1148 entry = xfs_attr3_leaf_entryp(leaf);
1188 for (i = 0; i < ichdr.count; entry++, i++) {
1189 if (entry->flags & XFS_ATTR_INCOMPLETE)
1191 if (!entry->nameidx)
1193 ASSERT(entry->flags & XFS_ATTR_LOCAL);
1199 nargs.hashval = be32_to_cpu(entry->hashval);
1200 nargs.attr_filter = entry->flags & XFS_ATTR_NSP_ONDISK_MASK;
1340 * Split the leaf node, rebalance, then add the new entry.
1380 * Insert the "new" entry in the correct block.
1423 * (may need to figure in size of entry struct too)
1488 struct xfs_attr_leaf_entry *entry;
1502 * Force open some space in the entry array and fill it in.
1504 entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
1508 memmove(entry + 1, entry, tmp);
1510 XFS_DA_LOGRANGE(leaf, entry, tmp + sizeof(*entry)));
1527 entry->nameidx = cpu_to_be16(ichdr->freemap[mapindex].base +
1529 entry->hashval = cpu_to_be32(args->hashval);
1530 entry->flags = args->attr_filter;
1532 entry->flags |= XFS_ATTR_LOCAL;
1535 entry->flags |= XFS_ATTR_INCOMPLETE;
1542 XFS_DA_LOGRANGE(leaf, entry, sizeof(*entry)));
1544 (be32_to_cpu(entry->hashval) >= be32_to_cpu((entry-1)->hashval)));
1546 (be32_to_cpu(entry->hashval) <= be32_to_cpu((entry+1)->hashval)));
1555 if (entry->flags & XFS_ATTR_LOCAL) {
1566 entry->flags |= XFS_ATTR_INCOMPLETE;
1581 if (be16_to_cpu(entry->nameidx) < ichdr->firstused)
1582 ichdr->firstused = be16_to_cpu(entry->nameidx);
1645 * Copy all entry's in the same (sorted) order,
1701 * taking into account the size of the new entry.
1767 * "inleaf" is true if the new entry should be inserted into blk1.
1851 * the index. We must also track the entry just following the
1852 * new entry for use in an "atomic rename" operation, that entry
1853 * is always the "old" entry and the "new" entry is what we are
1854 * inserting. The index/blkno fields refer to the "old" entry,
1855 * while the index2/blkno2 fields refer to the "new" entry.
1898 * GROT: there will always be enough room in either block for a new entry.
1913 struct xfs_attr_leaf_entry *entry;
1928 half = (max + 1) * sizeof(*entry);
1933 entry = xfs_attr3_leaf_entryp(leaf1);
1934 for (count = index = 0; count < max; entry++, index++, count++) {
1938 * The new entry is in the first block, account for it.
1941 tmp = totallen + sizeof(*entry) +
1955 entry = xfs_attr3_leaf_entryp(leaf1);
1960 * Figure out if next leaf entry would be too much.
1962 tmp = totallen + sizeof(*entry) + xfs_attr_leaf_entsize(leaf1,
1973 * If new entry not in lower block, fix up the count.
1975 totallen -= count * sizeof(*entry);
1977 totallen -= sizeof(*entry) +
2135 struct xfs_attr_leaf_entry *entry;
2151 ASSERT(ichdr.firstused >= ichdr.count * sizeof(*entry) +
2154 entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
2156 ASSERT(be16_to_cpu(entry->nameidx) >= ichdr.firstused);
2157 ASSERT(be16_to_cpu(entry->nameidx) < args->geo->blksize);
2161 * check for adjacency of free'd entry with an existing one,
2163 * adjust any map that borders the entry table,
2180 be16_to_cpu(entry->nameidx)) {
2183 (be16_to_cpu(entry->nameidx) + entsize)) {
2204 ichdr.freemap[after].base = be16_to_cpu(entry->nameidx);
2209 * Replace smallest region (if it is smaller than free'd entry)
2212 ichdr.freemap[smallest].base = be16_to_cpu(entry->nameidx);
2218 * Did we remove the first entry?
2220 if (be16_to_cpu(entry->nameidx) == ichdr.firstused)
2235 memmove(entry, entry + 1, tmp);
2238 XFS_DA_LOGRANGE(leaf, entry, tmp + sizeof(xfs_attr_leaf_entry_t)));
2240 entry = &xfs_attr3_leaf_entryp(leaf)[ichdr.count];
2241 memset(entry, 0, sizeof(xfs_attr_leaf_entry_t));
2244 * If we removed the first entry, re-find the first used byte
2245 * in the name area. Note that if the entry was the "firstused",
2251 entry = xfs_attr3_leaf_entryp(leaf);
2252 for (i = ichdr.count - 1; i >= 0; entry++, i--) {
2253 ASSERT(be16_to_cpu(entry->nameidx) >= ichdr.firstused);
2254 ASSERT(be16_to_cpu(entry->nameidx) < args->geo->blksize);
2256 if (be16_to_cpu(entry->nameidx) < tmp)
2257 tmp = be16_to_cpu(entry->nameidx);
2292 struct xfs_attr_leaf_entry *entry;
2298 entry = xfs_attr3_leaf_entryp(drop_leaf);
2303 drop_blk->hashval = be32_to_cpu(entry[drophdr.count - 1].hashval);
2313 * to make some room in the entry array.
2385 entry = xfs_attr3_leaf_entryp(save_leaf);
2386 save_blk->hashval = be32_to_cpu(entry[savehdr.count - 1].hashval);
2400 * Return in args->index the index into the entry[] array of either
2401 * the found entry, or where the entry should have been (insert before
2402 * that entry).
2413 struct xfs_attr_leaf_entry *entry;
2436 for (entry = &entries[probe]; span > 4; entry = &entries[probe]) {
2438 if (be32_to_cpu(entry->hashval) < hashval)
2440 else if (be32_to_cpu(entry->hashval) > hashval)
2449 if (!(span <= 4 || be32_to_cpu(entry->hashval) == hashval)) {
2458 while (probe > 0 && be32_to_cpu(entry->hashval) >= hashval) {
2459 entry--;
2463 be32_to_cpu(entry->hashval) < hashval) {
2464 entry++;
2467 if (probe == ichdr.count || be32_to_cpu(entry->hashval) != hashval) {
2475 for (; probe < ichdr.count && (be32_to_cpu(entry->hashval) == hashval);
2476 entry++, probe++) {
2480 if (entry->flags & XFS_ATTR_LOCAL) {
2483 name_loc->nameval, entry->flags))
2490 name_rmt->name, entry->flags))
2520 struct xfs_attr_leaf_entry *entry;
2529 entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
2530 if (entry->flags & XFS_ATTR_LOCAL) {
2611 * Copy all entry's in the same (sorted) order,
2770 * Manage the INCOMPLETE flag in a leaf entry
2774 * Clear the INCOMPLETE flag on an entry in a leaf block.
2781 struct xfs_attr_leaf_entry *entry;
2801 entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
2802 ASSERT(entry->flags & XFS_ATTR_INCOMPLETE);
2809 if (entry->flags & XFS_ATTR_LOCAL) {
2818 ASSERT(be32_to_cpu(entry->hashval) == args->hashval);
2823 entry->flags &= ~XFS_ATTR_INCOMPLETE;
2825 XFS_DA_LOGRANGE(leaf, entry, sizeof(*entry)));
2828 ASSERT((entry->flags & XFS_ATTR_LOCAL) == 0);
2840 * Set the INCOMPLETE flag on an entry in a leaf block.
2847 struct xfs_attr_leaf_entry *entry;
2870 entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
2872 ASSERT((entry->flags & XFS_ATTR_INCOMPLETE) == 0);
2873 entry->flags |= XFS_ATTR_INCOMPLETE;
2875 XFS_DA_LOGRANGE(leaf, entry, sizeof(*entry)));
2876 if ((entry->flags & XFS_ATTR_LOCAL) == 0) {
2888 * In a single transaction, clear the INCOMPLETE flag on the leaf entry
2890 * entry given by args->blkno2/index2.