drbd_md_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 🫢


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