wb_wait_for_completion(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– wb_wait_for_completion(9) πŸ’–

okay so this is a page from the Kernel API Manual β€” the wb_wait_for_completion(9) girlies, this one's for you 🫢


✨ NAME ✨

wb_wait_for_completion β€” literally just sit there and wait for your bdi_writeback_works to be done πŸ’…


🌸 SYNOPSIS 🌸

void wb_wait_for_completion (struct wb_completion *done );

πŸŽ€ ARGUMENTS πŸŽ€

  • _done_ β€” the target wb_completion, bestie. that's the one you're waiting on πŸ¦‹

πŸ’œ DESCRIPTION πŸ’œ

okay so picture this: you've got one or more work items that were issued to bdi, and each of them has its ->done field set to done. this function waits for those. all of them. every single one 😭

and like β€” done should have been initialized with DEFINE_WB_COMPLETION beforehand, no cap. that's non-negotiable, it's giving "read the directions before you start."

the function returns after all such work items are completed. slay. but here's the thing πŸ‘‘ β€” work items which are waited upon aren't freed automatically on completion. so like, don't just assume they clean themselves up, because they do not, and that's on periodt.


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./fs/fs-writeback.c


and that's the whole page, bestie πŸ’– this one came out of ./fs, dated October 2026, and it's filed under wb_wait_for_completion(9) β€” go off, kernel docs 🌈✨🧚

πŸ“¦ where this page comes from