svn commit: r322379 - projects/pnfs-planb-server/sys/fs/nfsserver
Rick Macklem
rmacklem at FreeBSD.org
Thu Aug 10 22:00:10 UTC 2017
Author: rmacklem
Date: Thu Aug 10 22:00:08 2017
New Revision: 322379
URL: https://svnweb.freebsd.org/changeset/base/322379
Log:
Add some handling of mirror limits.
Modified:
projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c
Modified: projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c
==============================================================================
--- projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c Thu Aug 10 21:57:59 2017 (r322378)
+++ projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c Thu Aug 10 22:00:08 2017 (r322379)
@@ -6839,7 +6839,9 @@ nfsrv_setdsserver(char *dspathp, char *mirrorp, NFSPRO
i = 1;
TAILQ_FOREACH(tds, &mds->nfsdev_mirrors, nfsdev_list)
i++;
- if (i > nfsrv_maxpnfsmirror)
+ if (i > NFSDEV_MAXMIRRORS)
+ error = ENXIO;
+ else if (i > nfsrv_maxpnfsmirror)
nfsrv_maxpnfsmirror = i;
break;
}
@@ -6940,6 +6942,7 @@ nfsrv_createdevids(struct nfsd_nfsd_args *args, NFSPRO
dnshostp = args->dnshost;
dspathp = args->dspath;
mirrorp = args->mirror;
+ nfsrv_maxpnfsmirror = 1;
if (addrp == NULL || dnshostp == NULL || dspathp == NULL ||
mirrorp == NULL)
return (0);
More information about the svn-src-projects
mailing list