Lines Matching refs:ARCH_CONVERT

130 	blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT);  in xfs_dir2_block_to_leaf()
134 INT_COPY(leaf->hdr.count, btp->count, ARCH_CONVERT); /* INT_: type change */ in xfs_dir2_block_to_leaf()
135 INT_COPY(leaf->hdr.stale, btp->stale, ARCH_CONVERT); /* INT_: type change */ in xfs_dir2_block_to_leaf()
140 memcpy(leaf->ents, blp, INT_GET(btp->count, ARCH_CONVERT) * sizeof(xfs_dir2_leaf_entry_t)); in xfs_dir2_block_to_leaf()
141 xfs_dir2_leaf_log_ents(tp, lbp, 0, INT_GET(leaf->hdr.count, ARCH_CONVERT) - 1); in xfs_dir2_block_to_leaf()
156 INT_SET(block->hdr.magic, ARCH_CONVERT, XFS_DIR2_DATA_MAGIC); in xfs_dir2_block_to_leaf()
164 INT_SET(ltp->bestcount, ARCH_CONVERT, 1); in xfs_dir2_block_to_leaf()
165 bestsp = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT); in xfs_dir2_block_to_leaf()
166 INT_COPY(bestsp[0], block->hdr.bestfree[0].length, ARCH_CONVERT); in xfs_dir2_block_to_leaf()
236 bestsp = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT); in xfs_dir2_leaf_addname()
245 …index < INT_GET(leaf->hdr.count, ARCH_CONVERT) && INT_GET(lep->hashval, ARCH_CONVERT) == args->has… in xfs_dir2_leaf_addname()
247 if (INT_GET(lep->address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR) in xfs_dir2_leaf_addname()
249 i = XFS_DIR2_DATAPTR_TO_DB(mp, INT_GET(lep->address, ARCH_CONVERT)); in xfs_dir2_leaf_addname()
250 ASSERT(i < INT_GET(ltp->bestcount, ARCH_CONVERT)); in xfs_dir2_leaf_addname()
251 ASSERT(INT_GET(bestsp[i], ARCH_CONVERT) != NULLDATAOFF); in xfs_dir2_leaf_addname()
252 if (INT_GET(bestsp[i], ARCH_CONVERT) >= length) { in xfs_dir2_leaf_addname()
261 for (i = 0; i < INT_GET(ltp->bestcount, ARCH_CONVERT); i++) { in xfs_dir2_leaf_addname()
265 if (INT_GET(bestsp[i], ARCH_CONVERT) == NULLDATAOFF && use_block == -1) in xfs_dir2_leaf_addname()
267 else if (INT_GET(bestsp[i], ARCH_CONVERT) >= length) { in xfs_dir2_leaf_addname()
277 (!INT_ISZERO(leaf->hdr.stale, ARCH_CONVERT) ? 0 : (uint)sizeof(leaf->ents[0])) + in xfs_dir2_leaf_addname()
283 if (use_block != -1 && INT_GET(bestsp[use_block], ARCH_CONVERT) == NULLDATAOFF) in xfs_dir2_leaf_addname()
289 if ((char *)bestsp - (char *)&leaf->ents[INT_GET(leaf->hdr.count, ARCH_CONVERT)] < needbytes && in xfs_dir2_leaf_addname()
290 INT_GET(leaf->hdr.stale, ARCH_CONVERT) > 1) { in xfs_dir2_leaf_addname()
297 else if ((char *)bestsp - (char *)&leaf->ents[INT_GET(leaf->hdr.count, ARCH_CONVERT)] < in xfs_dir2_leaf_addname()
353 else if (INT_GET(leaf->hdr.stale, ARCH_CONVERT)) { in xfs_dir2_leaf_addname()
354 lfloglow = INT_GET(leaf->hdr.count, ARCH_CONVERT); in xfs_dir2_leaf_addname()
381 if (use_block >= INT_GET(ltp->bestcount, ARCH_CONVERT)) { in xfs_dir2_leaf_addname()
384 INT_GET(ltp->bestcount, ARCH_CONVERT) * sizeof(bestsp[0])); in xfs_dir2_leaf_addname()
385 INT_MOD(ltp->bestcount, ARCH_CONVERT, +1); in xfs_dir2_leaf_addname()
387 xfs_dir2_leaf_log_bests(tp, lbp, 0, INT_GET(ltp->bestcount, ARCH_CONVERT) - 1); in xfs_dir2_leaf_addname()
395 INT_COPY(bestsp[use_block], data->hdr.bestfree[0].length, ARCH_CONVERT); in xfs_dir2_leaf_addname()
417 ((char *)data + INT_GET(data->hdr.bestfree[0].offset, ARCH_CONVERT)); in xfs_dir2_leaf_addname()
418 ASSERT(INT_GET(dup->length, ARCH_CONVERT) >= length); in xfs_dir2_leaf_addname()
430 INT_SET(dep->inumber, ARCH_CONVERT, args->inumber); in xfs_dir2_leaf_addname()
434 INT_SET(*tagp, ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)dep - (char *)data)); in xfs_dir2_leaf_addname()
450 …if (INT_GET(bestsp[use_block], ARCH_CONVERT) != INT_GET(data->hdr.bestfree[0].length, ARCH_CONVERT in xfs_dir2_leaf_addname()
451 INT_COPY(bestsp[use_block], data->hdr.bestfree[0].length, ARCH_CONVERT); in xfs_dir2_leaf_addname()
459 if (INT_ISZERO(leaf->hdr.stale, ARCH_CONVERT)) { in xfs_dir2_leaf_addname()
463 if (index < INT_GET(leaf->hdr.count, ARCH_CONVERT)) in xfs_dir2_leaf_addname()
465 (INT_GET(leaf->hdr.count, ARCH_CONVERT) - index) * sizeof(*lep)); in xfs_dir2_leaf_addname()
470 lfloghigh = INT_GET(leaf->hdr.count, ARCH_CONVERT); in xfs_dir2_leaf_addname()
471 INT_MOD(leaf->hdr.count, ARCH_CONVERT, +1); in xfs_dir2_leaf_addname()
491 INT_GET(leaf->ents[lowstale].address, ARCH_CONVERT) != in xfs_dir2_leaf_addname()
501 highstale < INT_GET(leaf->hdr.count, ARCH_CONVERT) && in xfs_dir2_leaf_addname()
502 INT_GET(leaf->ents[highstale].address, ARCH_CONVERT) != in xfs_dir2_leaf_addname()
513 (highstale == INT_GET(leaf->hdr.count, ARCH_CONVERT) || in xfs_dir2_leaf_addname()
516 ASSERT(INT_GET(leaf->ents[lowstale].address, ARCH_CONVERT) == in xfs_dir2_leaf_addname()
535 ASSERT(INT_GET(leaf->ents[highstale].address, ARCH_CONVERT) == in xfs_dir2_leaf_addname()
549 INT_MOD(leaf->hdr.stale, ARCH_CONVERT, -1); in xfs_dir2_leaf_addname()
554 INT_SET(lep->hashval, ARCH_CONVERT, args->hashval); in xfs_dir2_leaf_addname()
555 …INT_SET(lep->address, ARCH_CONVERT, XFS_DIR2_DB_OFF_TO_DATAPTR(mp, use_block, INT_GET(*tagp, ARCH_… in xfs_dir2_leaf_addname()
586 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAF1_MAGIC); in xfs_dir2_leaf_check()
592 ASSERT(INT_GET(leaf->hdr.count, ARCH_CONVERT) <= XFS_DIR2_MAX_LEAF_ENTS(mp)); in xfs_dir2_leaf_check()
597 ASSERT((char *)&leaf->ents[INT_GET(leaf->hdr.count, ARCH_CONVERT)] <= in xfs_dir2_leaf_check()
598 (char *)XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT)); in xfs_dir2_leaf_check()
602 for (i = stale = 0; i < INT_GET(leaf->hdr.count, ARCH_CONVERT); i++) { in xfs_dir2_leaf_check()
603 if (i + 1 < INT_GET(leaf->hdr.count, ARCH_CONVERT)) in xfs_dir2_leaf_check()
604 ASSERT(INT_GET(leaf->ents[i].hashval, ARCH_CONVERT) <= in xfs_dir2_leaf_check()
605 INT_GET(leaf->ents[i + 1].hashval, ARCH_CONVERT)); in xfs_dir2_leaf_check()
606 if (INT_GET(leaf->ents[i].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR) in xfs_dir2_leaf_check()
609 ASSERT(INT_GET(leaf->hdr.stale, ARCH_CONVERT) == stale); in xfs_dir2_leaf_check()
628 if (INT_ISZERO(leaf->hdr.stale, ARCH_CONVERT)) { in xfs_dir2_leaf_compact()
634 for (from = to = 0, loglow = -1; from < INT_GET(leaf->hdr.count, ARCH_CONVERT); from++) { in xfs_dir2_leaf_compact()
635 if (INT_GET(leaf->ents[from].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR) in xfs_dir2_leaf_compact()
650 ASSERT(INT_GET(leaf->hdr.stale, ARCH_CONVERT) == from - to); in xfs_dir2_leaf_compact()
651 INT_MOD(leaf->hdr.count, ARCH_CONVERT, -(INT_GET(leaf->hdr.stale, ARCH_CONVERT))); in xfs_dir2_leaf_compact()
652 INT_ZERO(leaf->hdr.stale, ARCH_CONVERT); in xfs_dir2_leaf_compact()
685 ASSERT(INT_GET(leaf->hdr.stale, ARCH_CONVERT) > 1); in xfs_dir2_leaf_compact_x1()
692 INT_GET(leaf->ents[lowstale].address, ARCH_CONVERT) != XFS_DIR2_NULL_DATAPTR; in xfs_dir2_leaf_compact_x1()
700 highstale < INT_GET(leaf->hdr.count, ARCH_CONVERT) && in xfs_dir2_leaf_compact_x1()
701 INT_GET(leaf->ents[highstale].address, ARCH_CONVERT) != XFS_DIR2_NULL_DATAPTR && in xfs_dir2_leaf_compact_x1()
709 (highstale == INT_GET(leaf->hdr.count, ARCH_CONVERT) || in xfs_dir2_leaf_compact_x1()
718 for (from = to = 0; from < INT_GET(leaf->hdr.count, ARCH_CONVERT); from++) { in xfs_dir2_leaf_compact_x1()
725 INT_GET(leaf->ents[from].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR) { in xfs_dir2_leaf_compact_x1()
753 INT_MOD(leaf->hdr.count, ARCH_CONVERT, -(from - to)); in xfs_dir2_leaf_compact_x1()
754 INT_SET(leaf->hdr.stale, ARCH_CONVERT, 1); in xfs_dir2_leaf_compact_x1()
762 highstale = INT_GET(leaf->hdr.count, ARCH_CONVERT); in xfs_dir2_leaf_compact_x1()
763 *highlogp = INT_GET(leaf->hdr.count, ARCH_CONVERT) - 1; in xfs_dir2_leaf_compact_x1()
1069 if (INT_GET(dup->freetag, ARCH_CONVERT) in xfs_dir2_leaf_getdents()
1073 ARCH_CONVERT); in xfs_dir2_leaf_getdents()
1102 if (INT_GET(dup->freetag, ARCH_CONVERT) in xfs_dir2_leaf_getdents()
1104 length = INT_GET(dup->length, ARCH_CONVERT); in xfs_dir2_leaf_getdents()
1121 p.ino = INT_GET(dep->inumber, ARCH_CONVERT); in xfs_dir2_leaf_getdents()
1194 INT_SET(leaf->hdr.info.magic, ARCH_CONVERT, magic); in xfs_dir2_leaf_init()
1195 INT_ZERO(leaf->hdr.info.forw, ARCH_CONVERT); in xfs_dir2_leaf_init()
1196 INT_ZERO(leaf->hdr.info.back, ARCH_CONVERT); in xfs_dir2_leaf_init()
1197 INT_ZERO(leaf->hdr.count, ARCH_CONVERT); in xfs_dir2_leaf_init()
1198 INT_ZERO(leaf->hdr.stale, ARCH_CONVERT); in xfs_dir2_leaf_init()
1207 INT_ZERO(ltp->bestcount, ARCH_CONVERT); in xfs_dir2_leaf_init()
1230 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAF1_MAGIC); in xfs_dir2_leaf_log_bests()
1232 firstb = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT) + first; in xfs_dir2_leaf_log_bests()
1233 lastb = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT) + last; in xfs_dir2_leaf_log_bests()
1253 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAF1_MAGIC || in xfs_dir2_leaf_log_ents()
1254 INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_leaf_log_ents()
1272 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAF1_MAGIC || in xfs_dir2_leaf_log_header()
1273 INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_leaf_log_header()
1292 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAF1_MAGIC); in xfs_dir2_leaf_log_tail()
1337 XFS_DIR2_DATAPTR_TO_OFF(dp->i_mount, INT_GET(lep->address, ARCH_CONVERT))); in xfs_dir2_leaf_lookup()
1341 args->inumber = INT_GET(dep->inumber, ARCH_CONVERT); in xfs_dir2_leaf_lookup()
1396 …index < INT_GET(leaf->hdr.count, ARCH_CONVERT) && INT_GET(lep->hashval, ARCH_CONVERT) == args->has… in xfs_dir2_leaf_lookup_int()
1401 if (INT_GET(lep->address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR) in xfs_dir2_leaf_lookup_int()
1406 newdb = XFS_DIR2_DATAPTR_TO_DB(mp, INT_GET(lep->address, ARCH_CONVERT)); in xfs_dir2_leaf_lookup_int()
1429 XFS_DIR2_DATAPTR_TO_OFF(mp, INT_GET(lep->address, ARCH_CONVERT))); in xfs_dir2_leaf_lookup_int()
1494 db = XFS_DIR2_DATAPTR_TO_DB(mp, INT_GET(lep->address, ARCH_CONVERT)); in xfs_dir2_leaf_removename()
1496 ((char *)data + XFS_DIR2_DATAPTR_TO_OFF(mp, INT_GET(lep->address, ARCH_CONVERT))); in xfs_dir2_leaf_removename()
1498 oldbest = INT_GET(data->hdr.bestfree[0].length, ARCH_CONVERT); in xfs_dir2_leaf_removename()
1500 bestsp = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT); in xfs_dir2_leaf_removename()
1501 ASSERT(INT_GET(bestsp[db], ARCH_CONVERT) == oldbest); in xfs_dir2_leaf_removename()
1511 INT_MOD(leaf->hdr.stale, ARCH_CONVERT, +1); in xfs_dir2_leaf_removename()
1513 INT_SET(lep->address, ARCH_CONVERT, XFS_DIR2_NULL_DATAPTR); in xfs_dir2_leaf_removename()
1527 if (INT_GET(data->hdr.bestfree[0].length, ARCH_CONVERT) != oldbest) { in xfs_dir2_leaf_removename()
1528 INT_COPY(bestsp[db], data->hdr.bestfree[0].length, ARCH_CONVERT); in xfs_dir2_leaf_removename()
1535 if (INT_GET(data->hdr.bestfree[0].length, ARCH_CONVERT) == in xfs_dir2_leaf_removename()
1558 if (db == INT_GET(ltp->bestcount, ARCH_CONVERT) - 1) { in xfs_dir2_leaf_removename()
1563 if (INT_GET(bestsp[i], ARCH_CONVERT) != NULLDATAOFF) in xfs_dir2_leaf_removename()
1571 (INT_GET(ltp->bestcount, ARCH_CONVERT) - (db - i)) * sizeof(*bestsp)); in xfs_dir2_leaf_removename()
1572 INT_MOD(ltp->bestcount, ARCH_CONVERT, -(db - i)); in xfs_dir2_leaf_removename()
1574 xfs_dir2_leaf_log_bests(tp, lbp, 0, INT_GET(ltp->bestcount, ARCH_CONVERT) - 1); in xfs_dir2_leaf_removename()
1576 INT_SET(bestsp[db], ARCH_CONVERT, NULLDATAOFF); in xfs_dir2_leaf_removename()
1627 XFS_DIR2_DATAPTR_TO_OFF(dp->i_mount, INT_GET(lep->address, ARCH_CONVERT))); in xfs_dir2_leaf_replace()
1628 ASSERT(args->inumber != INT_GET(dep->inumber, ARCH_CONVERT)); in xfs_dir2_leaf_replace()
1632 INT_SET(dep->inumber, ARCH_CONVERT, args->inumber); in xfs_dir2_leaf_replace()
1661 if (INT_ISZERO(leaf->hdr.count, ARCH_CONVERT)) in xfs_dir2_leaf_search_hash()
1668 for (lep = leaf->ents, low = 0, high = INT_GET(leaf->hdr.count, ARCH_CONVERT) - 1, in xfs_dir2_leaf_search_hash()
1672 if ((hash = INT_GET(lep[mid].hashval, ARCH_CONVERT)) == hashwant) in xfs_dir2_leaf_search_hash()
1683 while (mid > 0 && INT_GET(lep[mid - 1].hashval, ARCH_CONVERT) == hashwant) { in xfs_dir2_leaf_search_hash()
1729 ASSERT(INT_GET(data->hdr.magic, ARCH_CONVERT) == XFS_DIR2_DATA_MAGIC); in xfs_dir2_leaf_trim_data()
1738 ASSERT(INT_GET(data->hdr.bestfree[0].length, ARCH_CONVERT) == in xfs_dir2_leaf_trim_data()
1740 ASSERT(db == INT_GET(ltp->bestcount, ARCH_CONVERT) - 1); in xfs_dir2_leaf_trim_data()
1752 bestsp = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT); in xfs_dir2_leaf_trim_data()
1753 INT_MOD(ltp->bestcount, ARCH_CONVERT, -1); in xfs_dir2_leaf_trim_data()
1754 memmove(&bestsp[1], &bestsp[0], INT_GET(ltp->bestcount, ARCH_CONVERT) * sizeof(*bestsp)); in xfs_dir2_leaf_trim_data()
1756 xfs_dir2_leaf_log_bests(tp, lbp, 0, INT_GET(ltp->bestcount, ARCH_CONVERT) - 1); in xfs_dir2_leaf_trim_data()
1828 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_node_to_leaf()
1837 ASSERT(INT_GET(free->hdr.magic, ARCH_CONVERT) == XFS_DIR2_FREE_MAGIC); in xfs_dir2_node_to_leaf()
1838 ASSERT(INT_ISZERO(free->hdr.firstdb, ARCH_CONVERT)); in xfs_dir2_node_to_leaf()
1844 …(INT_GET(leaf->hdr.count, ARCH_CONVERT) - INT_GET(leaf->hdr.stale, ARCH_CONVERT)) * (uint)sizeof(l… in xfs_dir2_node_to_leaf()
1845 INT_GET(free->hdr.nvalid, ARCH_CONVERT) * (uint)sizeof(leaf->bests[0]) + in xfs_dir2_node_to_leaf()
1855 if (INT_GET(leaf->hdr.stale, ARCH_CONVERT)) in xfs_dir2_node_to_leaf()
1859 INT_SET(leaf->hdr.info.magic, ARCH_CONVERT, XFS_DIR2_LEAF1_MAGIC); in xfs_dir2_node_to_leaf()
1864 INT_COPY(ltp->bestcount, free->hdr.nvalid, ARCH_CONVERT); in xfs_dir2_node_to_leaf()
1868 memcpy(XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT), free->bests, in xfs_dir2_node_to_leaf()
1869 INT_GET(ltp->bestcount, ARCH_CONVERT) * sizeof(leaf->bests[0])); in xfs_dir2_node_to_leaf()
1870 xfs_dir2_leaf_log_bests(tp, lbp, 0, INT_GET(ltp->bestcount, ARCH_CONVERT) - 1); in xfs_dir2_node_to_leaf()