From patchwork Tue Nov 4 17:57:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Dickson X-Patchwork-Id: 5230521 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7F369C11AC for ; Tue, 4 Nov 2014 18:35:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9CBCF20166 for ; Tue, 4 Nov 2014 18:35:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 78D2720160 for ; Tue, 4 Nov 2014 18:35:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751912AbaKDSfu (ORCPT ); Tue, 4 Nov 2014 13:35:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54973 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751804AbaKDSft (ORCPT ); Tue, 4 Nov 2014 13:35:49 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sA4IZl2p027246 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Nov 2014 13:35:47 -0500 Received: from smallhat.boston.devel.redhat.com (smallhat.boston.devel.redhat.com [10.19.60.65]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sA4HvP7H021639; Tue, 4 Nov 2014 12:57:25 -0500 Message-ID: <54591385.2080007@RedHat.com> Date: Tue, 04 Nov 2014 12:57:25 -0500 From: Steve Dickson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Henrique Martins CC: linux-nfs@vger.kernel.org Subject: Re: F20 nfs-utils exportfs patch References: <14393.1409936528@monster.martins.cc> <15531.1414780435@monster.martins.cc> In-Reply-To: <15531.1414780435@monster.martins.cc> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Re-posting with the patch inlined with comments. On 10/31/2014 02:33 PM, Henrique Martins wrote: > > Re-sending this patch, at Steve Dickson's request. Thanks... but... :-) There is no Signed-off-by: line as described in https://www.kernel.org/doc/Documentation/SubmittingPatches and there is no description section as the above document describes Also, please in-line the patch in the email instead of attaching them... I just makes is easier to review. > > -- Henrique > > -------------------------------------------------------------- > > Attaching path to exportfs that: > - in client.c/client_lookup: > changes the (x)log level for unresolvable entries in > /etc/exports from L_ERROR to L_WARNING, > - in hostname.c/host_addrinfo: > changes the (x)log level for unresolvable entries in > /etc/exports from D_GENERAL to D_PARSE, > - in export.c/export_read: > counts the number of exported volume entries and > generates a (x)log L_ERROR if no volumes are exported. > > Built and tested on a Fedora 20 system. > > -------------------------------------------------------------- > When testing the patch, I notice two "Failed to resolve" warning messages are logged for each export... Its not because of this patch but I wounder how that could be cleaned up a bit.... So please re-post with in correct patch format and we will be good to go! steved. --- 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 --- nfs-utils-1.3.0/support/export/client.c.orig 2014-09-05 08:21:37.568364360 -0700 +++ nfs-utils-1.3.0/support/export/client.c 2014-09-05 08:21:41.709451778 -0700 @@ -277,7 +277,7 @@ if (htype == MCL_FQDN && !canonical) { ai = host_addrinfo(hname); if (!ai) { - xlog(L_ERROR, "Failed to resolve %s", hname); + xlog(L_WARNING, "Failed to resolve %s", hname); goto out; } hname = ai->ai_canonname; --- nfs-utils-1.3.0/support/export/hostname.c.orig 2014-09-05 08:09:07.387551291 -0700 +++ nfs-utils-1.3.0/support/export/hostname.c 2014-09-05 08:09:13.799573723 -0700 @@ -175,11 +175,11 @@ case 0: return ai; case EAI_SYSTEM: - xlog(D_GENERAL, "%s: failed to resolve %s: (%d) %m", + xlog(D_PARSE, "%s: failed to resolve %s: (%d) %m", __func__, hostname, errno); break; default: - xlog(D_GENERAL, "%s: failed to resolve %s: %s", + xlog(D_PARSE, "%s: failed to resolve %s: %s", __func__, hostname, gai_strerror(error)); break; } Just curious as to why these changes... What does D_PARSE do that D_GENERAL does not? --- nfs-utils-1.3.0/support/export/export.c.orig 2014-03-25 08:12:07.000000000 -0700 +++ nfs-utils-1.3.0/support/export/export.c 2014-09-05 09:23:37.424105125 -0700 @@ -76,15 +76,22 @@ struct exportent *eep; nfs_export *exp; + int volumes = 0; + setexportent(fname, "r"); while ((eep = getexportent(0,1)) != NULL) { exp = export_lookup(eep->e_hostname, eep->e_path, 0); - if (!exp) - export_create(eep, 0); + if (!exp) { + exp = export_create(eep, 0); + if (exp) + volumes++; + } else warn_duplicated_exports(exp, eep); } endexportent(); + if (volumes == 0) + xlog(L_ERROR, "no or all unresolvable export entries"); } /**