drbd_queue_bitmap_io(9)
π« drbd_queue_bitmap_io(9) π«
okay so bestie, welcome to the drbd_queue_bitmap_io(9) page from the Kernel API Manual β this is the one that queues up an IO operation across the whole bitmap, and honestly? kind of iconic of it. π
β¨ NAME β¨
drbd_queue_bitmap_io β the function that queues an IO operation on the entire bitmap, no cap. π
π¦ SYNOPSIS π¦
void drbd_queue_bitmap_io (struct drbd_device *device , int
(*io_fn)(struct drbd_device *, struct drbd_peer_device *) , void
(*done)(struct drbd_device *, int) , char *why , enum bm_flag flags ,
struct drbd_peer_device *peer_device );
like, that's the whole signature, copy it exactly bestie, do not come for me about the line breaks π
πΈ ARGUMENTS πΈ
deviceβ the DRBD device. the main character of this whole situation tbh πio_fnβ the IO callback. this is the one that gets called when bitmap IO is actually possible, so it's lowkey the star of the show βdoneβ the callback that's called after the bitmap IO was performed. the afterparty, if you will πwhyβ descriptive text explaining the reason for doing the IO. literally just your receipts, keep them πflagsβ bitmap flags.enum bm_flagenergy π§peer_deviceβ the peer DRBD device. every main character needs their bestie π«Ά
π DESCRIPTION π
so here's the vibe: while IO on the bitmap is happening, we freeze application IO, which means we make sure drbd_set_out_of_sync can not be called. yeah. that's the whole point. π₯
β οΈ okay this part matters, bestie, listen up: this function MAY ONLY be called from worker context. like, that's not a suggestion, that's the rule. and it MUST NOT be used while a previous such work is still pending! no stacking, no overlapping, none of that π
and for the nerdy details: its worker function encloses the call of io_fn by get_ldev and put_ldev. so io_fn is literally wrapped up all cozy in there πβ¨
π SEE ALSO π
all the related lore, in the kernel file ./drivers/block/drbd/drbd_main.c:
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_md_mark_dirty(9)drbd_uuid_new_current(9)drbd_bmio_set_n_write(9)drbd_bmio_clear_n_write(9)drbd_bitmap_io(9)drbd_wait_misc(9)
and that's the whole page, bestie!! it lives in ./drivers/block/drbd, dated October 2026 β so yeah, mark your calendar, screenshot it, send it to the group chat, this one's a keeper πβ¨π¦π
mwah, go freeze some application IO responsibly π
π¦ 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