From patchwork Wed Dec 21 00:19:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 9482409 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3235A601C0 for ; Wed, 21 Dec 2016 00:20:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2184A28118 for ; Wed, 21 Dec 2016 00:20:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 138042839A; Wed, 21 Dec 2016 00:20:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C325328118 for ; Wed, 21 Dec 2016 00:20:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753387AbcLUAUX (ORCPT ); Tue, 20 Dec 2016 19:20:23 -0500 Received: from mx2.suse.de ([195.135.220.15]:44887 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752508AbcLUAUW (ORCPT ); Tue, 20 Dec 2016 19:20:22 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 8EF64ABD3; Wed, 21 Dec 2016 00:20:21 +0000 (UTC) From: NeilBrown To: Steve Dickson Date: Wed, 21 Dec 2016 11:19:14 +1100 Subject: [PATCH 4/4] mountd: delay reading etab until first request arrives. Cc: linux-nfs@vger.kernel.org, "J. Bruce Fields" Message-ID: <148227955423.31345.17642862410755193193.stgit@noble> In-Reply-To: <148227940052.31345.1974080582264239934.stgit@noble> References: <148227940052.31345.1974080582264239934.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Reading etab may require hostname lookup, so it is not reliable until the network is active. But we want mountd to start before that so that it is ready when the very first NFS request arrives. So delay reading etab until that request arrives, by which time the network must be online so hopefully hostname look will be reliable. An alternate would be to delay starting mountd and nfsd until the network is on-line, but that will often be an unnecessary delay. Signed-off-by: NeilBrown --- utils/mountd/mountd.c | 2 -- 1 file changed, 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c index 5d9466f5c651..61699e62a6f0 100644 --- a/utils/mountd/mountd.c +++ b/utils/mountd/mountd.c @@ -852,8 +852,6 @@ main(int argc, char **argv) sa.sa_handler = sig_hup; sigaction(SIGHUP, &sa, NULL); - auth_init(); - if (!foreground) { /* We first fork off a child. */ if ((c = fork()) > 0)