Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9177754ybl; Fri, 17 Jan 2020 07:34:15 -0800 (PST) X-Google-Smtp-Source: APXvYqxwIB6kKiJGeiYHLuN+hdPlvvrSsM7MqaxU3v7cnJjkUlnRRMDJxOw+1KLqDPT6iC9K1Ix6 X-Received: by 2002:aca:1b19:: with SMTP id b25mr3908862oib.24.1579275255028; Fri, 17 Jan 2020 07:34:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579275255; cv=none; d=google.com; s=arc-20160816; b=QhJnv1z2AknRSGrr0D8R+OV9K7FnYhzFkRQfZ5DrAWAo4TYBx2mUsowauAQ11k9A7X NP0sdrRe3Mv+GmcLfwrgn/WJYE8ocJq6skXq7h7NVT8lnGopqgTWlf06iCyZMxo7ZKuw P6AWGeeV0/f08JAIQR0qPKFIbcURUaliyuv7D9My7vXJ1TghSL75b/iP9/TgBf8ov6P0 NDaNBht8hNbSK+0kTWQScfK3oIxkcwQLOWQh3P3zioufwdYcz7H2C1pFma7/g17gC/2S zjNM6eJJFJbkBqPhnveHUCDjdD62WH+DG+dltgPNwzbm3vUYiS9Y9q0WAvXeTzfpfFpg dM7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:in-reply-to:mime-version:references :message-id:subject:cc:to:from:date; bh=OljKvbnNbGri7tavKPWerQConVP3bTKnwJs1oy4eQ9E=; b=boUrq3u94g4PxfDIWZlJDv9waErTEKMwwF6b8E3BLQlUCa5MWcTk9n6au7uMxESbwq B1HWoRKJ0thLzIhqzsu0p81zWLgiuuBHjvKg+b3epwP7ef/FAOqTnnEecISZSYnopWna TjnPnzAQPVT3lebe/kB0kCExycdLThlqvKn4UHitYEi8h37bn9QqB36WeBj+0y+8wOjK AUpXktvoHnrtEH67ftiFUDblknKpnchTtFnDRRLfqKFt8KU9mwVNCnn/SgsQ6wB2JkYU rlBkSdT5rYh9zfEAhfXblMmb6eFC2yi3vlIZAyvVI2aVHPMJ3YBW4e6o7qjvqdUKoelj exrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t15si13725546oij.189.2020.01.17.07.34.02; Fri, 17 Jan 2020 07:34:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729195AbgAQPcO convert rfc822-to-8bit (ORCPT + 99 others); Fri, 17 Jan 2020 10:32:14 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:43708 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726942AbgAQPcN (ORCPT ); Fri, 17 Jan 2020 10:32:13 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-192-DZDUZOR_OCKUlzu7mSXGRA-1; Fri, 17 Jan 2020 10:32:10 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6DACE100551D; Fri, 17 Jan 2020 15:32:09 +0000 (UTC) Received: from aion.usersys.redhat.com (ovpn-126-23.rdu2.redhat.com [10.10.126.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 47864675AF; Fri, 17 Jan 2020 15:32:09 +0000 (UTC) Received: by aion.usersys.redhat.com (Postfix, from userid 1000) id 80DC71A00A4; Fri, 17 Jan 2020 10:32:08 -0500 (EST) Date: Fri, 17 Jan 2020 10:32:08 -0500 From: Scott Mayhew To: Trond Myklebust Cc: "dhowells@redhat.com" , "krzk@kernel.org" , "linux-nfs@vger.kernel.org" , "anna.schumaker@netapp.com" , "linux-kernel@vger.kernel.org" , "arnd@arndb.de" , "viro@zeniv.linux.org.uk" Subject: Re: [BISECT BUG] NFS v4 root not working after 6d972518b821 ("NFS: Add fs_context support.") Message-ID: <20200117153208.GB3111@aion.usersys.redhat.com> References: <20200117144055.GB3215@pi3> <433863.1579270803@warthog.procyon.org.uk> <461540.1579273958@warthog.procyon.org.uk> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: DZDUZOR_OCKUlzu7mSXGRA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aion.usersys.redhat.com Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 17 Jan 2020, Trond Myklebust wrote: > On Fri, 2020-01-17 at 15:12 +0000, David Howells wrote: > > Krzysztof Kozlowski wrote: > > > > > mount.nfs4 -o vers=4,nolock 192.168.1.10:/srv/nfs/odroidhc1 > > > /new_root > > > > Okay, it looks like the mount command makes two attempts at mounting. > > Firstly, it does this: > > > > > [ 22.938314] NFSOP 'source=192.168.1.10:/srv/nfs/odroidhc1' > > > [ 22.942638] NFSOP 'nolock=(null)' > > > [ 22.945772] NFSOP 'vers=4.2' > > > [ 22.948660] NFSOP 'addr=192.168.1.10' > > > [ 22.952350] NFSOP 'clientaddr=192.168.1.12' > > > [ 22.956831] NFS4: Couldn't follow remote path > > > > Which accepts the "vers=4.2" parameter as there's no check that that > > is > > actually valid given the configuration, but then fails > > later. Secondly, it > > does this: > > > > > [ 22.971001] NFSOP 'source=192.168.1.10:/srv/nfs/odroidhc1' > > > [ 22.975217] NFSOP 'nolock=(null)' > > > [ 22.978444] NFSOP 'vers=4' > > > [ 22.981265] NFSOP 'minorversion=1' > > > [ 22.984513] NFS: Value for 'minorversion' out of range > > > mount.nfs4: Numerical result out of range > > > > which fails because of the minorversion=1 specification, where the > > kernel > > config didn't enable NFS_V4_1. > > > > It looks like it ought to have failed prior to these patches in the > > same way: > > > > case Opt_minorversion: > > if (nfs_get_option_ul(args, &option)) > > goto out_invalid_value; > > if (option > NFS4_MAX_MINOR_VERSION) > > goto out_invalid_value; > > mnt->minorversion = option; > > break; > > > > It looks like someone changed the return value from the old EINVAL to > something else? The "Numerical result out of range" message above > suggests it has been changed to EOVERFLOW, which probably is not > supported by 'mount'. It's returning ERANGE... and nope, mount.nfs doesn't support it (see nfs_autonegotiate() in utils/mount/stropts.c). Changing it to return EINVAL fixes it: diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c index 429315c011ae..74508ed9aeec 100644 --- a/fs/nfs/fs_context.c +++ b/fs/nfs/fs_context.c @@ -769,8 +769,7 @@ static int nfs_fs_context_parse_param(struct fs_context *fc, out_invalid_address: return nfs_invalf(fc, "NFS: Bad IP address specified"); out_of_bounds: - nfs_invalf(fc, "NFS: Value for '%s' out of range", param->key); - return -ERANGE; + return nfs_invalf(fc, "NFS: Value for '%s' out of range", param->key); } /* I think I may have been running a hacked up version of mount.nfs before... because as soon as I updated my nfs-utils package it stopped working for me too. -Scott > > -- > Trond Myklebust > Linux NFS client maintainer, Hammerspace > trond.myklebust@hammerspace.com > >