inode_switch_wbs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… inode_switch_wbs(9) β€” the Kernel API Manual, but make it make sense

okay so bestie, this one lives in the Kernel API Manual and it's genuinely so simple, which is exactly why people get it twisted. it's a void function, so like... you get nothing back. no receipt, no tracking number, nothing. and yes, it can just quietly not work. we'll get to that. 🫢


✨ NAME ✨

inode_switch_wbs β€” change the wb association of an inode

like, an inode is in one situationship with a wb, and this function is the friend who's like "girl, let me introduce you to someone else." 😭


🌸 SYNOPSIS 🌸

void inode_switch_wbs (struct inode *inode , int new_wb_id );

two arguments, returns nothing. periodt.


πŸŽ€ ARGUMENTS πŸŽ€

  • inode β€” the target inode. this is the one getting set up on the blind date. it's a struct inode *, so, yk, a pointer, be normal about it. πŸ’–
  • new_wb_id β€” the ID of the new wb. this is the plus-one. it's an int, it's an ID, and it's who inode is being matched with. ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the whole vibe: this function switches the inode's wb association over to the wb identified by new_wb_id. that's it. that's the tea. πŸ“

but β€” and this is the part you cannot skip, bestie β€” the switching is performed asynchronously and may fail silently. πŸ’€

let me say it again for the people in the back:

the switch doesn't happen right now, right here, in front of you. it gets queued up and happens later. and if it goes wrong? nobody tells you. no error code, no return value (it's void, remember), no little notification sound. it just... doesn't. 😭

so don't be out here assuming that because you called it, the association is already updated by the time the next line of your code runs. it's giving "left on read" energy, and honestly? iconic of it. πŸ‘‘


🌈 SEE ALSO 🌈

the kernel file for this one is ./fs/fs-writeback.c β€” go read it if you want the full lore, iykyk. πŸ“–

and here's the whole friend group, all of them section (9), all of them worth knowing:

not a single one of them skipped, bestie. we list all of them. no cap. πŸ’…


and that's the page!! 🧚 source is ./fs, dated October 2026 β€” so like, yeah, recent. mwah, go forth and switch those wb associations (asynchronously, and possibly silently failing, but with confidence) πŸ’œπŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from