Page MenuHomeFreeBSD

mount_nfs: retry when interface state changes to IFF_UP and link up
ClosedPublic

Authored by glebius on Mar 3 2020, 12:02 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 14, 2:32 AM
Unknown Object (File)
Sun, Apr 14, 12:43 AM
Unknown Object (File)
Mar 22 2024, 8:32 PM
Unknown Object (File)
Mar 22 2024, 8:32 PM
Unknown Object (File)
Mar 22 2024, 8:32 PM
Unknown Object (File)
Mar 9 2024, 4:44 AM
Unknown Object (File)
Jan 4 2024, 6:36 AM
Unknown Object (File)
Jan 4 2024, 6:36 AM
Subscribers

Details

Summary

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 required for interface to get up.

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

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks ok to me. I don't know enough about networking
to review rtm_ifinfo_sleep().

Maybe someone conversant with the net/routing code
can review it?

This revision was not accepted when it landed; it landed in state Needs Review.Mar 4 2020, 10:27 PM
This revision was automatically updated to reflect the committed changes.