[Midnightbsd-cvs] src [11868] trunk/sys/fs/nfsserver/nfs_nfsdserv.c: Fix the eir_server_scope reply argument for NFSv4.1 ExchangeID.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Jul 15 14:10:41 EDT 2018
Revision: 11868
http://svnweb.midnightbsd.org/src/?rev=11868
Author: laffer1
Date: 2018-07-15 14:10:40 -0400 (Sun, 15 Jul 2018)
Log Message:
-----------
Fix the eir_server_scope reply argument for NFSv4.1 ExchangeID.
In the reply to an ExchangeID operation, the NFSv4.1 server returns a
"scope" value (eir_server_scope). If this value is the same, it indicates
that two servers share state, which is never the case for FreeBSD servers.
As such, the value needs to be unique and it was without this patch.
However, I just found out that it is not supposed to change when the
server reboots and without this patch, it did change.
This patch fixes eir_server_scope so that it does not change when the
server is rebooted.
The only affect not having this patch has is that Linux clients don't
reclaim opens and locks after a server reboot, which meant they lost
any byte range locks held before the server rebooted.
It only affects NFSv4.1 mounts and the FreeBSD NFSv4.1 client was not
affected by this bug.
Obtained from: FreeBSD svn 334633
Modified Paths:
--------------
trunk/sys/fs/nfsserver/nfs_nfsdserv.c
Modified: trunk/sys/fs/nfsserver/nfs_nfsdserv.c
===================================================================
--- trunk/sys/fs/nfsserver/nfs_nfsdserv.c 2018-07-15 18:08:23 UTC (rev 11867)
+++ trunk/sys/fs/nfsserver/nfs_nfsdserv.c 2018-07-15 18:10:40 UTC (rev 11868)
@@ -3801,9 +3801,9 @@
txdr_hyper(owner_minor, tl); /* Minor */
(void)nfsm_strtom(nd, nd->nd_cred->cr_prison->pr_hostuuid,
strlen(nd->nd_cred->cr_prison->pr_hostuuid)); /* Major */
- NFSM_BUILD(tl, uint32_t *, 3 * NFSX_UNSIGNED);
- *tl++ = txdr_unsigned(NFSX_UNSIGNED);
- *tl++ = time_uptime; /* Make scope a unique value. */
+ (void)nfsm_strtom(nd, nd->nd_cred->cr_prison->pr_hostuuid,
+ strlen(nd->nd_cred->cr_prison->pr_hostuuid)); /* Scope */
+ NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED);
*tl = txdr_unsigned(1);
(void)nfsm_strtom(nd, "freebsd.org", strlen("freebsd.org"));
(void)nfsm_strtom(nd, version, strlen(version));
More information about the Midnightbsd-cvs
mailing list