gfs2_quota_check(9)
π 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->targetcontains 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
- 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