drbd_get_max_capacity(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drbd_get_max_capacity(9) πŸ’…

okay bestie, welcome to the Kernel API Manual β€” yes it's a real man page, yes it's about the DRBD kernel driver, and yes we're gonna make it make sense 🫢


✨ NAME ✨

drbd_get_max_capacity β€” literally returns the capacity we announce to our peer πŸ’– (the original says "out peer", which is a whole mood, but you get it β€” it's the peer)


🌸 SYNOPSIS 🌸

sector_t drbd_get_max_capacity (struct drbd_backing_dev *bdev );

no cap, that's the whole signature. one function, one pointer, one sector_t coming back atcha ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • bdev β€” the meta data block device. that's it, that's the argument πŸ¦‹

πŸ’« DESCRIPTION πŸ’«

so the way this works: it returns the capacity we announce to our peer. simple, iconic, main character energy πŸ‘‘

but here's the part where you gotta pay attention β€” we clip ourselves at the various MAX_SECTORS. why?? because if we don't, the current implementation will oops sooner or later πŸ’€

not me being dramatic β€” that's literally what the page says. no clipping = oops. the kernel will absolutely throw hands. so we clip, we stay safe, we slay 🌈

πŸ”₯ SEE ALSO πŸ”₯

go read those too, they're lowkey all in the same friend group 🧚


⭐ sign-off ⭐

this whole thing lives in ./drivers/block/drbd, it's dated October 2026, and it's from the Kernel API Manual. periodt πŸ’…βœ¨

πŸ“¦ where this page comes from