gfs2_quota_check(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Okay bestie, we're looking at gfs2_quota_check(9) from the Kernel API Manual, and it does exactly what it says: check if allocating new blocks will exceed quota. Periodt. ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

int gfs2_quota_check (struct gfs2_inode *ip , kuid_t uid , kgid_t gid ,
       struct gfs2_alloc_parms *ap );

🌸 ARGUMENTS 🌸

  • ip β€” the inode for which this check is being performed. Like, whose vibe are we quota-checking? πŸ‘€
  • uid β€” the uid to check against.
  • gid β€” the gid to check against.
  • ap β€” the allocation parameters. ap->target contains the requested blocks. ap->min_target, if set, contains the minimum blks requested.

πŸŽ€ RETURN πŸŽ€

0 on success. 🫢

And the math is literally:

min_req = ap->min_target ? ap->min_target : ap->target;

Quota must allow at least min_req blks for success, and ap->allowed is set to the number of blocks allowed. Slay. πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

-EDQUOT otherwise, quota violation. ap->allowed is set to number of blocks available.

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./fs/gfs2/quota.c, plus gfs2_qa_get(9), gfs2_adjust_quota(9), and gfs2_quotad(9). Go read those too, iykyk. 🧚


Cute little sign-off: this page is from source/version ./fs/gfs2, dated October 2026, and yes, it's still gfs2_quota_check(9). πŸ’œπŸŒˆ

πŸ“¦ where this page comes from