gfs2_getattr(9)
π« gfs2_getattr(9) π«
okay so bestie, welcome to this lil page from the Kernel API Manual β it's the gfs2_getattr(9) moment, and I'm gonna walk you through it like we're texting. π«Ά
πΈ NAME πΈ
gfs2_getattr β read out an inode's attributes β¨
π SYNOPSIS π
here's the signature, copy-paste energy only:
int gfs2_getattr (struct mnt_idmap *idmap , const struct path *path ,
struct kstat *stat , u32 request_mask , unsigned int flags );
π ARGUMENTS π
okay so the arguments are giving:
idmapβ idmap of the mount the inode was found frompathβ object to querystatβ the inode's statsrequest_maskβ mask ofSTATX_xxxflags indicating the caller's interestsflagsβAT_STATX_xxxsetting
π¦ DESCRIPTION π¦
so here's the tea: this may be called from the VFS directly, or from within GFS2 with the inode locked. so we look to see if the glock is already locked, and we only lock the glock if that hasn't already been done. also note: it's the NFS readdirplus operation that causes this to be called (from filldir) with the glock already held β iykyk π
β¨ RETURN β¨
the return is errno, periodt π
π SEE ALSO π
the Kernel file is ./fs/gfs2/inode.c, and the whole SEE ALSO friend group is:
gfs2_set_iop(9)gfs2_inode_lookup(9)gfs2_lookup_by_inum(9)gfs2_lookup_meta(9)gfs2_lookupi(9)create_ok(9)gfs2_init_xattr(9)init_dinode(9)gfs2_trans_da_blks(9)gfs2_create_inode(9)gfs2_create(9)__gfs2_lookup(9)gfs2_link(9)gfs2_unlink_inode(9)gfs2_unlink(9)gfs2_symlink(9)gfs2_mkdir(9)gfs2_mknod(9)gfs2_atomic_open(9)update_moved_ino(9)gfs2_rename(9)gfs2_exchange(9)gfs2_get_link(9)gfs2_permission(9)gfs2_setattr(9)
xoxo π signing off from ./fs/gfs2 on October 2026 β this was gfs2_getattr(9), mwah! π
π¦ 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