gfs2_drop_inode(9)
π gfs2_drop_inode β the Kernel API Manual page, but make it make sense
okay so bestie, gather round, because today we're reading gfs2_drop_inode(9) from the Kernel API Manual and honestly? it's giving "tiny function, huge lore" π
β¨ NAME β¨
gfs2_drop_inode β drop an inode (and like, test for remote unlink while you're at it) π«Ά
πΈ SYNOPSIS πΈ
int gfs2_drop_inode (struct inode *inode );
that's it. that's the whole signature. one (1) argument. we love a low-maintenance icon π
π ARGUMENTS π
inodeβ the inode we're dropping. that's the one. the whole vibe. the inode to drop π
π¦ DESCRIPTION π¦
okay so picture this: we've received a callback on an iopen lock. why? because a remote node tried to deallocate the inode and failed β and the reason it failed is that this node (us, hi, we're the problem) still had the inode open. awkward π
so here's what we do: we mark the link count zero. why are we so confident? because we know it must have reached zero if the GLF_DEMOTE flag is set on the iopen glock. like, the math is mathing β¨
and here's the fear: if we didn't do a disk read since the remote node removed the final link, then we might otherwise miss this event entirely. π so this check exists to make sure this node will deallocate the inode's blocks β or, alternatively, pass the baton on to another node for later deallocation. teamwork, bestie π€
π SEE ALSO π
kernel file ./fs/gfs2/super.c β and friends!! go read the whole friend group:
gfs2_jindex_free(9)gfs2_make_fs_rw(9)gfs2_lock_fs_check_clean(9)gfs2_write_inode(9)gfs2_dirty_inode(9)gfs2_make_fs_ro(9)gfs2_put_super(9)gfs2_sync_fs(9)gfs2_freeze_super(9)gfs2_thaw_super(9)statfs_slow_fill(9)gfs2_statfs_slow(9)gfs2_statfs_i(9)gfs2_statfs(9)gfs2_show_options(9)gfs2_glock_put_eventually(9)evict_should_delete(9)evict_unlinked_inode(9)gfs2_evict_inode(9)
π the sign-off π
this lil masterpiece lives in ./fs/gfs2, it's dated October 2026, and it's the Kernel API Manual β so, respectfully, cite it right. π§ slay, stay glocked, and don't forget to drop your inodes responsibly π
π¦ 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