gfs2_evict_inodes(9)
π gfs2_evict_inodes(9) β like, the Kernel API Manual page, bestie
okay so this is a page from the Kernel API Manual and it's about gfs2_evict_inodes(9), and honestly? it's giving "teamwork makes the dream work" in kernel form. let's get into it π«Ά
πΈ NAME πΈ
gfs2_evict_inodes β evict inodes cooperatively, bestie. together. as a unit. no lone wolves πΊ
β¨ SYNOPSIS β¨
void gfs2_evict_inodes (struct super_block *sb );
π ARGUMENTS π
sbβ the superblock. that's it, that's the whole argument. iconic minimalism π
π¦ DESCRIPTION π¦
okay so picture this: you're evicting an inode with a zero link count, right? and to figure out whether we can actually delete this inode, we're trying to upgrade the inode's iopen glock from SH mode to EX mode. glow-up time π₯
and here's the thing β the other nodes are supposed to evict the inode from their caches if they can, and to poke the inode's inode glock if they can't. either one of those behaviors lets gfs2_upgrade_iopen_glock proceed quickly. but if the other nodes are not cooperating? π the lock upgrading attempt will time out. and since inodes are evicted sequentially, that timeout can add up quickly. like, embarrassingly quickly. no cap.
so here's the drama: the function evict_inodes tries to keep the s_inode_list_lock list locked over a long time, which prevents other inodes from being evicted concurrently. which sounds fine until you realize it precludes the cooperative behavior we're actually looking for. π so rude. so this special version of evict_inodes avoids that. it's the nicer sibling. it shares.
modeled after drop_pagecache_sb. periodt. π
ngl, the whole point here is cooperation β if you're holding that s_inode_list_lock forever, nobody else gets to play and everything times out. this version doesn't do that. π§
π SEE ALSO π
kernel file ./fs/gfs2/ops_fstype.c β plus the whole friend group:
gfs2_tune_init(9)gfs2_check_sb(9)gfs2_read_super(9)gfs2_read_sb(9)gfs2_jindex_hold(9)init_statfs(9)gfs2_lm_mount(9)gfs2_fill_super(9)gfs2_get_tree(9)
and that's the page!! π sourced from ./fs/gfs2, dated October 2026, and yes it's gfs2_evict_inodes(9) β go be cooperative out there, bestie πβ
π¦ 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