[PATCH] nfsd: default to kernel default for minorversion 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: J. Bruce Fields <bfields@xxxxxxxxxxxxxx>

The current kernel code should not be enabled by default, because it
does not yet attempt to be a conform completely to the rfc; for example,
some required pieces of protocol are missing.

Therefore the kernel defaults to leaving minorversion1 off.  When the
code matures sufficiently, that default will change.

That kernel default becomes meaningless if nfs-utils always explicitly
turns 4.1 on or off.  So, nfs-utils should by default do nothing.

Early adopters that want to turn on NFSv4.1 explicitly can still do so
using

	echo "+4.1" >/proc/fs/nfsd/versions

Signed-off-by: J.  Bruce Fields <bfields@xxxxxxxxxxxxxx>
---
 utils/nfsd/nfssvc.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c
index 7bbbaba..1fb420d 100644
--- a/utils/nfsd/nfssvc.c
+++ b/utils/nfsd/nfssvc.c
@@ -239,10 +239,9 @@ nfssvc_setvers(unsigned int ctlbits, int minorvers4)
 		return;
 
 	n = minorvers4 >= 0 ? minorvers4 : -minorvers4;
-	if (n >= NFSD_MINMINORVERS4 && n <= NFSD_MAXMINORVERS4)
-		    off += snprintf(ptr+off, sizeof(buf) - off, "%c4.%d",
-				    minorvers4 > 0 ? '+' : '-',
-				    n);
+	if (minorvers4 < 0 && n >= NFSD_MINMINORVERS4
+			   && n <= NFSD_MAXMINORVERS4)
+		    off += snprintf(ptr+off, sizeof(buf) - off, "-4.%d", n);
 	for (n = NFSD_MINVERS; n <= NFSD_MAXVERS; n++) {
 		if (NFSCTL_VERISSET(ctlbits, n))
 		    off += snprintf(ptr+off, sizeof(buf) - off, "+%d ", n);
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux