_drbd_set_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… _drbd_set_state(9)

okay so bestie, welcome to the Kernel API Manual ✨ β€” yes, the kernel one, we're doing big-girl kernel vibes today πŸŽ€ this page is all about _drbd_set_state, lowercase underscore and all, do not @ me about the underscore, it's part of the name πŸ’€


🌸 NAME 🌸

_drbd_set_state β€” set a new DRBD state πŸ¦‹ like, it literally changes the state, iconic behaviour, no notes


✨ SYNOPSIS ✨

enum drbd_state_rv _drbd_set_state (struct drbd_device *device , union
drbd_state ns , enum chg_state_flags flags , struct completion *done );

look at that signature, it's giving main character energy πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • device β€” the DRBD device πŸ’– that's the thing we're messing with, keep your eyes on it
  • ns β€” the new state 🌈 literally "ns" as in new state, so fresh, so slay
  • flags β€” flags 🚩 yes, flags, the little switches that change how things go down
  • done β€” optional completion, that will get completed after the after_state_ch finished ⭐ like it pings you when the clean-up era is officially over, optional bestie, optional 🫢

πŸ”₯ DESCRIPTION πŸ”₯

Caller needs to hold req_lock πŸ’… no cap, that's a hard requirement β€” hold the lock or don't come to the function.

Do not call directly. πŸ™ˆ seriously, do not call this one directly, it's an internal vibe, go through the proper doors, iykyk

bestie pls respect the lock and the "do not call directly" β€” this is not a suggestion, this is the whole point πŸ˜­πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/block/drbd/drbd_state.c ✨ and all its friends:

go read all of them, be the most informed baddie in the block πŸ‘‘


and that's the whole page, mwah πŸ“ β€” sourced from ./drivers/block/drbd, October 2026, so you know exactly which era of the kernel this info is from πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from