]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix the pNFS server for a case where mirror level equals number of DSs.
authorrmacklem <rmacklem@FreeBSD.org>
Fri, 29 Jun 2018 12:41:36 +0000 (12:41 +0000)
committerrmacklem <rmacklem@FreeBSD.org>
Fri, 29 Jun 2018 12:41:36 +0000 (12:41 +0000)
commit9892d91051813b6bdb8c7966d746563d325ffd3f
tree627fbac23263e0c2d710fadadb75c4daf22d2a66
parent8cf410ad281f66685b38ff3a7e6732971191c2ba
Fix the pNFS server for a case where mirror level equals number of DSs.

If a pNFS service was set up where the number of DSs equals the mirror level
and then a DS was disabled, the service would create files with duplicate
entries for the same DS. This bug occurred because I didn't realize that
TAILQ_FOREACH_FROM() would start at the beginning of the list when the
inital value of the variable was NULL.
This patch also changes the pNFS server DS file creation code so that it
creates entrie(s) with 0.0.0.0 IP address when it cannot create mirror level
files due to lack of DSs.
The patch only affects the pNFS service and only when it was created with
a number of DSs equal to the mirror level and mirroring is enabled.
sys/fs/nfsserver/nfs_nfsdport.c