STRUCT RENAMEDATA(9)
π NAME
ok so struct renamedata β bestie, it's literally the struct that contains all information required for renaming. that's it, that's the whole job. it's the little info-bundle the rename machinery passes around so nobody has to juggle eighteen arguments at once. iconic behavior honestly π«Ά
β¨ SYNOPSIS β¨
like, here's the whole shape of it, no cap:
struct renamedata {
struct mnt_idmap *mnt_idmap;
struct dentry *old_parent;
struct dentry *old_dentry;
struct dentry *new_parent;
struct dentry *new_dentry;
struct delegated_inode *delegated_inode;
unsigned int flags;
};
(yeah there's a slightly unhinged extra space before the closing brace in the original and I'm keeping it, because we do not edit source π )
π MEMBERS π
okay let's go through the cast, one by one, main-character energy only:
mnt_idmapβ the idmap of the mount where the rename is actually happening. like, which mount's identity-mapping vibes are we in? this one πold_parentβ parent of source. the source's mom, basically πold_dentryβ source. the thing getting renamed, the one going through a glow-up β¨new_parentβ parent of destination. where it's moving to, new family, new tree πΈnew_dentryβ destination. the new name / new spot, slay π¦delegated_inodeβ this one returns an inode that needs a delegation break. so it's not just carrying info, it's handing something back to you. lowkey the most interesting member fr frflagsβ rename flags. the classicunsigned intof "here's how you want this rename to behave" π
π¦ SEE ALSO π¦
the kernel file to go stare at is ./include/linux/fs.h β and it comes with a whole friend group of (9) pages, so let's list every single one because we do not leave anyone out of the group chat π:
enum positive_aop_returns(9)struct address_space(9)struct file_ra_state(9)struct file(9)i_uid_into_vfsuid(9)i_uid_needs_update(9)i_uid_update(9)i_gid_into_vfsgid(9)i_gid_needs_update(9)i_gid_update(9)inode_fsuid_set(9)inode_fsgid_set(9)fsuidgid_has_mapping(9)inode_set_ctime(9)file_write_started(9)file_write_not_started(9)is_mgtime(9)iput_if_not_last(9)is_idmapped_mnt(9)file_start_write(9)file_end_write(9)kiocb_start_write(9)kiocb_end_write(9)name_is_dot_dotdot(9)name_contains_dotdot(9)inode_dio_begin(9)inode_dio_end(9)generic_ci_validate_strict_name(9)
anyway that's the whole page bestie, go rename something responsibly π
sign-off era: this one lives in./include/linux, datedOctober 2026β and that's the vibe check, we're done here. 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