nfsservctl(2)

πŸ’– nfsservctl πŸ’–

okay bestie, gather round, because today we're talking about nfsservctl β€” the syscall interface to the kernel nfs daemon. yes she's a real one. no she does not exist anymore. we'll get there, don't spiral. 🫢

This page lives in the System Calls Manual, section 2. iykyk.


✨ NAME ✨

nfsservctl β€” syscall interface to kernel nfs daemon

πŸ“š LIBRARY πŸ“š

Standard C library (libc, -lc)

πŸŽ€ SYNOPSIS πŸŽ€

#include <linux/nfsd/syscall.h>

long nfsservctl(int cmd, struct nfsctl_arg *argp,
                union nfsctl_res *resp);

🌸 DESCRIPTION 🌸

Note: Since Linux 3.1, this system call no longer exists. It has been replaced by a set of files in the nfsd filesystem; see nfsd(7).

ok so like. she's gone. she's been replaced by some files in the nfsd filesystem. that's the whole tea. but we still gotta document her bc history is history. πŸ’…

here's the whole command situation, verbatim, no edits, don't @ me:

/*
 * These are the commands understood by nfsctl().
 */
#define NFSCTL_SVC        0  /* This is a server process.  */
#define NFSCTL_ADDCLIENT  1  /* Add an NFS client.  */
#define NFSCTL_DELCLIENT  2  /* Remove an NFS client.  */
#define NFSCTL_EXPORT     3  /* Export a filesystem.  */
#define NFSCTL_UNEXPORT   4  /* Unexport a filesystem.  */
#define NFSCTL_UGIDUPDATE 5  /* Update a client's UID/GID map
                                 (only in Linux 2.4.x and earlier).  */
#define NFSCTL_GETFH      6  /* Get a file handle (used by mountd(8))
                                 (only in Linux 2.4.x and earlier).  */

struct nfsctl_arg {
    int                       ca_version;     /* safeguard */
    union {
        struct nfsctl_svc     u_svc;
        struct nfsctl_client  u_client;
        struct nfsctl_export  u_export;
        struct nfsctl_uidmap  u_umap;
        struct nfsctl_fhparm  u_getfh;
        unsigned int          u_debug;
    } u;
}

union nfsctl_res {
        struct knfs_fh          cr_getfh;
        unsigned int            cr_debug;
};

like look at that u union. a whole buffet. she was doing the most in the best way. 😭

πŸ”₯ RETURN VALUE πŸ”₯

  • Success? you get 0. iconic. we love a clean return.
  • Error? you get -1, and errno gets set to tell you what went wrong.

🌈 STANDARDS 🌈

Linux. (yes, just Linux. she's built different. πŸ‘‘)

πŸ’€ HISTORY πŸ’€

  • Removed in Linux 3.1.
  • Removed in glibc 2.28.

not one but TWO removals. she got double-deleted. it's giving legendary exit. πŸ•ŠοΈ

πŸ¦‹ SEE ALSO πŸ¦‹


that's the whole page babes, every flag, every struct field, every version number, nothing skipped, periodt. πŸ’–

this lil writeup comes from the Linux man-pages 6.20, dated 2025-09-21 ✨ β€” go drink some water and stay slaying bestie πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms