bch_next_delay(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… bch_next_delay πŸ’…

ok so bestie, this is a page from the Kernel API Manual β€” section 9 β€” and it's literally all about bch_next_delay, which is your little rate-limiting bestie in the kernel. it updates the ratelimiting stats and then tells you how long to chill before doing more work. slay. ✨


🌸 NAME 🌸

bch_next_delay β€” update ratelimiting statistics and calculate next delay πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

uint64_t bch_next_delay (struct bch_ratelimit *d , uint64_t done );

like, yes, that's the whole signature. she's little but she's doing the most. πŸ’–


⭐ ARGUMENTS ⭐

  • d β€” the struct bch_ratelimit to update. this is the main character of the whole function ngl πŸ‘‘
  • done β€” the amount of work done, in arbitrary units. yes, arbitrary β€” the units are whatever you and your code decided they are, no cap πŸ™ˆ

πŸ”₯ DESCRIPTION πŸ”₯

Okay so here's the tea: bch_next_delay increments d by the amount of work done β€” that's your done value β€” and then returns how long to delay in jiffies until the next time to do some work. ⏳

That's it. That's the whole vibe. It's giving "accounting + scheduling bestie" energy. Lowkey iconic. πŸ’…


🫢 SEE ALSO 🫢

go read those too, iykyk πŸ“šβœ¨


and that's the whole page, bestie!! πŸŒˆπŸ’œ this one came from ./drivers/md/bcache, dated October 2026 β€” mwah, go forth and rate-limit responsibly πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from