From patchwork Thu Sep 7 15:14:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Sorenson X-Patchwork-Id: 9942425 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 BDFEF602CC for ; Thu, 7 Sep 2017 15:14:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDC4628715 for ; Thu, 7 Sep 2017 15:14:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B185428710; Thu, 7 Sep 2017 15:14:53 +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.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 B164028715 for ; Thu, 7 Sep 2017 15:14:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753830AbdIGPOq (ORCPT ); Thu, 7 Sep 2017 11:14:46 -0400 Received: from mail-qk0-f182.google.com ([209.85.220.182]:36119 "EHLO mail-qk0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753819AbdIGPOp (ORCPT ); Thu, 7 Sep 2017 11:14:45 -0400 Received: by mail-qk0-f182.google.com with SMTP id z143so27671100qkb.3 for ; Thu, 07 Sep 2017 08:14:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=JNxD9RC5PXUVP60vffNCYnI33Zru6ffWloWnMs0JQeY=; b=NSCg2ujQeZmLFsnoNZvPmlCnXhqrcjKG/33ujkfolftV4ZDyJvm4Gd3xDI3b9ZZAOp 4ixRRrnLhBxgX3uVyjG7ezsGg5u6qYOOo/Dq8dhS4Q91JKd2pYO1j4RoRplTcbXiGN57 yzGPpanY47CsbjuhX8GBw/lONTwau/MQMgAp8A8g8BN1idpvr6NYCAR5clXs+ECp2DZm 4/lMor7H/W8PoJ4iZqTVEJeIQV9dlQh5ycFf3uRFmveJWGwQuCSdcDzo+I/uDNELWx8R dI1Sau2mWnM61kFmUtPODx8HQkAVq03sESlUVBjoFxUQXkORkd8gStojkc0pkk9EjArg 0l4A== X-Gm-Message-State: AHPjjUgFJUUxbj2EZP14b636Gv8fWrnkZMOywHFZw5GwEphtyQco7uBT uwzUABoJOv23T7+FtEpoJw== X-Google-Smtp-Source: AOwi7QCQ31Q/R5Cl34hu88FsSrj8e8HHsnSGtGxh1Uf5pjxerD++p0vHnMsaJMxtmyY8rofErDRBgw== X-Received: by 10.55.162.7 with SMTP id l7mr3878385qke.154.1504797284258; Thu, 07 Sep 2017 08:14:44 -0700 (PDT) Received: from hut.sorensonfamily.com ([2603:300a:2104:9500:4eeb:42ff:fec7:ee1c]) by smtp.gmail.com with ESMTPSA id y31sm1818242qta.83.2017.09.07.08.14.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Sep 2017 08:14:43 -0700 (PDT) To: linux-nfs@vger.kernel.org From: Frank Sorenson Subject: [PATCH RFC] nfs-utils: mount: handle EACCES during version negotiation Message-ID: <279c0751-8284-5289-3407-129dc9c9d3e8@redhat.com> Date: Thu, 7 Sep 2017 10:14:42 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Language: en-US 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 mount() can return EACCES for servers which permit 4.0 but are configured not to allow 4.1 This is currently only handled by the default case, so these mounts fail without retrying a lower minor. Add handling for EACCES to be retried with a lower minor version. Signed-off-by: Frank Sorenson --- utils/mount/stropts.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c index 1d30d34..4401314 100644 --- a/utils/mount/stropts.c +++ b/utils/mount/stropts.c @@ -862,6 +862,9 @@ check_result: case EINVAL: /* A less clear indication that our client * does not support NFSv4 minor version. */ + case EACCES: + /* An unclear indication that the server + * may not support NFSv4 minor version. */ if (mi->version.v_mode != V_SPECIFIC) { if (mi->version.minor > 0) { mi->version.minor--;