diff options
| author | jmmv <jmmv@NetBSD.org> | 2005-09-23 12:10:31 +0000 |
|---|---|---|
| committer | jmmv <jmmv@NetBSD.org> | 2005-09-23 12:10:31 +0000 |
| commit | 2a3e5eeb7c33daf98dff2ff04f324a4d0dac3f8f (patch) | |
| tree | 342a37e6145db64e2c8df120aeb2f5fc5c387f69 /lib/libc/sys | |
| parent | 992367dcfc1c1310e9196564c7569c5263f01004 (diff) | |
Apply the NFS exports list rototill patch:
- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
file sys/nfs/nfs_export.c. The former was becoming large and its code
is always compiled, regardless of the build options. Using the latter,
the code is only compiled in when NFSSERVER is enabled. While doing this,
also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
path and a set of export entries. At the moment it can only clear the
exports list or append entries, one by one, but it is done in a way that
allows setting the whole set of entries atomically in the future (see the
comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
that it becomes file system agnostic. In fact, all this whole thing was
done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
exports initialization; done internally by the kernel when initializing
the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
subsystems can run arbitrary code upon receipt of specific VFS events.
At the moment, this only provides support for unmount and is used to
destroy NFS exports lists from the file systems being unmounted, though it
has room for extension.
Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.
Diffstat (limited to 'lib/libc/sys')
| -rw-r--r-- | lib/libc/sys/nfssvc.2 | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/lib/libc/sys/nfssvc.2 b/lib/libc/sys/nfssvc.2 index a8e618fab2f..fcbc6d5c366 100644 --- a/lib/libc/sys/nfssvc.2 +++ b/lib/libc/sys/nfssvc.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: nfssvc.2,v 1.20 2004/05/13 10:20:58 wiz Exp $ +.\" $NetBSD: nfssvc.2,v 1.21 2005/09/23 12:10:32 jmmv Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)nfssvc.2 8.1 (Berkeley) 6/9/93 .\" -.Dd June 9, 1993 +.Dd September 23, 2005 .Dt NFSSVC 2 .Os .Sh NAME @@ -54,7 +54,7 @@ once in the kernel and the .Fa argstructp points to one of three structures depending on which bits are set in flags. -.Pp +.Ss Calls used by Xr mount_nfs 8 On the client side, .Fn nfssvc is only used for @@ -114,7 +114,7 @@ will be called with the flags and .Dv NFSSVC_AUTHINFAIL to denote a failed authentication attempt. -.Pp +.Ss Calls used by Xr nfsd 8 On the server side, .Fn nfssvc is called with the flag @@ -190,6 +190,30 @@ to pass a server side socket into the kernel for servicing by the .Xr nfsd 8 daemons. +.Ss Calls used by Xr mountd 8 +The +.Xr mountd 8 +server daemon calls +.Fn nfssvc +with the flag +.Dv NFSSVC_SETEXPORTSLIST +and a pointer to a +.Ft struct mountd_exports_list +object to atomically change the exports lists of a specific file system. +This structure has the following fields: +.Bl -tag +.It Vt const char *mel_path +Path to the file system that will have its exports list replaced by the +one described in the other fields. +.It Vt size_t mel_nexports +Number of valid entries in the +.Vt mel_export +field. +If zero, the exports list will be cleared for the given file system. +.It Vt struct export_args mel_export[AF_MAX] +Set of exports to be used for the given file system. +.El +.Pp .Sh RETURN VALUES Normally .Nm |
