bpf_real_data_inode(9)
π bpf_real_data_inode(9) β the Kernel API Manual, bestie edition π
okay so real talk, this is a page out of the Kernel API Manual and it's about bpf_real_data_inode(9) β the little kfunc that tells you which inode actually holds a file's data. it's giving "who is she really" energy and honestly? obsessed. β¨
πΈ NAME πΈ
bpf_real_data_inode β get the real inode hosting a file's data. that's it, that's the whole vibe. no cap. π
π¦ SYNOPSIS π¦
__bpf_kfunc struct inode * bpf_real_data_inode (struct file *file );
look at that signature, so clean, so iconic. π
π ARGUMENTS π
fileβ the file to resolve. literally just hand it the file and let it do its thing. that's the whole ask. π«Ά
π DESCRIPTION π
okay so here's the tea. π΅
bpf_real_data_inode resolves file to the inode that hosts its data.
for a regular file sitting on a union/overlay filesystem, what you get back is the underlying inode β upper or lower β that actually stores the data, not the overlay inode. like, the real one. the one doing the work. main character inode energy fr fr. π
but here's the caveat bestie, listen up: data resolution only applies to regular files. so:
- for a non-regular file (think a device node, a fifo or a socket β the weird kids π) on a union/overlay filesystem, you just get the overlay inode itself returned. no digging, no peeling back the layers.
- for any file on a non-union filesystem, you get the inode that's attached to
file. simple, straightforward, slay.
like, it's a vibe check for inodes and the answer depends entirely on what kind of file you're dealing with. iykyk. β¨
β RETURN β
the inode hosting file's data. or NULL. that's the whole range, king. π (NULL absolutely counts as an answer, don't come for her π)
π SEE ALSO π
kernel file ./fs/bpf_fs_kfuncs.c β go read it, it's right there, it's giving source material. π
and the whole friend group, because nobody does it alone:
bpf_get_task_exe_file(9)bpf_put_file(9)bpf_path_d_path(9)bpf_get_dentry_xattr(9)bpf_get_file_xattr(9)bpf_set_dentry_xattr_locked(9)bpf_remove_dentry_xattr_locked(9)bpf_set_dentry_xattr(9)bpf_remove_dentry_xattr(9)bpf_cgroup_read_xattr(9)bpf_sock_read_xattr(9)
β¨ friendly reminder that this page lives under ./fs and it's dated October 2026 β so if you're reading this and the year is wrong for you, that's a you problem, not a her problem. π
okay bye bestie, go resolve some inodes, drink some water, and remember: the overlay inode is not the real one and you deserve the truth. ππ¦πΈπ π«Άπβ
π¦ 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