Lines Matching refs:alloc_unit
339 unsigned int alloc_unit) in xfs_exchange_range_checks() argument
345 uint64_t allocmask = alloc_unit - 1; in xfs_exchange_range_checks()
382 if (!IS_ALIGNED(fxr->file1_offset, alloc_unit) || in xfs_exchange_range_checks()
383 !IS_ALIGNED(fxr->file2_offset, alloc_unit)) in xfs_exchange_range_checks()
417 blen = ALIGN(size1, alloc_unit) - fxr->file1_offset; in xfs_exchange_range_checks()
419 blen = ALIGN(size2, alloc_unit) - fxr->file2_offset; in xfs_exchange_range_checks()
420 else if (!IS_ALIGNED(fxr->length, alloc_unit)) in xfs_exchange_range_checks()
456 unsigned int alloc_unit) in xfs_exchange_range_prep() argument
464 error = xfs_exchange_range_checks(fxr, alloc_unit); in xfs_exchange_range_prep()
526 unsigned int alloc_unit) in xfs_exchrange_check_rtalign() argument
536 if (!isaligned_64(fxr->file1_offset, alloc_unit) || in xfs_exchrange_check_rtalign()
537 !isaligned_64(fxr->file2_offset, alloc_unit)) in xfs_exchrange_check_rtalign()
554 blen = roundup_64(size1, alloc_unit) - fxr->file1_offset; in xfs_exchrange_check_rtalign()
556 blen = roundup_64(size2, alloc_unit) - fxr->file2_offset; in xfs_exchrange_check_rtalign()
557 else if (!isaligned_64(length, alloc_unit)) in xfs_exchrange_check_rtalign()
572 if (isaligned_64(length, alloc_unit)) in xfs_exchrange_check_rtalign()
577 blen = rounddown_64(blen, alloc_unit); in xfs_exchrange_check_rtalign()
580 blen = rounddown_64(blen, alloc_unit); in xfs_exchrange_check_rtalign()
593 unsigned int alloc_unit = xfs_inode_alloc_unitsize(ip2); in xfs_exchrange_prep() local
603 if (!is_power_of_2(alloc_unit)) { in xfs_exchrange_prep()
604 error = xfs_exchrange_check_rtalign(fxr, ip1, ip2, alloc_unit); in xfs_exchrange_prep()
612 alloc_unit = mp->m_sb.sb_blocksize; in xfs_exchrange_prep()
615 error = xfs_exchange_range_prep(fxr, alloc_unit); in xfs_exchrange_prep()