svn commit: r358655 - head/sbin/mount_nfs

Dimitry Andric dim at FreeBSD.org
Thu Mar 5 14:29:26 UTC 2020


On 2020-03-04 23:27, Gleb Smirnoff wrote:
> Author: glebius
> Date: Wed Mar  4 22:27:16 2020
> New Revision: 358655
> URL: https://svnweb.freebsd.org/changeset/base/358655
> 
> Log:
>    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.

At least on i386, this causes a -Werror warning:

sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' to 'struct 
if_msghdr *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
                         ifm = (struct if_msghdr *)buf;
                               ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

In practice I don't think the buffer can ever get misaligned, so can you 
please add a NO_WCAST_ALIGN= to the Makefile?

-Dimitry


More information about the svn-src-all mailing list