generic_fh_to_dentry(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

Bestie, meet generic_fh_to_dentry(9) from the Kernel API Manual! πŸ’– It’s the generic helper for the fh_to_dentry export operation β€” that’s the whole name, no cap. ✨

πŸŽ€ SYNOPSIS πŸŽ€

       struct dentry * generic_fh_to_dentry (struct super_block *sb , struct
       fid *fid , int fh_len , int fh_type , struct inode *(*get_inode) (struct
       super_block *sb, u64 ino, u32 gen) );

πŸ¦‹ ARGUMENTS πŸ¦‹

okay so here’s the cast, and every single one matters:

  • sb β€” the filesystem to do the file handle conversion on. πŸ—‚οΈ
  • fid β€” the file handle to convert. πŸ”„
  • fh_len β€” length of the file handle in bytes. πŸ“
  • fh_type β€” type of file handle. 🏷️
  • get_inode β€” filesystem callback to retrieve inode. 🫢

πŸ”₯ DESCRIPTION πŸ”₯

okay so the tea: this function decodes fid as long as it has one of the well-known Linux filehandle types, and it calls get_inode on it to retrieve the inode for the object specified in the file handle. literally the whole plot, and it’s iconic. πŸ’…βœ¨

🌈 SEE ALSO 🌈

Kernel file ./fs/libfs.c is serving the whole squad 🫢: simple_offset_init(9), simple_offset_add(9), simple_offset_remove(9), simple_offset_rename(9), simple_offset_rename_exchange(9), simple_offset_destroy(9), offset_dir_llseek(9), offset_readdir(9), simple_rename_timestamp(9), simple_setattr(9), simple_write_end(9), simple_read_from_buffer(9), simple_write_to_buffer(9), memory_read_from_buffer(9), generic_encode_ino32_fh(9), generic_fh_to_parent(9), simple_fsync_noflush(9), simple_fsync(9), generic_check_addressable(9), simple_get_link(9), generic_ci_d_compare(9), generic_ci_d_hash(9), generic_ci_match(9), generic_set_sb_d_ops(9), inode_maybe_inc_iversion(9), inode_query_iversion(9), simple_inode_init_ts(9), path_from_stashed(9), simple_start_creating(9).


πŸ’Œ cute sign-off, bestie: source/version ./fs, date October 2026, page generic_fh_to_dentry(9) β€” love u, bye! πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from