DRBD STATE MACROS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to the DRBD State macros page from the Kernel API Manual β€” yes, that (9) means kernel API section, iykyk πŸ’…

πŸ’– DRBD State macros πŸ’–

these macros are literally here to express state changes in easily readable form. no cap.

the NS macros expand to a mask and a value that you can bit ored onto the current state as soon as the spinlock (req_lock) was taken. periodt.

the _NS macros are used for state functions that get called with the spinlock. these macros expand directly to the new state value.

besides the basic forms NS and _NS, additional _?NS[23] are defined to express state changes that affect more than one aspect of the state. iconic.

e.g. NS2(conn, C_CONNECTED, peer, R_SECONDARY) means that the network connection was established and that the peer is in secondary role. slay.


🌈 SEE ALSO 🌈


that's the whole vibe, bestie! source/version: ./drivers/block/drbd β€” date: October 2026 β€” page: DRBD State macros(9). stay obsessed and keep those state changes cute πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from