Lines Matching refs:ARCH_CONVERT
125 if (unlikely(INT_GET(block->hdr.magic, ARCH_CONVERT) in xfs_dir2_block_addname()
138 blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); in xfs_dir2_block_addname()
142 if (INT_ISZERO(btp->stale, ARCH_CONVERT)) { in xfs_dir2_block_addname()
150 enddup = (xfs_dir2_data_unused_t *)((char *)block + INT_GET(*tagp, ARCH_CONVERT)); in xfs_dir2_block_addname()
156 if (INT_GET(enddup->freetag, ARCH_CONVERT) != XFS_DIR2_DATA_FREE_TAG) in xfs_dir2_block_addname()
163 ((char *)block + INT_GET(bf[0].offset, ARCH_CONVERT)); in xfs_dir2_block_addname()
169 if (INT_GET(dup->length, ARCH_CONVERT) < len + (uint)sizeof(*blp)) { in xfs_dir2_block_addname()
174 if (INT_GET(bf[1].length, ARCH_CONVERT) >= len) in xfs_dir2_block_addname()
177 INT_GET(bf[1].offset, ARCH_CONVERT)); in xfs_dir2_block_addname()
186 if (INT_GET(dup->length, ARCH_CONVERT) < len) { in xfs_dir2_block_addname()
197 else if (INT_GET(bf[0].length, ARCH_CONVERT) >= len) { in xfs_dir2_block_addname()
199 ((char *)block + INT_GET(bf[0].offset, ARCH_CONVERT)); in xfs_dir2_block_addname()
213 dup = (xfs_dir2_data_unused_t *)((char *)block + INT_GET(*tagp, ARCH_CONVERT)); in xfs_dir2_block_addname()
218 if (INT_GET(dup->freetag, ARCH_CONVERT) == XFS_DIR2_DATA_FREE_TAG) { in xfs_dir2_block_addname()
219 if (INT_GET(dup->length, ARCH_CONVERT) + (INT_GET(btp->stale, ARCH_CONVERT) - 1) * in xfs_dir2_block_addname()
222 } else if ((INT_GET(btp->stale, ARCH_CONVERT) - 1) * (uint)sizeof(*blp) < len) in xfs_dir2_block_addname()
268 for (fromidx = toidx = INT_GET(btp->count, ARCH_CONVERT) - 1, in xfs_dir2_block_addname()
272 if (INT_GET(blp[fromidx].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR) { in xfs_dir2_block_addname()
285 lfloglow = toidx + 1 - (INT_GET(btp->stale, ARCH_CONVERT) - 1); in xfs_dir2_block_addname()
286 lfloghigh -= INT_GET(btp->stale, ARCH_CONVERT) - 1; in xfs_dir2_block_addname()
287 INT_MOD(btp->count, ARCH_CONVERT, -(INT_GET(btp->stale, ARCH_CONVERT) - 1)); in xfs_dir2_block_addname()
290 (xfs_dir2_data_aoff_t)((INT_GET(btp->stale, ARCH_CONVERT) - 1) * sizeof(*blp)), in xfs_dir2_block_addname()
292 blp += INT_GET(btp->stale, ARCH_CONVERT) - 1; in xfs_dir2_block_addname()
293 INT_SET(btp->stale, ARCH_CONVERT, 1); in xfs_dir2_block_addname()
308 else if (INT_GET(btp->stale, ARCH_CONVERT)) { in xfs_dir2_block_addname()
309 lfloglow = INT_GET(btp->count, ARCH_CONVERT); in xfs_dir2_block_addname()
315 for (low = 0, high = INT_GET(btp->count, ARCH_CONVERT) - 1; low <= high; ) { in xfs_dir2_block_addname()
317 if ((hash = INT_GET(blp[mid].hashval, ARCH_CONVERT)) == args->hashval) in xfs_dir2_block_addname()
324 while (mid >= 0 && INT_GET(blp[mid].hashval, ARCH_CONVERT) >= args->hashval) { in xfs_dir2_block_addname()
330 if (INT_ISZERO(btp->stale, ARCH_CONVERT)) { in xfs_dir2_block_addname()
336 ((char *)enddup - (char *)block + INT_GET(enddup->length, ARCH_CONVERT) - in xfs_dir2_block_addname()
343 INT_MOD(btp->count, ARCH_CONVERT, +1); in xfs_dir2_block_addname()
371 INT_GET(blp[lowstale].address, ARCH_CONVERT) != XFS_DIR2_NULL_DATAPTR; in xfs_dir2_block_addname()
375 highstale < INT_GET(btp->count, ARCH_CONVERT) && in xfs_dir2_block_addname()
376 INT_GET(blp[highstale].address, ARCH_CONVERT) != XFS_DIR2_NULL_DATAPTR && in xfs_dir2_block_addname()
384 (highstale == INT_GET(btp->count, ARCH_CONVERT) || in xfs_dir2_block_addname()
396 ASSERT(highstale < INT_GET(btp->count, ARCH_CONVERT)); in xfs_dir2_block_addname()
404 INT_MOD(btp->stale, ARCH_CONVERT, -1); in xfs_dir2_block_addname()
413 INT_SET(blp[mid].hashval, ARCH_CONVERT, args->hashval); in xfs_dir2_block_addname()
414 INT_SET(blp[mid].address, ARCH_CONVERT, XFS_DIR2_BYTE_TO_DATAPTR(mp, (char *)dep - (char *)block)); in xfs_dir2_block_addname()
425 INT_SET(dep->inumber, ARCH_CONVERT, args->inumber); in xfs_dir2_block_addname()
429 INT_SET(*tagp, ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)dep - (char *)block)); in xfs_dir2_block_addname()
497 endptr = (char *)XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); in xfs_dir2_block_getdents()
510 if (INT_GET(dup->freetag, ARCH_CONVERT) == XFS_DIR2_DATA_FREE_TAG) { in xfs_dir2_block_getdents()
511 ptr += INT_GET(dup->length, ARCH_CONVERT); in xfs_dir2_block_getdents()
533 p.ino = INT_GET(dep->inumber, ARCH_CONVERT); in xfs_dir2_block_getdents()
588 blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); in xfs_dir2_block_log_leaf()
642 blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); in xfs_dir2_block_lookup()
647 ((char *)block + XFS_DIR2_DATAPTR_TO_OFF(mp, INT_GET(blp[ent].address, ARCH_CONVERT))); in xfs_dir2_block_lookup()
651 args->inumber = INT_GET(dep->inumber, ARCH_CONVERT); in xfs_dir2_block_lookup()
694 blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); in xfs_dir2_block_lookup_int()
699 for (low = 0, high = INT_GET(btp->count, ARCH_CONVERT) - 1; ; ) { in xfs_dir2_block_lookup_int()
702 if ((hash = INT_GET(blp[mid].hashval, ARCH_CONVERT)) == args->hashval) in xfs_dir2_block_lookup_int()
717 while (mid > 0 && INT_GET(blp[mid - 1].hashval, ARCH_CONVERT) == args->hashval) { in xfs_dir2_block_lookup_int()
725 if ((addr = INT_GET(blp[mid].address, ARCH_CONVERT)) == XFS_DIR2_NULL_DATAPTR) in xfs_dir2_block_lookup_int()
742 …} while (++mid < INT_GET(btp->count, ARCH_CONVERT) && INT_GET(blp[mid].hashval, ARCH_CONVERT) == h… in xfs_dir2_block_lookup_int()
787 blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); in xfs_dir2_block_removename()
792 ((char *)block + XFS_DIR2_DATAPTR_TO_OFF(mp, INT_GET(blp[ent].address, ARCH_CONVERT))); in xfs_dir2_block_removename()
803 INT_MOD(btp->stale, ARCH_CONVERT, +1); in xfs_dir2_block_removename()
808 INT_SET(blp[ent].address, ARCH_CONVERT, XFS_DIR2_NULL_DATAPTR); in xfs_dir2_block_removename()
863 blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); in xfs_dir2_block_replace()
868 ((char *)block + XFS_DIR2_DATAPTR_TO_OFF(mp, INT_GET(blp[ent].address, ARCH_CONVERT))); in xfs_dir2_block_replace()
869 ASSERT(INT_GET(dep->inumber, ARCH_CONVERT) != args->inumber); in xfs_dir2_block_replace()
873 INT_SET(dep->inumber, ARCH_CONVERT, args->inumber); in xfs_dir2_block_replace()
893 return INT_GET(la->hashval, ARCH_CONVERT) < INT_GET(lb->hashval, ARCH_CONVERT) ? -1 : in xfs_dir2_block_sort()
894 (INT_GET(la->hashval, ARCH_CONVERT) > INT_GET(lb->hashval, ARCH_CONVERT) ? 1 : 0); in xfs_dir2_block_sort()
930 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAF1_MAGIC); in xfs_dir2_leaf_to_block()
939 bestsp = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT); in xfs_dir2_leaf_to_block()
940 if (INT_GET(bestsp[INT_GET(ltp->bestcount, ARCH_CONVERT) - 1], ARCH_CONVERT) == in xfs_dir2_leaf_to_block()
944 (xfs_dir2_db_t)(INT_GET(ltp->bestcount, ARCH_CONVERT) - 1)))) in xfs_dir2_leaf_to_block()
960 ASSERT(INT_GET(block->hdr.magic, ARCH_CONVERT) == XFS_DIR2_DATA_MAGIC); in xfs_dir2_leaf_to_block()
965 …(uint)sizeof(*lep) * (INT_GET(leaf->hdr.count, ARCH_CONVERT) - INT_GET(leaf->hdr.stale, ARCH_CONVE… in xfs_dir2_leaf_to_block()
970 dup = (xfs_dir2_data_unused_t *)((char *)block + INT_GET(*tagp, ARCH_CONVERT)); in xfs_dir2_leaf_to_block()
974 …if (INT_GET(dup->freetag, ARCH_CONVERT) != XFS_DIR2_DATA_FREE_TAG || INT_GET(dup->length, ARCH_CON… in xfs_dir2_leaf_to_block()
981 INT_SET(block->hdr.magic, ARCH_CONVERT, XFS_DIR2_BLOCK_MAGIC); in xfs_dir2_leaf_to_block()
993 …INT_SET(btp->count, ARCH_CONVERT, INT_GET(leaf->hdr.count, ARCH_CONVERT) - INT_GET(leaf->hdr.stale… in xfs_dir2_leaf_to_block()
994 INT_ZERO(btp->stale, ARCH_CONVERT); in xfs_dir2_leaf_to_block()
999 lep = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); in xfs_dir2_leaf_to_block()
1000 for (from = to = 0; from < INT_GET(leaf->hdr.count, ARCH_CONVERT); from++) { in xfs_dir2_leaf_to_block()
1001 if (INT_GET(leaf->ents[from].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR) in xfs_dir2_leaf_to_block()
1005 ASSERT(to == INT_GET(btp->count, ARCH_CONVERT)); in xfs_dir2_leaf_to_block()
1006 xfs_dir2_block_log_leaf(tp, dbp, 0, INT_GET(btp->count, ARCH_CONVERT) - 1); in xfs_dir2_leaf_to_block()
1120 INT_SET(block->hdr.magic, ARCH_CONVERT, XFS_DIR2_BLOCK_MAGIC); in xfs_dir2_sf_to_block()
1125 (INT_GET(sfp->hdr.count, ARCH_CONVERT) + 2) * (uint)sizeof(xfs_dir2_leaf_entry_t); in xfs_dir2_sf_to_block()
1139 INT_SET(btp->count, ARCH_CONVERT, INT_GET(sfp->hdr.count, ARCH_CONVERT) + 2); /* ., .. */ in xfs_dir2_sf_to_block()
1140 INT_ZERO(btp->stale, ARCH_CONVERT); in xfs_dir2_sf_to_block()
1141 blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); in xfs_dir2_sf_to_block()
1148 INT_GET(dup->length, ARCH_CONVERT), &needlog, &needscan); in xfs_dir2_sf_to_block()
1154 INT_SET(dep->inumber, ARCH_CONVERT, dp->i_ino); in xfs_dir2_sf_to_block()
1158 INT_SET(*tagp, ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)dep - (char *)block)); in xfs_dir2_sf_to_block()
1160 INT_SET(blp[0].hashval, ARCH_CONVERT, xfs_dir_hash_dot); in xfs_dir2_sf_to_block()
1161 INT_SET(blp[0].address, ARCH_CONVERT, XFS_DIR2_BYTE_TO_DATAPTR(mp, (char *)dep - (char *)block)); in xfs_dir2_sf_to_block()
1167 …INT_SET(dep->inumber, ARCH_CONVERT, XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, &sfp->hdr.parent, ARCH_CONVE… in xfs_dir2_sf_to_block()
1171 INT_SET(*tagp, ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)dep - (char *)block)); in xfs_dir2_sf_to_block()
1173 INT_SET(blp[1].hashval, ARCH_CONVERT, xfs_dir_hash_dotdot); in xfs_dir2_sf_to_block()
1174 INT_SET(blp[1].address, ARCH_CONVERT, XFS_DIR2_BYTE_TO_DATAPTR(mp, (char *)dep - (char *)block)); in xfs_dir2_sf_to_block()
1179 if ((i = 0) == INT_GET(sfp->hdr.count, ARCH_CONVERT)) in xfs_dir2_sf_to_block()
1194 newoffset = XFS_DIR2_SF_GET_OFFSET_ARCH(sfep, ARCH_CONVERT); in xfs_dir2_sf_to_block()
1201 INT_SET(dup->freetag, ARCH_CONVERT, XFS_DIR2_DATA_FREE_TAG); in xfs_dir2_sf_to_block()
1202 INT_SET(dup->length, ARCH_CONVERT, newoffset - offset); in xfs_dir2_sf_to_block()
1203 INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(dup, ARCH_CONVERT), ARCH_CONVERT, in xfs_dir2_sf_to_block()
1209 offset += INT_GET(dup->length, ARCH_CONVERT); in xfs_dir2_sf_to_block()
1216 INT_SET(dep->inumber, ARCH_CONVERT, XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, in xfs_dir2_sf_to_block()
1217 XFS_DIR2_SF_INUMBERP(sfep), ARCH_CONVERT)); in xfs_dir2_sf_to_block()
1221 INT_SET(*tagp, ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)dep - (char *)block)); in xfs_dir2_sf_to_block()
1223 INT_SET(blp[2 + i].hashval, ARCH_CONVERT, xfs_da_hashname((char *)sfep->name, sfep->namelen)); in xfs_dir2_sf_to_block()
1224 INT_SET(blp[2 + i].address, ARCH_CONVERT, XFS_DIR2_BYTE_TO_DATAPTR(mp, in xfs_dir2_sf_to_block()
1227 if (++i == INT_GET(sfp->hdr.count, ARCH_CONVERT)) in xfs_dir2_sf_to_block()
1237 qsort(blp, INT_GET(btp->count, ARCH_CONVERT), sizeof(*blp), xfs_dir2_block_sort); in xfs_dir2_sf_to_block()
1243 xfs_dir2_block_log_leaf(tp, bp, 0, INT_GET(btp->count, ARCH_CONVERT) - 1); in xfs_dir2_sf_to_block()