STRUCT RENAMEDATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 fr
  • flags β€” rename flags. the classic unsigned int of "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 πŸ’–:


anyway that's the whole page bestie, go rename something responsibly πŸ’œ

sign-off era: this one lives in ./include/linux, dated October 2026 β€” and that's the vibe check, we're done here. mwah πŸ’…πŸŽ€
πŸ“¦ where this page comes from