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

Christoph Hellwig
2024-10-14T08:28:13Z

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@lst.de>