diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-04-04 17:57:26 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2017-04-05 13:27:57 -0400 |
commit | d53fe5fe72d2b8d645ad362840da42021363384d (patch) | |
tree | 49c6aab2abbbf3e254de0e0a6c786c455ca40ad6 /support/include/nfs/nfs.h | |
parent | c9eab79f70e80df51829193858304a797621ecdd (diff) | |
download | nfs-utils-d53fe5fe72d2b8d645ad362840da42021363384d.tar.gz nfs-utils-d53fe5fe72d2b8d645ad362840da42021363384d.tar.xz nfs-utils-d53fe5fe72d2b8d645ad362840da42021363384d.zip |
nfsd: Allow the caller to turn off NFSv4.0 without turning off NFSv4.x
The new semantic is that '-N4' turns off all NFSv4 minor versions, while
'-V4' turns them all on. In order to turn off just minor version x (x >= 0),
use -N4.x, and to turn it back on. '-V4.x'.
Note that on older kernels, attempting to use -N4.0 and -V4.0 is
equivalent to specifying -N4 or -V4.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/include/nfs/nfs.h')
-rw-r--r-- | support/include/nfs/nfs.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/support/include/nfs/nfs.h b/support/include/nfs/nfs.h index 15ecc6b..5860343 100644 --- a/support/include/nfs/nfs.h +++ b/support/include/nfs/nfs.h @@ -16,8 +16,8 @@ #define NFSD_MINVERS 2 #define NFSD_MAXVERS 4 -#define NFS4_MINMINOR 1 -#define NFS4_MAXMINOR WORD_BIT +#define NFS4_MINMINOR 0 +#define NFS4_MAXMINOR (WORD_BIT-1) struct nfs_fh_len { int fh_size; @@ -29,15 +29,18 @@ struct nfs_fh_len { #define NFSCTL_TCPBIT (1 << (18 - 1)) #define NFSCTL_VERUNSET(_cltbits, _v) ((_cltbits) &= ~(1 << ((_v) - 1))) +#define NFSCTL_MINORUNSET(_cltbits, _v) ((_cltbits) &= ~(1 << (_v))) #define NFSCTL_UDPUNSET(_cltbits) ((_cltbits) &= ~NFSCTL_UDPBIT) #define NFSCTL_TCPUNSET(_cltbits) ((_cltbits) &= ~NFSCTL_TCPBIT) #define NFSCTL_VERISSET(_cltbits, _v) ((_cltbits) & (1 << ((_v) - 1))) +#define NFSCTL_MINORISSET(_cltbits, _v) ((_cltbits) & (1 << (_v))) #define NFSCTL_UDPISSET(_cltbits) ((_cltbits) & NFSCTL_UDPBIT) #define NFSCTL_TCPISSET(_cltbits) ((_cltbits) & NFSCTL_TCPBIT) #define NFSCTL_VERDEFAULT (0xc) /* versions 3 and 4 */ #define NFSCTL_VERSET(_cltbits, _v) ((_cltbits) |= (1 << ((_v) - 1))) +#define NFSCTL_MINORSET(_cltbits, _v) ((_cltbits) |= (1 << (_v))) #define NFSCTL_UDPSET(_cltbits) ((_cltbits) |= NFSCTL_UDPBIT) #define NFSCTL_TCPSET(_cltbits) ((_cltbits) |= NFSCTL_TCPBIT) |