loop_set_size(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” the struct loop_device you'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