diff options
author | Steve Dickson <steved@redhat.com> | 2014-02-13 12:44:06 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2014-02-13 12:44:06 -0500 |
commit | 327e24b8678c350b70f83f8b58790309a7c94c7b (patch) | |
tree | bcdd02c758eb8721ea4cf993b3c27d5f86e01e00 /support/include/nfs/nfs.h | |
parent | 2f682f25c642fcfe7c511d04bc9d67e732282348 (diff) | |
download | nfs-utils-327e24b8678c350b70f83f8b58790309a7c94c7b.tar.gz nfs-utils-327e24b8678c350b70f83f8b58790309a7c94c7b.tar.xz nfs-utils-327e24b8678c350b70f83f8b58790309a7c94c7b.zip |
nfsd: support NFS4_MAXMINOR up to the number an unsigned int can keep
This implementation allows specifying NFS4 minor version numbers up
to the number of bits available in int data type (typically 32 on
Linux)
This is based on an idea mentioned by
J. Bruce Fields <bfields@fieldses.org> mentioned on the linux-nfs mailing list.
I changed the data type back from an array to two bit fields, one for
storing whether the minor version was specified on the command line
and the second one for storing whether it was set or unset. This
change was done to prevent blowing up the allocated stack space in an
unnecessary fashion.
Acked-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Robert Schiele <rschiele@gmail.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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/support/include/nfs/nfs.h b/support/include/nfs/nfs.h index df4ad76..27054e5 100644 --- a/support/include/nfs/nfs.h +++ b/support/include/nfs/nfs.h @@ -8,6 +8,7 @@ #include <netinet/in.h> #include <rpcsvc/nfs_prot.h> #include <nfs/export.h> +#include <limits.h> #define NFS3_FHSIZE 64 #define NFS_FHSIZE 32 @@ -16,7 +17,7 @@ #define NFSD_MAXVERS 4 #define NFS4_MINMINOR 1 -#define NFS4_MAXMINOR 2 +#define NFS4_MAXMINOR WORD_BIT struct nfs_fh_len { int fh_size; |