On Mon, Sep 14, 2026 at 1:10 PM Breno Leitao <[email protected]> wrote: > > The per-target token bucket has no interface, so every target is still > unlimited. > > Expose the interval as ratelimit_interval_ms through configfs. It > defaults to zero, so a target stays unlimited until an administrator > sets one. > > The write restarts the interval instead of only publishing the new > value. A target is configured while it floods, by which point the > bucket is empty, and ___ratelimit() only refills it once the interval > it was set with has elapsed. > > Reject more than INT_MAX milliseconds. msecs_to_jiffies() saturates at > MAX_JIFFY_OFFSET, which is below INT_MAX on 32-bit, so checking only > the jiffies value would take a write there that a 64-bit kernel turns > down. > > Signed-off-by: Breno Leitao <[email protected]>
Reviewed-by: Gustavo Luiz Duarte <[email protected]>

