bdi_split_work_to_wbs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… bdi_split_work_to_wbs(9) πŸ’…

okay so bestie, this is a page from the Kernel API Manual, and it's literally about bdi_split_work_to_wbs β€” splitting a wb_writeback_work to all wb's of a bdi. yes that's a lot of letters, we'll get through it together 🫢


✨ NAME ✨

bdi_split_work_to_wbs β€” split a wb_writeback_work to all wb's of a bdi

like, the whole job of this function in one line. she's giving one-sentence-queen πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

void bdi_split_work_to_wbs (struct backing_dev_info *bdi , struct
wb_writeback_work *base_work , bool skip_if_busy );

that's it, that's the whole signature. void return, so she does the work and doesn't report back β€” main character energy, no receipts needed 😌


πŸŽ€ ARGUMENTS πŸŽ€

  • bdi β€” the target backing_dev_info. this is the thing whose wb's we're about to visit, like showing up at someone's house and knocking on every single door πŸšͺ✨
  • base_work β€” the wb_writeback_work to issue. this is the actual homework we're distributing, ok?
  • skip_if_busy β€” skip wb's which already have writeback in progress. like, if they're already busy, don't pile on. read the room bestie πŸ™ˆ

🌸 DESCRIPTION 🌸

so what she does is: split and issue base_work to all wb's (bdi_writeback's) of bdi which have dirty inodes. key detail β€” only the ones with dirty inodes, not literally every wb. vibe check first ✨

and then, here's the kinda iconic conditional: if base_work->nr_page isn't LONG_MAX, it's distributed to the busy wbs according to each wb's proportion in the total active write bandwidth of bdi.

read that again. proportion of the total active write bandwidth. she's doing math. she's being fair. she's splitting the pages proportional to bandwidth and honestly? we stan an equitable distribution algorithm πŸ‘‘πŸ“Š

ngl this is the kind of detail that gets skipped when you skim, so like β€” don't skim. nr_page vs LONG_MAX, and the bandwidth-proportional split, both matter πŸ’–

πŸ”₯ SEE ALSO πŸ”₯

okay this list is LONG, so buckle up, grab a snack πŸ“ β€” every single one of these is here because the original says so:

twenty-three friends + one file path. she's connected. iykyk πŸ’œ


🧚 cute lil sign-off 🧚

this absolute baddie of a page lives under the source path ./fs, and the version/date stamp on it is October 2026 β€” so like, mark your calendars, she's from the future bestie πŸ˜­πŸ¦‹

go forth and split your work. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from