svn commit: r335968 - head/sys/fs/nfsserver
Rick Macklem
rmacklem at FreeBSD.org
Wed Jul 4 19:46:27 UTC 2018
Author: rmacklem
Date: Wed Jul 4 19:46:26 2018
New Revision: 335968
URL: https://svnweb.freebsd.org/changeset/base/335968
Log:
Fix the pNFS server so that it handles the "#mds_path" check for mirrors.
The recently added feature of the pNFS server will set an fsid for the
MDS file system to define the file system a DS should store files for.
For a case where a DS handling all file systems has failed, it was possible
for the code to check for a mirror with a specified fs, even though
nfsdev_mdsisset was 0, possibly causing a false successful check for a mirror.
This patch adds a check for nfsdev_mdsisset != 0 to avoid this.
It only affects the pNFS server for a rare case. Found via code inspection.
Modified:
head/sys/fs/nfsserver/nfs_nfsdstate.c
Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdstate.c Wed Jul 4 19:29:06 2018 (r335967)
+++ head/sys/fs/nfsserver/nfs_nfsdstate.c Wed Jul 4 19:46:26 2018 (r335968)
@@ -7597,7 +7597,7 @@ nfsrv_delds(char *devid, NFSPROC_T *p)
}
if (fndds->nfsdev_mdsisset == 0 && nfsrv_faildscnt > 0)
fndmirror = 1;
- else {
+ else if (fndds->nfsdev_mdsisset != 0) {
/* For the fsid is set case, search for a mirror. */
TAILQ_FOREACH(ds, &nfsrv_devidhead, nfsdev_list) {
if (ds != fndds && ds->nfsdev_nmp != NULL &&
@@ -8463,7 +8463,7 @@ nfsrv_findmirroredds(struct nfsmount *nmp)
return (fndds);
if (fndds->nfsdev_mdsisset == 0 && nfsrv_faildscnt > 0)
fndmirror = 1;
- else {
+ else if (fndds->nfsdev_mdsisset != 0) {
/* For the fsid is set case, search for a mirror. */
TAILQ_FOREACH(ds, &nfsrv_devidhead, nfsdev_list) {
if (ds != fndds && ds->nfsdev_nmp != NULL &&
More information about the svn-src-all
mailing list