]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
When a machine boots the NFS mounting script is executed after
authorglebius <glebius@FreeBSD.org>
Wed, 4 Mar 2020 22:27:16 +0000 (22:27 +0000)
committerglebius <glebius@FreeBSD.org>
Wed, 4 Mar 2020 22:27:16 +0000 (22:27 +0000)
commit795eb64a805dfc91a7cefa8df2c3b2dda3a98587
treece9cf895f3d884b29cd79aa1e3720e411cfdb255
parent14e2834895178f40975bea587f1a2c24bbdd23e3
When a machine boots the NFS mounting script is executed after
interfaces are configured, but for many interfaces (e.g. all Intel)
ifconfig causes link renegotiation, so the first attempt to mount
NFS always fails. After that mount_nfs sleeps for 30 seconds, while
only a couple seconds are actually required for interface to get up.

Instead of sleeping, do select(2) on routing socket and check if
some interface became UP and in this case retry immediately.

Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D23934
sbin/mount_nfs/mount_nfs.c