Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5943457pxb; Mon, 14 Feb 2022 11:17:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtxkvrbtqtqVcDcGQqgQp4BkWBVpJmnPL17y8N3Lw0RSWCSzhcNnZMfTuSTgfzroyfPYmC X-Received: by 2002:a62:b618:: with SMTP id j24mr569927pff.42.1644866270532; Mon, 14 Feb 2022 11:17:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644866270; cv=none; d=google.com; s=arc-20160816; b=FVOvlb8s0tlBB8M1JxMbkDGZJYl6NaA0GZuAeBvNmW0+QPhWJhJz3pGJTSpjrLLZcq gf1PKGaDjxRqyyGqvPCGwPCbLflXS9SYgPNDhR/ypImWy5/qlCEgzaX4xn50ZIWQYHWj XaQIES5WARos+VARNCvyAmomPFBnO47ZNFjOF6vZEM5kRtjJ0/hTuyiEnXv9ewds7tLd LeQdKJjFZa89Z1oiVzwe+G4SQ/Badi6frgBFn9IwNjFz0CuLMSvcftazExQEutVAUiiO SH7U1kjXbhoLV64+1PIuUXsYg9zhi7Lkd00tiFGdcviY0jM3NVaYGzAbIeG0kgLml5sG 8RHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=lGkfpnpBj21E7cKSgX2esb5JBVyU70o0K22jBg66E3w=; b=hZNgGhh3L0jqT3KL/f6fAM0gnUpbVDn/Jvk9FBWvwLOnbNDhHtjCu5zWYeT8BtHCAd J5BnVS6Ft0vClJj1CG1/HpvZwNlPuf82ZLQS5YHMj0XrtdSGCXlQBg7JnHsnDeBeSSYn kJ7nIIkw7VYUAr8IQc1QYTpJ/QgG7lQXtnL+bUSJQoR+cH8CyrUATO9hK9QUg/IXePer Xar8aOrld7ylUmrfG0WukSZu7YYiybm0QQeoPNeZH7CPfnJ2tEh7idSuGJQx3y9t6xnU CpS4/RbynpdErXQoPPb270qtjufA62E7vd6UzvxZIS1TXDcTSIPvE46PLNFnMDO/yrW+ BtJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dQLCWRYS; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id oo13si13941244pjb.149.2022.02.14.11.17.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 11:17:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dQLCWRYS; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5F539C4E2F; Mon, 14 Feb 2022 11:09:57 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236251AbiBNQUb (ORCPT + 99 others); Mon, 14 Feb 2022 11:20:31 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233555AbiBNQUb (ORCPT ); Mon, 14 Feb 2022 11:20:31 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 69C4C4A3CA for ; Mon, 14 Feb 2022 08:20:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644855622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lGkfpnpBj21E7cKSgX2esb5JBVyU70o0K22jBg66E3w=; b=dQLCWRYSQf0RQSKC1T+JuzbdZa0nBaevqtR2tD2cdjbZlOuOHV+ObtPJKqCOeDfLGpBmhd 2b6s7k90lnU/CYujU/y9aqu4PI8lEMlMs9K6eBAM+mGxFzqdMqCKml0XsV5EkT1nK+4QTS Jxj2LZDfb9HBofxkYcII6797Mj6cOYY= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-539-BoXmvULoP6SQCIVbDIQpXQ-1; Mon, 14 Feb 2022 11:20:19 -0500 X-MC-Unique: BoXmvULoP6SQCIVbDIQpXQ-1 Received: by mail-qk1-f197.google.com with SMTP id bk12-20020a05620a1a0c00b00508b8a58a62so9414686qkb.20 for ; Mon, 14 Feb 2022 08:20:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=lGkfpnpBj21E7cKSgX2esb5JBVyU70o0K22jBg66E3w=; b=5UQIhdAe1ORZ8bM8JESQ/38RpWPK6hpF/4riYZJrOuj0lXXs1T5ecgre1Ji8GcqbCZ P5rapviule33O6Qq5mIvDea7JhlN/Rp2iQXrJJdDCHC1fmW9MGXg8mAj+6zG6AG28XgM S0foZuNfGzhsfPEMR3os11/Q8ithvkBm94PxSKdnhKlxQXn4qrdNKolSf32yB40R+bRZ 6s02Brwd0xTVOtsWJvkErMggHYOtXk4+uIIQ7U/cW4B/ORL+zdULckr+GFA1LldBk4vS qsu+ptN2norIAr59P2WEpmhGqayg0U9tH5Lggm73HQcMGMVLXVHfnm5OktZHRhSIOkS8 OrLA== X-Gm-Message-State: AOAM531vCecsN48+eBE6OGdTe53Dpq3LeAs9mGdJfXwJzG029+0A2fRX bhNEtVrYgm3RYUTQVXcpZNzXVnu6hVLUAAKCUrVetUGQ7UZcpT+f0ZDIbo3y1OQLI5bWBwdpTJa D+FxPnWSW+RpyE+DKdi9C X-Received: by 2002:ad4:5945:: with SMTP id eo5mr244810qvb.77.1644855618543; Mon, 14 Feb 2022 08:20:18 -0800 (PST) X-Received: by 2002:ad4:5945:: with SMTP id eo5mr244795qvb.77.1644855618251; Mon, 14 Feb 2022 08:20:18 -0800 (PST) Received: from [172.31.1.6] ([70.105.253.180]) by smtp.gmail.com with ESMTPSA id h13sm7331568qkp.77.2022.02.14.08.20.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Feb 2022 08:20:17 -0800 (PST) Message-ID: <69301a48-3afc-9082-bc76-cdb5d3aeaf0c@redhat.com> Date: Mon, 14 Feb 2022 11:20:16 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] Fix error reporting for already mounted shares. Content-Language: en-US To: Rohan Sable , linux-nfs@vger.kernel.org Cc: rohanjsable@gmail.com References: From: Steve Dickson In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 2/3/22 8:17 AM, Rohan Sable wrote: > When mount is triggered for an already mounted > share (using auto negotiation), it displays > "mount.nfs: Protocol not supported" or > "mount.nfs: access denied by server while mounting" > instead of EBUSY. This easily causes confusion if > the mount was not tried verbose : > > [root@rsable ~]# mount 127.0.0.1:/export /mnt > mount.nfs: Protocol not supported > > [root@rsable ~]# mount -v 127.0.0.1:/export /mnt > mount.nfs: timeout set for Mon Apr 5 16:03:53 2021 > mount.nfs: trying text-based options 'vers=4.2,addr=127.0.0.1,clientaddr=127.0.0.1' > mount.nfs: mount(2): Protocol not supported > mount.nfs: trying text-based options 'vers=4,minorversion=1,addr=127.0.0.1,clientaddr=127.0.0.1' > mount.nfs: mount(2): Protocol not supported > mount.nfs: trying text-based options 'vers=4,addr=127.0.0.1,clientaddr=127.0.0.1' > mount.nfs: mount(2): Protocol not supported > mount.nfs: trying text-based options 'addr=127.0.0.1' > mount.nfs: prog 100003, trying vers=3, prot=6 > mount.nfs: trying 127.0.0.1 prog 100003 vers 3 prot TCP port 2049 > mount.nfs: prog 100005, trying vers=3, prot=17 > mount.nfs: trying 127.0.0.1 prog 100005 vers 3 prot UDP port 20048 > mount.nfs: mount(2): Device or resource busy << actual error > mount.nfs: Protocol not supported > > [root@rsable ~]# mount rsable76server:/testshare /mnt > mount.nfs: access denied by server while mounting rsable76server:/testshare > > [root@rsable ~]# mount rsable76server:/testshare /mnt -v > mount.nfs: timeout set for Mon Jan 17 13:36:16 2022 > mount.nfs: trying text-based options 'vers=4.1,addr=192.168.122.58,clientaddr=192.168.122.82' > mount.nfs: mount(2): Permission denied > mount.nfs: trying text-based options 'vers=4.0,addr=192.168.122.58,clientaddr=192.168.122.82' > mount.nfs: mount(2): Permission denied > mount.nfs: trying text-based options 'addr=192.168.122.58' > mount.nfs: prog 100003, trying vers=3, prot=6 > mount.nfs: trying 192.168.122.58 prog 100003 vers 3 prot TCP port 2049 > mount.nfs: prog 100005, trying vers=3, prot=17 > mount.nfs: trying 192.168.122.58 prog 100005 vers 3 prot UDP port 20048 > mount.nfs: mount(2): Device or resource busy << actual error > mount.nfs: access denied by server while mounting rsable76server:/testshare > > Signed-off-by: Rohan Sable > Signed-off-by: Yongcheng Yang Committed... steved. > --- > utils/mount/stropts.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c > index 3c4e218a..573df6ee 100644 > --- a/utils/mount/stropts.c > +++ b/utils/mount/stropts.c > @@ -973,7 +973,9 @@ fall_back: > if ((result = nfs_try_mount_v3v2(mi, FALSE))) > return result; > > - errno = olderrno; > + if (errno != EBUSY || errno != EACCES) > + errno = olderrno; > + > return result; > } >