+2003-08-04 NeilBrown <neilb@cse.unsw.edu.au>
+ * support/export/xtab.c, support/include/nfslib.h,
+ support/nfs/cacheio.c, support/nfs/nfssvc.c,
+ utils/exportfs/exportfs.c, utils/exportfs/exportfs.man,
+ utils/exportfs/nfsd.man, utils/mountd/cache.c: support
+ /proc/fs/nfsd/* as a perferred alternate to /proc/fs/nfs/*
+ (nfs-utils-1.0.5-post2)
+
2003-08-04 NeilBrown <neilb@cse.unsw.edu.au>
* support/nfs/nfsexport.c: open channel file O_WRONLY when
only writing.
* utils/mountd/mountd.h: mountlist_{del,add} now take a host name
rather than an nfs_export.
* utils/mountd/rmtab.c: ditto.
+ (nfs-utils-1.5.0-post1)
2003-07-24 Chip Salzenberg <chip@pobox.com>
if ((fd=open(_PATH_PROC_EXPORTS, O_RDONLY))>=0) {
close(fd);
return xtab_read(_PATH_PROC_EXPORTS, 0);
+ } else if ((fd=open(_PATH_PROC_EXPORTS_ALT, O_RDONLY) >= 0)) {
+ close(fd);
+ return xtab_read(_PATH_PROC_EXPORTS_ALT, 0);
} else
return xtab_read(_PATH_XTAB, 2);
}
#endif
#ifndef _PATH_PROC_EXPORTS
#define _PATH_PROC_EXPORTS "/proc/fs/nfs/exports"
+#define _PATH_PROC_EXPORTS_ALT "/proc/fs/nfsd/exports"
#endif
enum cle_maptypes {
check_new_cache(void)
{
struct stat stb;
- return (stat("/proc/fs/nfs/filehandle", &stb) == 0);
+ return (stat("/proc/fs/nfs/filehandle", &stb) == 0) ||
+ (stat("/proc/fs/nfsd/filehandle", &stb) == 0);
}
struct nfsctl_arg arg;
int fd;
- fd = open("/proc/fs/nfs/threads", O_WRONLY);
+ fd = open("/proc/fs/nfsd/threads", O_WRONLY);
+ if (fd < 0)
+ fd = open("/proc/fs/nfs/threads", O_WRONLY);
if (fd >= 0) {
/* 2.5+ kernel with nfsd filesystem mounted.
* Just write the number in.
if (new_cache)
cache_flush(1);
else {
- fprintf(stderr, "exportfs: -f: only available with new cache controls: mount /proc/fs/nfs first\n");
+ fprintf(stderr, "exportfs: -f: only available with new cache controls: mount /proc/fs/nfsd first\n");
exit(1);
}
return 0;
2.6 and later versions providing the
.B nfsd
virtual filesystem has been mounted at
+.B /proc/fs/nfsd
+or
.BR /proc/fs/nfs .
If this filesystem is not mounted in 2.6, the legacy mode is used.
.P
.SH NAME
nfsd \- special filesystem for controlling Linux NFS server
.SH SYNPOSIS
-.B "mount -t nfsd nfsd /proc/fs/nfs"
+.B "mount -t nfsd nfsd /proc/fs/nfsd"
.SH DESCRIPTION
The
.B nfsd
.I mountd
programs (part of the nfs-utils package) expect to find this
filesystem mounted at
+.B /proc/fs/nfsd
+or
.BR /proc/fs/nfs .
If it is not mounted, they will fall-back on 2.4 style functionality.
This involves accessing the NFS server via a systemcall. This
* {
* echo $domain $path $length
* read filehandle <&0
- * } <> /proc/fs/nfs/filehandle
+ * } <> /proc/fs/nfsd/filehandle
*/
struct nfs_fh_len *
cache_get_filehandle(nfs_export *exp, int len, char *p)
{
- FILE *f = fopen("/proc/fs/nfs/filehandle", "r+");
+ FILE *f = fopen("/proc/fs/nfsd/filehandle", "r+");
char buf[200];
char *bp = buf;
static struct nfs_fh_len fh;
+
+ if (!f)
+ f = fopen("/proc/fs/nfs/filehandle", "r+");
if (!f)
return NULL;