Re: [PATCH 4/6] xfs: create quota preallocation watermarks for realtime quota

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 10, 2024 at 06:13:07PM -0700, Darrick J. Wong wrote:
> +	pre->q_prealloc_hi_wmark = res->hardlimit;
> +	pre->q_prealloc_lo_wmark = res->softlimit;
> +	if (!pre->q_prealloc_lo_wmark) {
> +		pre->q_prealloc_lo_wmark = pre->q_prealloc_hi_wmark;
> +		do_div(pre->q_prealloc_lo_wmark, 100);
> +		pre->q_prealloc_lo_wmark *= 95;
> +	}
> +
> +	space = pre->q_prealloc_hi_wmark;
> +
> +	do_div(space, 100);

Maybe use div_u64 instead of the fugly do_div helper?

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux