diff options
author | Benny Halevy <bhalevy@panasas.com> | 2009-05-04 11:44:49 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2009-05-04 11:44:49 -0400 |
commit | b750909f50fb184cb82344d40a150f0d2760ef21 (patch) | |
tree | 93bc4c66b6407809986639cd3c57965a444343c9 /utils/nfsd | |
parent | 6a72b8af3abaf3792702c834bab5a5049818f9c6 (diff) | |
download | nfs-utils-b750909f50fb184cb82344d40a150f0d2760ef21.tar.gz nfs-utils-b750909f50fb184cb82344d40a150f0d2760ef21.tar.xz nfs-utils-b750909f50fb184cb82344d40a150f0d2760ef21.zip |
utils/nfsd: add support for minorvers4
minorvers4 can be used to either enable or disable nfsv4.x.
If minorvers4 is a positive integer n, in the allowed range (only
minorversion 1 is supported for now), the string "+4.n" is appended
to the versions string written onto /proc/fs/nfsd/versions.
Correspondingly, if minorver4 is a negative integer -n, the string
"-4.n" is written.
With the default value, minorvers4==0, the minor version
setting is not changed.
Note that unlike the protocol versions 2, 3, or 4. The minor version
setting controls the *maximum* minor version nfsd supports. Particular
minor version cannot be controlled on their own. With only minor
version 1 supported at the moment the difference doesn't matter,
but for future minor versions greater than 1, enabling minor
version X will enable support for all minor versions 1 through X.
Disabling minor version X will disable support for minor
versions X and up, enabling 1 through X-1.
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/nfsd')
-rw-r--r-- | utils/nfsd/nfsd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c index c97c81f..ac264da 100644 --- a/utils/nfsd/nfsd.c +++ b/utils/nfsd/nfsd.c @@ -41,6 +41,7 @@ static struct option longopts[] = }; unsigned int protobits = NFSCTL_ALLBITS; unsigned int versbits = NFSCTL_ALLBITS; +int minorvers4; /* nfsv4 minor version */ char *haddr = NULL; int @@ -158,7 +159,7 @@ main(int argc, char **argv) closeall(3); openlog("nfsd", LOG_PID, LOG_DAEMON); - if ((error = nfssvc(port, count, versbits, protobits, haddr)) < 0) { + if ((error = nfssvc(port, count, versbits, minorvers4, protobits, haddr)) < 0) { int e = errno; syslog(LOG_ERR, "nfssvc: %s", strerror(e)); closelog(); |