From owner-svn-src-all@freebsd.org Thu Mar 5 14:29:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7A3026B10E; Thu, 5 Mar 2020 14:29:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YCn22hjJz3ykZ; Thu, 5 Mar 2020 14:29:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 0489C1E96C; Thu, 5 Mar 2020 14:29:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58:0:6406:8b05:ca3a:6fd6] (unknown [IPv6:2001:470:7a58:0:6406:8b05:ca3a:6fd6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 2979E2D03C; Thu, 5 Mar 2020 15:29:24 +0100 (CET) Subject: Re: svn commit: r358655 - head/sbin/mount_nfs To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003042227.024MRGsW072613@repo.freebsd.org> From: Dimitry Andric Message-ID: <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> Date: Thu, 5 Mar 2020 15:29:23 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003042227.024MRGsW072613@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 14:29:26 -0000 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