drbd_md_mark_dirty(9)
π 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:
tl_release(9)_tl_restart(9)tl_clear(9)tl_abort_disk_io(9)drbd_thread_current_set_cpu(9)drbd_send_current_state(9)drbd_send_state(9)_drbd_send_ack(9)drbd_send_ack(9)drbd_md_sync(9)drbd_md_read(9)drbd_uuid_new_current(9)drbd_bmio_set_n_write(9)drbd_bmio_clear_n_write(9)drbd_queue_bitmap_io(9)drbd_bitmap_io(9)drbd_wait_misc(9)
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
- 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