]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Release 1.0.5 nfs-utils-1-0-5
authorneilbrown <neilbrown>
Thu, 17 Jul 2003 23:41:19 +0000 (23:41 +0000)
committerneilbrown <neilbrown>
Thu, 17 Jul 2003 23:41:19 +0000 (23:41 +0000)
ChangeLog
configure
configure.in
nfs-utils.spec
support/nfs/cacheio.c
utils/exportfs/exportfs.c
utils/exportfs/exportfs.man
utils/mountd/mountd.c
utils/mountd/mountd.man

index 876385481da504cf2f91bb577d3fdd88373588f1..5b822575188696b4207541fca65b4b7b0f643b99 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2003-07-18 NeilBrown <neilb@cse.unsw.edu.au>
+
+       Release 1.0.5:
+        1.0.4 was a bit of a brown-paper-bag-release because of the extra
+        'free' in auth.c.  So I'm releasing this just a few days later.
+
+       * support/nfs/cacheio.c(cache_flush): Correct test for 'open
+       failed'
+       * utils/exportfs/exportfs.c(main): If "-f" given as lone option,
+       check if new_cache is enabled, error if not, flush and exit if it
+       is. 
+       * utils/exportfs/exportfs.man: Explain -f option and explain the
+       two different modes that exportfs can work in.
+       * utils/mountd/mountd.c: Do not change RLIMIT_NOFILE if the -o
+       option wasn't given.
+       * utils/mountd/mountd.man: Record the change if default behaviour
+       for RLIMIT_NOFILE.
+       * configure.in, nfs-utils.spec: update version to 1.0.5 and
+       run autoconf
+       
 2003-07-15 NeilBrown <neilb@cse.unsw.edu.au>
 
        * utils/mountd/mountd.c(main): getopt string fix for 'o'
 2003-07-15 NeilBrown <neilb@cse.unsw.edu.au>
 
        * utils/mountd/mountd.c(main): getopt string fix for 'o'
index 0922048b6b105dabb6cc51ef27ef170fc57fd767..b077c1f9e343f52578d50d534be6d5cc12c33244 100755 (executable)
--- a/configure
+++ b/configure
@@ -539,7 +539,7 @@ fi
 
 
 # The nfs-utils version
 
 
 # The nfs-utils version
-VERSION="1.0.4"
+VERSION="1.0.5"
 
 
 # Check whether --with-release or --without-release was given.
 
 
 # Check whether --with-release or --without-release was given.
index 017e795c9680722585cf1b6fc29323759a22bbd3..f726549f9069024129d7f4d17554f15e293272e1 100644 (file)
@@ -4,7 +4,7 @@ AC_INIT(rules.mk)
 AC_PREFIX_DEFAULT(/usr)
 
 # The nfs-utils version
 AC_PREFIX_DEFAULT(/usr)
 
 # The nfs-utils version
-VERSION="1.0.4"
+VERSION="1.0.5"
 AC_SUBST(VERSION)
 
 dnl *************************************************************
 AC_SUBST(VERSION)
 
 dnl *************************************************************
index 3b89f31ff706084c5a293e582fbc88439ab7397d..f98ed59663789474cc0797a7956e1255ed56d7e1 100644 (file)
@@ -6,7 +6,7 @@
 
 Summary: NFS utlilities and supporting daemons for the kernel NFS server.
 Name: nfs-utils
 
 Summary: NFS utlilities and supporting daemons for the kernel NFS server.
 Name: nfs-utils
-Version: 1.0.4
+Version: 1.0.5
 Release: 1
 Source0: ftp://nfs.sourceforge.net/pub/nfs/%{name}-%{version}.tar.gz
 Group: System Environment/Daemons
 Release: 1
 Source0: ftp://nfs.sourceforge.net/pub/nfs/%{name}-%{version}.tar.gz
 Group: System Environment/Daemons
