Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb

Bart Van Assche
2017-08-29T22:26:24Z

On Tue, 2017-08-29 at 19:41 +0000, Don Brace wrote:
> BLKRRPART ends up in the sd driver function sd_revalidate_disk, which resets
> q->limits.max_sectors = min(rw_max, queue_max_hw_sectors(q));
> back to the value from VPD page 0xb0.
>
> When you cat out max_sectors_kb, it obtains it's valuse from q->limits.max_sectors
>
> Adding a udev rule... Will there be a delay between the watch rule and the new rule?

Hello Don,

In your original e-mail you wrote that max_sectors_kb was tuned because
of performance reasons. So does it really matter that for a very short
time max_sectors_kb does not have the optimal value?

> One more point, what will I change the value back to? The watch rule
> changed it and I do not have the original value.

To the value you want to set max_sectors_kb to.

Bart.