Re: [PATCH 2/5] writeback: dirty position control

David Horner
2011-08-17T06:40:22Z

I noticed a significant typo below (another of those thousand eyes,
thanks to Jan Kara's post that started ne looking) :

> +static unsigned long bdi_position_ratio(struct backing_dev_info *bdi,
> + unsigned long thresh,
...
> + * For JBOD case, bdi_thresh (not bdi_dirty!) could fluctuate up to its
> + * own size, so move the slope over accordingly.
> + */
> + if (unlikely(bdi_thresh > thresh))
> + bdi_thresh = thresh;
> + /*
> + * scale global setpoint to bdi's:  setpoint *= bdi_thresh / thresh
> + */
> + x = div_u64((u64)bdi_thresh << 16, thresh | 1);

^
I believe should be

x = div_u64((u64)bdi_thresh << 16, thresh + 1);

David Horner