Lines Matching refs:ARCH_CONVERT

101 	ASSERT(INT_GET(free->hdr.magic, ARCH_CONVERT) == XFS_DIR2_FREE_MAGIC);  in xfs_dir2_free_log_bests()
119 ASSERT(INT_GET(free->hdr.magic, ARCH_CONVERT) == XFS_DIR2_FREE_MAGIC); in xfs_dir2_free_log_header()
174 INT_SET(free->hdr.magic, ARCH_CONVERT, XFS_DIR2_FREE_MAGIC); in xfs_dir2_leaf_to_node()
175 INT_ZERO(free->hdr.firstdb, ARCH_CONVERT); in xfs_dir2_leaf_to_node()
176 ASSERT(INT_GET(ltp->bestcount, ARCH_CONVERT) <= (uint)dp->i_d.di_size / mp->m_dirblksize); in xfs_dir2_leaf_to_node()
177 INT_COPY(free->hdr.nvalid, ltp->bestcount, ARCH_CONVERT); in xfs_dir2_leaf_to_node()
182 for (i = n = 0, from = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT), to = free->bests; in xfs_dir2_leaf_to_node()
183 i < INT_GET(ltp->bestcount, ARCH_CONVERT); i++, from++, to++) { in xfs_dir2_leaf_to_node()
184 if ((off = INT_GET(*from, ARCH_CONVERT)) != NULLDATAOFF) in xfs_dir2_leaf_to_node()
186 INT_SET(*to, ARCH_CONVERT, off); in xfs_dir2_leaf_to_node()
188 INT_SET(free->hdr.nused, ARCH_CONVERT, n); in xfs_dir2_leaf_to_node()
189 INT_SET(leaf->hdr.info.magic, ARCH_CONVERT, XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_leaf_to_node()
195 xfs_dir2_free_log_bests(tp, fbp, 0, INT_GET(free->hdr.nvalid, ARCH_CONVERT) - 1); in xfs_dir2_leaf_to_node()
242 if (INT_GET(leaf->hdr.count, ARCH_CONVERT) == XFS_DIR2_MAX_LEAF_ENTS(mp)) { in xfs_dir2_leafn_add()
243 if (INT_ISZERO(leaf->hdr.stale, ARCH_CONVERT)) in xfs_dir2_leafn_add()
245 compact = INT_GET(leaf->hdr.stale, ARCH_CONVERT) > 1; in xfs_dir2_leafn_add()
248 ASSERT(index == 0 || INT_GET(leaf->ents[index - 1].hashval, ARCH_CONVERT) <= args->hashval); in xfs_dir2_leafn_add()
249 ASSERT(index == INT_GET(leaf->hdr.count, ARCH_CONVERT) || in xfs_dir2_leafn_add()
250 INT_GET(leaf->ents[index].hashval, ARCH_CONVERT) >= args->hashval); in xfs_dir2_leafn_add()
266 else if (!INT_ISZERO(leaf->hdr.stale, ARCH_CONVERT)) { in xfs_dir2_leafn_add()
267 lfloglow = INT_GET(leaf->hdr.count, ARCH_CONVERT); in xfs_dir2_leafn_add()
273 if (INT_ISZERO(leaf->hdr.stale, ARCH_CONVERT)) { in xfs_dir2_leafn_add()
275 if (index < INT_GET(leaf->hdr.count, ARCH_CONVERT)) in xfs_dir2_leafn_add()
277 (INT_GET(leaf->hdr.count, ARCH_CONVERT) - index) * sizeof(*lep)); in xfs_dir2_leafn_add()
279 lfloghigh = INT_GET(leaf->hdr.count, ARCH_CONVERT); in xfs_dir2_leafn_add()
280 INT_MOD(leaf->hdr.count, ARCH_CONVERT, +1); in xfs_dir2_leafn_add()
296 INT_GET(leaf->ents[lowstale].address, ARCH_CONVERT) != in xfs_dir2_leafn_add()
306 highstale < INT_GET(leaf->hdr.count, ARCH_CONVERT) && in xfs_dir2_leafn_add()
307 INT_GET(leaf->ents[highstale].address, ARCH_CONVERT) != in xfs_dir2_leafn_add()
319 (highstale == INT_GET(leaf->hdr.count, ARCH_CONVERT) || in xfs_dir2_leafn_add()
321 ASSERT(INT_GET(leaf->ents[lowstale].address, ARCH_CONVERT) == in xfs_dir2_leafn_add()
337 ASSERT(INT_GET(leaf->ents[highstale].address, ARCH_CONVERT) == in xfs_dir2_leafn_add()
348 INT_MOD(leaf->hdr.stale, ARCH_CONVERT, -1); in xfs_dir2_leafn_add()
353 INT_SET(lep->hashval, ARCH_CONVERT, args->hashval); in xfs_dir2_leafn_add()
354 INT_SET(lep->address, ARCH_CONVERT, XFS_DIR2_DB_OFF_TO_DATAPTR(mp, args->blkno, args->index)); in xfs_dir2_leafn_add()
377 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_leafn_check()
378 ASSERT(INT_GET(leaf->hdr.count, ARCH_CONVERT) <= XFS_DIR2_MAX_LEAF_ENTS(mp)); in xfs_dir2_leafn_check()
379 for (i = stale = 0; i < INT_GET(leaf->hdr.count, ARCH_CONVERT); i++) { in xfs_dir2_leafn_check()
380 if (i + 1 < INT_GET(leaf->hdr.count, ARCH_CONVERT)) { in xfs_dir2_leafn_check()
381 ASSERT(INT_GET(leaf->ents[i].hashval, ARCH_CONVERT) <= in xfs_dir2_leafn_check()
382 INT_GET(leaf->ents[i + 1].hashval, ARCH_CONVERT)); in xfs_dir2_leafn_check()
384 if (INT_GET(leaf->ents[i].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR) in xfs_dir2_leafn_check()
387 ASSERT(INT_GET(leaf->hdr.stale, ARCH_CONVERT) == stale); in xfs_dir2_leafn_check()
403 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_leafn_lasthash()
405 *count = INT_GET(leaf->hdr.count, ARCH_CONVERT); in xfs_dir2_leafn_lasthash()
406 if (INT_ISZERO(leaf->hdr.count, ARCH_CONVERT)) in xfs_dir2_leafn_lasthash()
408 return INT_GET(leaf->ents[INT_GET(leaf->hdr.count, ARCH_CONVERT) - 1].hashval, ARCH_CONVERT); in xfs_dir2_leafn_lasthash()
444 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_leafn_lookup_int()
446 ASSERT(INT_GET(leaf->hdr.count, ARCH_CONVERT) > 0); in xfs_dir2_leafn_lookup_int()
468 ASSERT(INT_GET(free->hdr.magic, ARCH_CONVERT) == XFS_DIR2_FREE_MAGIC); in xfs_dir2_leafn_lookup_int()
481 …index < INT_GET(leaf->hdr.count, ARCH_CONVERT) && INT_GET(lep->hashval, ARCH_CONVERT) == args->has… in xfs_dir2_leafn_lookup_int()
486 if (INT_GET(lep->address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR) in xfs_dir2_leafn_lookup_int()
491 newdb = XFS_DIR2_DATAPTR_TO_DB(mp, INT_GET(lep->address, ARCH_CONVERT)); in xfs_dir2_leafn_lookup_int()
531 ASSERT(INT_GET(free->hdr.magic, ARCH_CONVERT) == in xfs_dir2_leafn_lookup_int()
533 ASSERT((INT_GET(free->hdr.firstdb, ARCH_CONVERT) % in xfs_dir2_leafn_lookup_int()
536 ASSERT(INT_GET(free->hdr.firstdb, ARCH_CONVERT) <= curdb); in xfs_dir2_leafn_lookup_int()
538 INT_GET(free->hdr.firstdb, ARCH_CONVERT) + in xfs_dir2_leafn_lookup_int()
539 INT_GET(free->hdr.nvalid, ARCH_CONVERT)); in xfs_dir2_leafn_lookup_int()
548 if (unlikely(INT_GET(free->bests[fi], ARCH_CONVERT) == NULLDATAOFF)) { in xfs_dir2_leafn_lookup_int()
553 if (INT_GET(free->bests[fi], ARCH_CONVERT) >= length) { in xfs_dir2_leafn_lookup_int()
597 XFS_DIR2_DATAPTR_TO_OFF(mp, INT_GET(lep->address, ARCH_CONVERT))); in xfs_dir2_leafn_lookup_int()
604 args->inumber = INT_GET(dep->inumber, ARCH_CONVERT); in xfs_dir2_leafn_lookup_int()
644 ASSERT(index == INT_GET(leaf->hdr.count, ARCH_CONVERT) || args->oknoent); in xfs_dir2_leafn_lookup_int()
682 if (start_d < INT_GET(leaf_d->hdr.count, ARCH_CONVERT)) { in xfs_dir2_leafn_moveents()
684 (INT_GET(leaf_d->hdr.count, ARCH_CONVERT) - start_d) * in xfs_dir2_leafn_moveents()
687 count + INT_GET(leaf_d->hdr.count, ARCH_CONVERT) - 1); in xfs_dir2_leafn_moveents()
693 if (!INT_ISZERO(leaf_s->hdr.stale, ARCH_CONVERT)) { in xfs_dir2_leafn_moveents()
697 if (INT_GET(leaf_s->ents[i].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR) in xfs_dir2_leafn_moveents()
712 if (start_s + count < INT_GET(leaf_s->hdr.count, ARCH_CONVERT)) { in xfs_dir2_leafn_moveents()
720 INT_MOD(leaf_s->hdr.count, ARCH_CONVERT, -(count)); in xfs_dir2_leafn_moveents()
721 INT_MOD(leaf_s->hdr.stale, ARCH_CONVERT, -(stale)); in xfs_dir2_leafn_moveents()
722 INT_MOD(leaf_d->hdr.count, ARCH_CONVERT, count); in xfs_dir2_leafn_moveents()
723 INT_MOD(leaf_d->hdr.stale, ARCH_CONVERT, stale); in xfs_dir2_leafn_moveents()
744 ASSERT(INT_GET(leaf1->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_leafn_order()
745 ASSERT(INT_GET(leaf2->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_leafn_order()
746 if (INT_GET(leaf1->hdr.count, ARCH_CONVERT) > 0 && in xfs_dir2_leafn_order()
747 INT_GET(leaf2->hdr.count, ARCH_CONVERT) > 0 && in xfs_dir2_leafn_order()
748 … (INT_GET(leaf2->ents[0].hashval, ARCH_CONVERT) < INT_GET(leaf1->ents[0].hashval, ARCH_CONVERT) || in xfs_dir2_leafn_order()
749 INT_GET(leaf2->ents[INT_GET(leaf2->hdr.count, ARCH_CONVERT) - 1].hashval, ARCH_CONVERT) < in xfs_dir2_leafn_order()
750 INT_GET(leaf1->ents[INT_GET(leaf1->hdr.count, ARCH_CONVERT) - 1].hashval, ARCH_CONVERT))) in xfs_dir2_leafn_order()
793 oldsum = INT_GET(leaf1->hdr.count, ARCH_CONVERT) + INT_GET(leaf2->hdr.count, ARCH_CONVERT); in xfs_dir2_leafn_rebalance()
795 oldstale = INT_GET(leaf1->hdr.stale, ARCH_CONVERT) + INT_GET(leaf2->hdr.stale, ARCH_CONVERT); in xfs_dir2_leafn_rebalance()
805 if (mid >= INT_GET(leaf1->hdr.count, ARCH_CONVERT)) in xfs_dir2_leafn_rebalance()
806 …idhash = INT_GET(leaf2->ents[mid - INT_GET(leaf1->hdr.count, ARCH_CONVERT)].hashval, ARCH_CONVERT); in xfs_dir2_leafn_rebalance()
808 midhash = INT_GET(leaf1->ents[mid].hashval, ARCH_CONVERT); in xfs_dir2_leafn_rebalance()
822 count = INT_GET(leaf1->hdr.count, ARCH_CONVERT) - mid + (isleft == 0); in xfs_dir2_leafn_rebalance()
825 INT_GET(leaf1->hdr.count, ARCH_CONVERT) - count, blk2->bp, 0, count); in xfs_dir2_leafn_rebalance()
828 INT_GET(leaf1->hdr.count, ARCH_CONVERT), count); in xfs_dir2_leafn_rebalance()
829 …ASSERT(INT_GET(leaf1->hdr.count, ARCH_CONVERT) + INT_GET(leaf2->hdr.count, ARCH_CONVERT) == oldsum… in xfs_dir2_leafn_rebalance()
830 …ASSERT(INT_GET(leaf1->hdr.stale, ARCH_CONVERT) + INT_GET(leaf2->hdr.stale, ARCH_CONVERT) == oldsta… in xfs_dir2_leafn_rebalance()
834 if (INT_GET(leaf1->hdr.count, ARCH_CONVERT) < INT_GET(leaf2->hdr.count, ARCH_CONVERT)) in xfs_dir2_leafn_rebalance()
836 else if (INT_GET(leaf1->hdr.count, ARCH_CONVERT) > INT_GET(leaf2->hdr.count, ARCH_CONVERT)) in xfs_dir2_leafn_rebalance()
840 swap ^ (blk1->index <= INT_GET(leaf1->hdr.count, ARCH_CONVERT)); in xfs_dir2_leafn_rebalance()
845 blk2->index = blk1->index - INT_GET(leaf1->hdr.count, ARCH_CONVERT); in xfs_dir2_leafn_rebalance()
892 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_leafn_remove()
900 db = XFS_DIR2_DATAPTR_TO_DB(mp, INT_GET(lep->address, ARCH_CONVERT)); in xfs_dir2_leafn_remove()
902 off = XFS_DIR2_DATAPTR_TO_OFF(mp, INT_GET(lep->address, ARCH_CONVERT)); in xfs_dir2_leafn_remove()
908 INT_MOD(leaf->hdr.stale, ARCH_CONVERT, +1); in xfs_dir2_leafn_remove()
910 INT_SET(lep->address, ARCH_CONVERT, XFS_DIR2_NULL_DATAPTR); in xfs_dir2_leafn_remove()
919 longest = INT_GET(data->hdr.bestfree[0].length, ARCH_CONVERT); in xfs_dir2_leafn_remove()
936 if (longest < INT_GET(data->hdr.bestfree[0].length, ARCH_CONVERT)) { in xfs_dir2_leafn_remove()
954 ASSERT(INT_GET(free->hdr.magic, ARCH_CONVERT) == XFS_DIR2_FREE_MAGIC); in xfs_dir2_leafn_remove()
955 ASSERT(INT_GET(free->hdr.firstdb, ARCH_CONVERT) == in xfs_dir2_leafn_remove()
962 longest = INT_GET(data->hdr.bestfree[0].length, ARCH_CONVERT); in xfs_dir2_leafn_remove()
994 INT_MOD(free->hdr.nused, ARCH_CONVERT, -1); in xfs_dir2_leafn_remove()
1002 if (findex == INT_GET(free->hdr.nvalid, ARCH_CONVERT) - 1) { in xfs_dir2_leafn_remove()
1006 i >= 0 && INT_GET(free->bests[i], ARCH_CONVERT) == NULLDATAOFF; in xfs_dir2_leafn_remove()
1009 INT_SET(free->hdr.nvalid, ARCH_CONVERT, i + 1); in xfs_dir2_leafn_remove()
1016 INT_SET(free->bests[findex], ARCH_CONVERT, NULLDATAOFF); in xfs_dir2_leafn_remove()
1023 if (INT_ISZERO(free->hdr.nused, ARCH_CONVERT)) { in xfs_dir2_leafn_remove()
1042 INT_SET(free->bests[findex], ARCH_CONVERT, longest); in xfs_dir2_leafn_remove()
1064 (INT_GET(leaf->hdr.count, ARCH_CONVERT) - INT_GET(leaf->hdr.stale, ARCH_CONVERT))) < in xfs_dir2_leafn_remove()
1163 ASSERT(INT_GET(info->magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_leafn_toosmall()
1165 count = INT_GET(leaf->hdr.count, ARCH_CONVERT) - INT_GET(leaf->hdr.stale, ARCH_CONVERT); in xfs_dir2_leafn_toosmall()
1185 forward = !INT_ISZERO(info->forw, ARCH_CONVERT); in xfs_dir2_leafn_toosmall()
1201 forward = INT_GET(info->forw, ARCH_CONVERT) < INT_GET(info->back, ARCH_CONVERT); in xfs_dir2_leafn_toosmall()
1203 blkno = forward ?INT_GET( info->forw, ARCH_CONVERT) : INT_GET(info->back, ARCH_CONVERT); in xfs_dir2_leafn_toosmall()
1219 count = INT_GET(leaf->hdr.count, ARCH_CONVERT) - INT_GET(leaf->hdr.stale, ARCH_CONVERT); in xfs_dir2_leafn_toosmall()
1222 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_leafn_toosmall()
1223 count += INT_GET(leaf->hdr.count, ARCH_CONVERT) - INT_GET(leaf->hdr.stale, ARCH_CONVERT); in xfs_dir2_leafn_toosmall()
1281 ASSERT(INT_GET(drop_leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_leafn_unbalance()
1282 ASSERT(INT_GET(save_leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_leafn_unbalance()
1287 if (INT_GET(drop_leaf->hdr.stale, ARCH_CONVERT)) in xfs_dir2_leafn_unbalance()
1289 if (INT_GET(save_leaf->hdr.stale, ARCH_CONVERT)) in xfs_dir2_leafn_unbalance()
1294 … = INT_GET(drop_leaf->ents[INT_GET(drop_leaf->hdr.count, ARCH_CONVERT) - 1].hashval, ARCH_CONVERT); in xfs_dir2_leafn_unbalance()
1297 INT_GET(drop_leaf->hdr.count, ARCH_CONVERT)); in xfs_dir2_leafn_unbalance()
1300 INT_GET(save_leaf->hdr.count, ARCH_CONVERT), INT_GET(drop_leaf->hdr.count, ARCH_CONVERT)); in xfs_dir2_leafn_unbalance()
1301 … = INT_GET(save_leaf->ents[INT_GET(save_leaf->hdr.count, ARCH_CONVERT) - 1].hashval, ARCH_CONVERT); in xfs_dir2_leafn_unbalance()
1422 ASSERT(INT_GET(free->hdr.magic, ARCH_CONVERT) == XFS_DIR2_FREE_MAGIC); in xfs_dir2_node_addname_int()
1430 ASSERT(findex < INT_GET(free->hdr.nvalid, ARCH_CONVERT)); in xfs_dir2_node_addname_int()
1431 ASSERT(INT_GET(free->bests[findex], ARCH_CONVERT) != NULLDATAOFF); in xfs_dir2_node_addname_int()
1432 ASSERT(INT_GET(free->bests[findex], ARCH_CONVERT) >= length); in xfs_dir2_node_addname_int()
1433 dbno = INT_GET(free->hdr.firstdb, ARCH_CONVERT) + findex; in xfs_dir2_node_addname_int()
1506 ASSERT(INT_GET(free->hdr.magic, ARCH_CONVERT) == XFS_DIR2_FREE_MAGIC); in xfs_dir2_node_addname_int()
1512 if (INT_GET(free->bests[findex], ARCH_CONVERT) != NULLDATAOFF && in xfs_dir2_node_addname_int()
1513 INT_GET(free->bests[findex], ARCH_CONVERT) >= length) in xfs_dir2_node_addname_int()
1514 dbno = INT_GET(free->hdr.firstdb, ARCH_CONVERT) + findex; in xfs_dir2_node_addname_int()
1519 if (++findex == INT_GET(free->hdr.nvalid, ARCH_CONVERT)) { in xfs_dir2_node_addname_int()
1633 INT_SET(free->hdr.magic, ARCH_CONVERT, XFS_DIR2_FREE_MAGIC); in xfs_dir2_node_addname_int()
1634 INT_SET(free->hdr.firstdb, ARCH_CONVERT, in xfs_dir2_node_addname_int()
1637 INT_ZERO(free->hdr.nvalid, ARCH_CONVERT); in xfs_dir2_node_addname_int()
1638 INT_ZERO(free->hdr.nused, ARCH_CONVERT); in xfs_dir2_node_addname_int()
1641 ASSERT(INT_GET(free->hdr.magic, ARCH_CONVERT) == XFS_DIR2_FREE_MAGIC); in xfs_dir2_node_addname_int()
1652 if (findex >= INT_GET(free->hdr.nvalid, ARCH_CONVERT)) { in xfs_dir2_node_addname_int()
1654 INT_SET(free->hdr.nvalid, ARCH_CONVERT, findex + 1); in xfs_dir2_node_addname_int()
1658 INT_SET(free->bests[findex], ARCH_CONVERT, NULLDATAOFF); in xfs_dir2_node_addname_int()
1664 if (INT_GET(free->bests[findex], ARCH_CONVERT) == NULLDATAOFF) { in xfs_dir2_node_addname_int()
1665 INT_MOD(free->hdr.nused, ARCH_CONVERT, +1); in xfs_dir2_node_addname_int()
1674 INT_COPY(free->bests[findex], data->hdr.bestfree[0].length, ARCH_CONVERT); in xfs_dir2_node_addname_int()
1702 ASSERT(INT_GET(data->hdr.bestfree[0].length, ARCH_CONVERT) >= length); in xfs_dir2_node_addname_int()
1707 ((char *)data + INT_GET(data->hdr.bestfree[0].offset, ARCH_CONVERT)); in xfs_dir2_node_addname_int()
1719 INT_SET(dep->inumber, ARCH_CONVERT, args->inumber); in xfs_dir2_node_addname_int()
1723 INT_SET(*tagp, ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)dep - (char *)data)); in xfs_dir2_node_addname_int()
1738 …if (INT_GET(free->bests[findex], ARCH_CONVERT) != INT_GET(data->hdr.bestfree[0].length, ARCH_CONVE… in xfs_dir2_node_addname_int()
1739 INT_COPY(free->bests[findex], data->hdr.bestfree[0].length, ARCH_CONVERT); in xfs_dir2_node_addname_int()
1756 args->index = INT_GET(*tagp, ARCH_CONVERT); in xfs_dir2_node_addname_int()
1925 ASSERT(INT_GET(data->hdr.magic, ARCH_CONVERT) == XFS_DIR2_DATA_MAGIC); in xfs_dir2_node_replace()
1928 XFS_DIR2_DATAPTR_TO_OFF(state->mp, INT_GET(lep->address, ARCH_CONVERT))); in xfs_dir2_node_replace()
1929 ASSERT(inum != INT_GET(dep->inumber, ARCH_CONVERT)); in xfs_dir2_node_replace()
1933 INT_SET(dep->inumber, ARCH_CONVERT, inum); in xfs_dir2_node_replace()
1991 ASSERT(INT_GET(free->hdr.magic, ARCH_CONVERT) == XFS_DIR2_FREE_MAGIC); in xfs_dir2_node_trim_free()
1995 if (INT_GET(free->hdr.nused, ARCH_CONVERT) > 0) { in xfs_dir2_node_trim_free()