nfs42_copy_dest_done(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nfs42_copy_dest_done β€” like, the Kernel API Manual one πŸ¦‹

okay bestie, so this page lives in the Kernel API Manual (section 9, the kernel-functions girlies ✨), and it's all about what happens after a clone or copy offload has already landed. the cleanup era. the "now go tell everyone" era. πŸŽ€


✨ NAME ✨

nfs42_copy_dest_done β€” perform inode cache updates after clone/copy offload 🫢

like literally, it's the little function that does the tidy-up once a copy/clone offload is done. it's giving "you did the thing, now let me fix the cache so nobody's confused." πŸ’…


🌸 SYNOPSIS 🌸

void nfs42_copy_dest_done (struct file *file , loff_t pos , loff_t len ,
loff_t oldsize );

no return value, nothing to check, she just does the vibes and leaves. πŸ’€ ✨


πŸ’– ARGUMENTS πŸ’–

  • file β€” pointer to the destination file. the main character of this whole operation, the one getting the copy. πŸ‘‘
  • pos β€” destination offset. like, where in the file we're doing the thing. πŸ“
  • len β€” copy length. how much we're working with, in bytes. πŸ“
  • oldsize β€” length of the file prior to clone/copy. the before picture, for the before/after. πŸ“

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the whole plot: this function punches a hole in the inode page cache, so that the NFS client will know to retrieve new data. πŸ•³οΈβœ¨ that's the big one β€” it's basically leaving a note that says "hey, the old stuff in here is stale, go get the fresh stuff."

then it updates the file size if necessary. 🧚

and then β€” the glow-up final step β€” it marks the inode as having invalid cached values for:

  • change attribute
  • ctime
  • mtime
  • space used

like, all four, marked invalid, simultaneously. no cap, it's a whole vibe check for the cache and the cache failed it on purpose. 😭πŸ”₯

lowkey important: the point of invalidating all of that is so the client doesn't trust stale metadata. don't skip the punches, bestie, or you'll be serving up lies. πŸ’€

🌈 SEE ALSO 🌈


so yeah, that's the page πŸ’œ β€” the manual name is nfs42_copy_dest_done(9), it comes to you from ./fs/nfs, and the date on it is October 2026. go off, kernel bestie, slay the cache πŸŽ€ πŸ¦‹ ⭐

πŸ“¦ where this page comes from