last_lba(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to last_lba(9) from the Kernel API Manual 🫢✨ she’s a tiny helper with main-character energy, and here’s the whole vibe.

🌸 NAME 🌸

last_lba β€” return number of last logical block of device πŸ’…

✨ SYNOPSIS ✨

u64 last_lba (struct gendisk *disk );

πŸŽ€ ARGUMENTS πŸŽ€

  • disk β€” block device. that’s the one, bestie 🫢

πŸ’– DESCRIPTION πŸ’–

Returns last LBA value on success, 0 on error. no cap 😭

This is stored (by sd and ide-geometry) in the part[0] entry for this disk, and is the number of physical sectors available on the disk. literally the whole point πŸ’…βœ¨

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./block/partitions/efi.c β€” plus the whole squad:


source/version line is ./block/partitions, dated October 2026, and this whole thing is the last_lba(9) page. byeee, go read your GPTs πŸ’œπŸŒˆ

πŸ“¦ where this page comes from