index 77facb1eaccc7158dedef07f08db8c0bef448017..ff5b02813e256c12b017da5356d80ecb17b9c43c 100644 (file)
@@ -260,7 +260,7 @@ cache_flush(int force)
                int fd;
                sprintf(path, "/proc/net/rpc/%s/flush", cachelist[c]);
                fd = open(path, O_RDWR);
                int fd;
                sprintf(path, "/proc/net/rpc/%s/flush", cachelist[c]);
                fd = open(path, O_RDWR);
-               if (fd) {
+               if (fd >= 0) {
                        write(fd, stime, strlen(stime));
                        close(fd);
                }
                        write(fd, stime, strlen(stime));
                        close(fd);
                }
index fe0f6bac5e188d302ec2b40bc2e862ed8dc855df..cbb0aa9ad859f55dca774a56939c9a3eb695d3d8 100644 (file)
@@ -91,16 +91,22 @@ main(int argc, char **argv)
                fprintf(stderr, "exportfs: -r and -u are incompatible.\n");
                return 1;
        }
                fprintf(stderr, "exportfs: -r and -u are incompatible.\n");
                return 1;
        }
+       new_cache = check_new_cache();
        if (optind == argc && ! f_all) {
                if (force_flush) {
        if (optind == argc && ! f_all) {
                if (force_flush) {
-                       cache_flush(1);
+                       if (new_cache)
+                               cache_flush(1);
+                       else {
+                               fprintf(stderr, "exportfs: -f: only available with new cache controls: mount /proc/fs/nfs first\n");
+                               exit(1);
+                       }
+                       return 0;
                } else {
                        xtab_export_read();
                        dump(f_verbose);
                        return 0;
                }
        }
                } else {
                        xtab_export_read();
                        dump(f_verbose);
                        return 0;
                }
        }
-       new_cache = check_new_cache();
 
        if (f_export && ! f_ignore)
                export_read(_PATH_EXPORTS);
 
        if (f_export && ! f_ignore)
                export_read(_PATH_EXPORTS);
index 510c48ff5372089cebbd0b98a9ce7ca4fdfbba96..7d18509e69b88c5d52e5385f524bb2540eec47ab 100644 (file)
@@ -2,8 +2,8 @@
 .\" exportfs(8)
 .\" 
 .\" Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de>
 .\" exportfs(8)
 .\" 
 .\" Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de>
-.\" Modifications 1999 Neil Brown <neilb@cse.unsw.edu.au>
-.TH exportfs 8 "7 Sep 1999"
+.\" Modifications 1999-2003 Neil Brown <neilb@cse.unsw.edu.au>
+.TH exportfs 8 "18 July 2003"
 .SH NAME
 exportfs \- maintain list of NFS exported file systems
 .SH SYNOPSIS
 .SH NAME
 exportfs \- maintain list of NFS exported file systems
 .SH SYNOPSIS
@@ -15,6 +15,8 @@ exportfs \- maintain list of NFS exported file systems
 .br
 .BI "/usr/sbin/exportfs [-v]
 .br
 .br
 .BI "/usr/sbin/exportfs [-v]
 .br
+.BI "/usr/sbin/exportfs -f"
+.br
 .SH DESCRIPTION
 The
 .B exportfs
 .SH DESCRIPTION
 The
 .B exportfs
@@ -39,7 +41,30 @@ without modifying
 using
 .BR exportfs .
 .P
 using
 .BR exportfs .
 .P
-Any export requests which identify a specific host (rather than a
+.B exportfs
+and it's partner program
+.B mountd
+work in one of two modes, a legacy mode which applies to 2.4 and
+earlier versions of the Linux kernel, and a new mode which applies to
+2.6 and later versions providing the
+.B nfsd
+virtual filesystem has been mounted at
+.BR /proc/fs/nfs .
+If this filesystem is not mounted in 2.6, the legacy mode is used.
+.P
+In the new mode,
+.B exportfs
+does not give any information to the kernel but only provides it to
+.B mountd
+through the
+.B /var/lib/nfs/xtab
+file.
+.B mountd
+will listen to requests from the kernel and will provide information
+as needed.
+.P
+In the legacy mode,
+any export requests which identify a specific host (rather than a
 subnet or netgroup etc) are entered directly into the kernel's export
 table as well as being written to
 .BR /var/lib/nfs/xtab .
 subnet or netgroup etc) are entered directly into the kernel's export
 table as well as being written to
 .BR /var/lib/nfs/xtab .
