drbd_md_mark_dirty(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– drbd_md_mark_dirty(9) β€” the kernel API manual, bestie edition πŸŽ€

okay so you're poking at the DRBD kernel API and you found drbd_md_mark_dirty(9)? slay, welcome, come sit with me. this is the page from the Kernel API Manual and I'm gonna walk you through it like we're in the group chat at 2am. no cap, it's short but it's important. πŸ’…


✨ NAME ✨

drbd_md_mark_dirty β€” mark the meta data super block as dirty 🫢

like, you're telling the kernel "hey bestie, this super block is NOT clean anymore, don't forget." iconic behaviour.


🌸 SYNOPSIS 🌸

void drbd_md_mark_dirty (struct drbd_device *device );

returns void, so nothing comes back out. it just does the thing. no receipts, no return value, just vibes and consequences. 😌


πŸŽ€ ARGUMENTS πŸŽ€

  • device β€” the DRBD device. literally the one you're working with. that's it, that's the whole argument list. one (1) parameter. she's lowkey minimal and I respect it.

πŸ¦‹ DESCRIPTION πŸ¦‹

okay here's the tea, and it matters:

call this function if you change anything that should be written to the meta-data super block. anything. do not skip it. do not think "eh it's probably fine." it is not fine. 😭

what it does is super simple but lowkey crucial:

  • it sets MD_DIRTY ✨
  • and it starts a timer that ensures that within five seconds you have to call drbd_md_sync.
five seconds, bestie. that's the window. the timer is running and it wants drbd_md_sync and it wants it soon. don't leave it hanging. πŸ’€

so the whole flow is: you change something meta-data-super-block-worthy β†’ you call drbd_md_mark_dirty β†’ MD_DIRTY gets set β†’ the clock starts ticking β†’ you call drbd_md_sync before the five seconds are up. that's the assignment. main character energy only. πŸ‘‘


πŸ’œ SEE ALSO πŸ’œ

kernel file ./drivers/block/drbd/drbd_main.c, plus this whole friend group right here:

not me listing seventeen (17) see-also entries and enjoying every single one πŸ“ drbd_md_sync(9) is literally your next stop after this page, iykyk.


anyway that's the whole page, hope you ate it up 🌈 this was ./drivers/block/drbd, October 2026 edition, and you just read it in drbd_md_mark_dirty(9) form β€” go forth and mark those super blocks dirty, bestie, and don't forget the timer πŸ”₯ mwah πŸ’‹

πŸ“¦ where this page comes from