drbd_get_max_capacity(9)
π 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 π₯
- Kernel file
./drivers/block/drbd/drbd_int.h drbd_chk_io_error(9)drbd_md_first_sector(9)drbd_md_last_sector(9)drbd_md_ss(9)
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
- 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