_drbd_set_state(9)
π _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 itnsβ the new state π literally "ns" as in new state, so fresh, so slayflagsβ flags π© yes, flags, the little switches that change how things go downdoneβ optional completion, that will get completed after theafter_state_chfinished β 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:
cl_wide_st_chg(9)drbd_force_state(9)drbd_req_state(9)_drbd_request_state(9)is_valid_state(9)is_valid_soft_transition(9)is_valid_transition(9)sanitize_state(9)after_state_ch(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms