drbd_md_read(9)
π drbd_md_read(9) π
okay bestie, welcome to the Kernel API Manual β¨ β yes, the kernel API manual, we're in that part of the source tree today, and honestly? it's giving legendary.
πΈ NAME πΈ
drbd_md_read β reads in the meta data super block π
β SYNOPSIS β
int drbd_md_read (struct drbd_device *device , struct drbd_backing_dev
*bdev );
π¦ ARGUMENTS π¦
deviceβ the DRBD device, your main character fr fr πbdevβ the device that the meta data should be read in from π
β¨ DESCRIPTION β¨
so here's the vibe: you get NO_ERROR back when everything slays π
and you get an enum drbd_ret_code when something goes wrong π β no cap, that's the whole return situation.
the way that this gets called is so specific: it's called exactly once during drbd_adm_attach, and it happens while the device is still being D_DISKLESS, even before bdev is assigned to device->ldev. like, it's early early. pre-assignment early. π
highkey important, bestie β exactly once and before the assignment are not decorative details, they're the whole point of this little guy's existence π
π₯ SEE ALSO π₯
kernel file ./drivers/block/drbd/drbd_main.c, plus the whole squad π«Ά
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_mark_dirty(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)
and that's the page, bestie π sign-off time: this one lives in ./drivers/block/drbd, dated October 2026, and it's filed under drbd_md_read(9). iconic behavior from start to finish, ngl π§ββοΈβ¨
π¦ 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