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)
Mon, Feb 3, 12:40 AM
Unknown Object (File)
Sun, Jan 26, 3:52 AM
Unknown Object (File)
Sat, Jan 25, 7:12 PM
Unknown Object (File)
Fri, Jan 24, 8:18 PM
Unknown Object (File)
Sat, Jan 18, 5:28 PM
Unknown Object (File)
Jan 11 2025, 11:57 PM
Unknown Object (File)
Dec 18 2024, 2:14 PM
Unknown Object (File)
Dec 2 2024, 9:59 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.