@@ -71,10 +96,15 @@ with /etc/exports. It removes entries in /var/lib/nfs/xtab
 which are deleted from /etc/exports, and remove any entries from the
 kernel export table which are no longer valid.
 .TP
 which are deleted from /etc/exports, and remove any entries from the
 kernel export table which are no longer valid.
 .TP
-.TP
 .B -u
 Unexport one or more directories.
 .TP
 .B -u
 Unexport one or more directories.
 .TP
+.B -f
+In 'new' mode, flush everything out of the kernels export table. Any
+clients that are active will get new entries added by
+.B mountd
+when they make their next request.
+.TP
 .B -v
 Be verbose. When exporting or unexporting, show what's going on. When
 displaying the current export list, also display the list of export
 .B -v
 Be verbose. When exporting or unexporting, show what's going on. When
 displaying the current export list, also display the list of export
index ae5daa12fff4fc491c6707f74f6ed402f14fc595..d0d8103583818fe50cd38653655f281449be50ef 100644 (file)
@@ -431,7 +431,7 @@ main(int argc, char **argv)
        char    *export_file = _PATH_EXPORTS;
        int     foreground = 0;
        int     port = 0;
        char    *export_file = _PATH_EXPORTS;
        int     foreground = 0;
        int     port = 0;
-       int     descriptors = 256;
+       int     descriptors = 0;
        int     c;
        struct sigaction sa;
        struct rlimit rlim;
        int     c;
        struct sigaction sa;
        struct rlimit rlim;
@@ -498,19 +498,20 @@ main(int argc, char **argv)
                exit(1);
        }
 
                exit(1);
        }
 
-       if (getrlimit (RLIMIT_NOFILE, &rlim) != 0) {
-               fprintf(stderr, "%s: getrlimit (RLIMIT_NOFILE) failed: %s\n",
-                       argv [0], strerror(errno));
-               exit(1);
-       }
+       if (descriptors) {
+               if (getrlimit (RLIMIT_NOFILE, &rlim) != 0) {
+                       fprintf(stderr, "%s: getrlimit (RLIMIT_NOFILE) failed: %s\n",
+                               argv [0], strerror(errno));
+                       exit(1);
+               }
 
 
-       rlim.rlim_cur = descriptors;
-       if (setrlimit (RLIMIT_NOFILE, &rlim) != 0) {
-               fprintf(stderr, "%s: setrlimit (RLIMIT_NOFILE) failed: %s\n",
-                       argv [0], strerror(errno));
-               exit(1);
+               rlim.rlim_cur = descriptors;
+               if (setrlimit (RLIMIT_NOFILE, &rlim) != 0) {
+                       fprintf(stderr, "%s: setrlimit (RLIMIT_NOFILE) failed: %s\n",
+                               argv [0], strerror(errno));
+                       exit(1);
+               }
        }
        }
-
        /* Initialize logging. */
 /*     xlog_open("mountd"); */
 
        /* Initialize logging. */
 /*     xlog_open("mountd"); */
 
index 77f4e266563508952126b36cae500aecf2a8d328..6e795291e03b40d14e08285c466758cd9ead6a49 100644 (file)
@@ -74,7 +74,7 @@ Display usage message.
 .TP
 .B \-o num " or " \-\-descriptors num
 Set the limit of the number of open file descriptors to num. The
 .TP
 .B \-o num " or " \-\-descriptors num
 Set the limit of the number of open file descriptors to num. The
-default is 256.
+default is to leave the limit unchanged.
 .TP
 .B \-N " or " \-\-no-nfs-version
 This option can be used to request that
 .TP
 .B \-N " or " \-\-no-nfs-version
 This option can be used to request that