nfs4_proc_get_locations(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nfs4_proc_get_locations(9)

okay so bestie, you're in the Kernel API Manual now β€” welcome to the kernel side of the group chat πŸŽ€ this one is all about finding out where a filesystem ran off to after it migrated. it's giving "where did my FSID go" energy and honestly? iconic.


✨ NAME ✨

nfs4_proc_get_locations β€” discover locations for a migrated FSID 🌸


✨ SYNOPSIS ✨

int nfs4_proc_get_locations (struct nfs_server *server , struct nfs_fh
*fhandle , struct nfs4_fs_locations *locations , struct page *page ,
const struct cred *cred );

✨ ARGUMENTS ✨

  • server β€” pointer to the nfs_server we're processing, aka the main character πŸ‘‘
  • fhandle β€” pointer to the kernel NFS client's file handle, lowkey the ID card for the file fr fr
  • locations β€” the result of the query, this is where the answer lands πŸ’–
  • page β€” a buffer, plain and simple 🫢
  • cred β€” the credential to use for this operation, gotta have the right pass to get in πŸ™ˆ

✨ DESCRIPTION ✨

so here's the tea β˜• β€” this returns NFS4_OK on success, a negative NFS4ERR status code if the operation failed, or a negative errno if a local error occurred. three possible outcomes, all valid, all slay πŸ’…

on success, locations gets filled in β€” but bestie, listen: if the server has no locations information, NFS_ATTR_FATTR_V4_LOCATIONS is not asserted. no cap, that attribute just doesn't show up πŸ”₯

πŸ’€ heads up: -NFS4ERR_LEASE_MOVED gets returned if the server still has leases from this client that require migration recovery. like, the server's still holding onto your old stuff and needs you to sort it out first. not me being dramatic, it's literally in the spec 😭

✨ SEE ALSO ✨

Kernel file ./fs/nfs/nfs4proc.c, plus the whole friend group πŸ¦‹:


and that's the whole page, bestie, you ate that πŸ“ this little gem lives under ./fs/nfs and the version vibes are dated October 2026 β€” go forth and migrate your FSIDs responsibly πŸ’œβœ¨πŸ§š

πŸ“¦ where this page comes from