Lines Matching refs:alloc_blocks

342 	xfs_fsblock_t		alloc_blocks)  in xfs_quota_need_throttle()  argument
354 if (dq->q_blk.reserved + alloc_blocks < dq->q_prealloc_lo_wmark) in xfs_quota_need_throttle()
442 xfs_fsblock_t alloc_blocks = 0; in xfs_iomap_prealloc_size() local
488 alloc_blocks = plen * 2; in xfs_iomap_prealloc_size()
489 if (alloc_blocks > XFS_MAX_BMBT_EXTLEN) in xfs_iomap_prealloc_size()
490 alloc_blocks = XFS_B_TO_FSB(mp, offset); in xfs_iomap_prealloc_size()
491 qblocks = alloc_blocks; in xfs_iomap_prealloc_size()
500 alloc_blocks = XFS_FILEOFF_MIN(roundup_pow_of_two(XFS_MAX_BMBT_EXTLEN), in xfs_iomap_prealloc_size()
501 alloc_blocks); in xfs_iomap_prealloc_size()
515 if (xfs_quota_need_throttle(ip, XFS_DQTYPE_USER, alloc_blocks)) in xfs_iomap_prealloc_size()
518 if (xfs_quota_need_throttle(ip, XFS_DQTYPE_GROUP, alloc_blocks)) in xfs_iomap_prealloc_size()
521 if (xfs_quota_need_throttle(ip, XFS_DQTYPE_PROJ, alloc_blocks)) in xfs_iomap_prealloc_size()
532 alloc_blocks = min(alloc_blocks, qblocks); in xfs_iomap_prealloc_size()
536 alloc_blocks >>= shift; in xfs_iomap_prealloc_size()
541 if (alloc_blocks) in xfs_iomap_prealloc_size()
542 alloc_blocks = rounddown_pow_of_two(alloc_blocks); in xfs_iomap_prealloc_size()
543 if (alloc_blocks > XFS_MAX_BMBT_EXTLEN) in xfs_iomap_prealloc_size()
544 alloc_blocks = XFS_MAX_BMBT_EXTLEN; in xfs_iomap_prealloc_size()
552 while (alloc_blocks && alloc_blocks >= freesp) in xfs_iomap_prealloc_size()
553 alloc_blocks >>= 4; in xfs_iomap_prealloc_size()
554 if (alloc_blocks < mp->m_allocsize_blocks) in xfs_iomap_prealloc_size()
555 alloc_blocks = mp->m_allocsize_blocks; in xfs_iomap_prealloc_size()
556 trace_xfs_iomap_prealloc_size(ip, alloc_blocks, shift, in xfs_iomap_prealloc_size()
558 return alloc_blocks; in xfs_iomap_prealloc_size()