loop_set_size(9)
π NAME π
loop_set_size β sets device size and notifies userspace β¨
hey bestie, welcome to the loop_set_size(9) page from the Kernel API Manual π«Ά this one's short and sweet, no cap.
β¨ SYNOPSIS β¨
void loop_set_size (struct loop_device *lo , loff_t size );
πΈ ARGUMENTS πΈ
loβ thestruct loop_deviceyou're setting the size for πsizeβ the new size of the loop device, periodt.
π¦ DESCRIPTION π¦
okay so real talk: callers must validate that the size they pass into this function actually fits into a sector_t β like, for example, by using loop_validate_size π no skipping that vibe check.
π SEE ALSO π
Kernel file ./drivers/block/loop.c β and also these besties:
source/version: ./drivers/block Β· October 2026 β that's the cute lil sign-off, mwah π
π¦ 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