Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1180845ybp; Fri, 11 Oct 2019 10:07:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTqYoGGDCFmuoRmrEA54bTcgsiVTQLzYQz5r7eq8S7X3dgZzSsI29zrB9Bk3FjbZey2jC0 X-Received: by 2002:a50:fc9a:: with SMTP id f26mr14421543edq.217.1570813665436; Fri, 11 Oct 2019 10:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570813665; cv=none; d=google.com; s=arc-20160816; b=jtz1ZGh7yQ5RD74oNFYFGdGLWzL7PfuEZmwYbrl4+QZjEu5Py1unmetmqVrmM9DW2h N+hRjEqWXCzwhtn89EJEEv2zRJ0ABKn9qT/bgdFvdgEzhi558VjhMgpoZGsu5Zd7ep0i TEvl32e5ss+3XvsNajgiw8zmvZbYG6sJJ/sJjESG5piDMC1La1mlE2t2pzpK5GgQ3Nrj 3dUi52A+s9IEQLLVo/UbryVBZ9N1RFQNwN6FjJ5+S9OKgCgmw5JbaB2vunVg6Xf7JR/Q vAYCV+mogupfOEf7aKnUQjeHaTuehqSKIgnyy0D/ol0+sv3v3uVUm+OuPXMedAP6WjW4 KpUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:from:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date; bh=Xh1P4m21Rxgmw33Rgo1n2Eh2vc4piiNiDie0F4HVuhw=; b=XYsJqnE8jMnI1SLOWZcNFD2PsXTboGkfXxP6dR917bRCaeooY42f7hVElN0JETs53O OwDMpqO2Vk3ICKYfrA2MlFMyutANrEXsh+hrquTMp1ebRDAulnEXW0yPcsGiOXUHNNqE 2qh8LGuRfK92GgSJp6gpsuv9MrMd8Qswgz2en/hc3hDCGPaF83QDJKl7fwQF0zc6qxB8 0xiXdwtFircsN8fzaomo0+LT0xxTbeFJ/b093ruHNaMXyiOWhcIFfvkFhY7rx/7zmKYQ n3iRfZ25uQlCrVdecLOnn8zIYeD4ZStSSPfgjW6t+obl5BKocmAshGAstP2O+McDGfFD UBEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gg17si5568239ejb.294.2019.10.11.10.07.16; Fri, 11 Oct 2019 10:07:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-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-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728288AbfJKRHK (ORCPT + 99 others); Fri, 11 Oct 2019 13:07:10 -0400 Received: from fieldses.org ([173.255.197.46]:59064 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728086AbfJKRHK (ORCPT ); Fri, 11 Oct 2019 13:07:10 -0400 Received: by fieldses.org (Postfix, from userid 2815) id EDD7C1C97; Fri, 11 Oct 2019 13:07:09 -0400 (EDT) Date: Fri, 11 Oct 2019 13:07:09 -0400 To: Thomas Deutschmann Cc: linux-nfs@vger.kernel.org Subject: Re: nfs-utils: v3 mounts broken due to statx() returning EINVAL Message-ID: <20191011170709.GE19318@fieldses.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) From: bfields@fieldses.org (J. Bruce Fields) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, Oct 08, 2019 at 10:23:56PM +0200, Thomas Deutschmann wrote: > Hi, > > we have some user reporting that NFS v3 mounts are broken > when using glibc-2.29 and linux-4.9.x (4.9.128) because > statx() with mask=STATX_BASIC_STATS returns EINVAL. > > Looks like this isn't happening with newer kernels. > > The following workaround was confirmed to be working: > > --- a/support/misc/xstat.c 2019-06-24 21:31:55.260371592 +0200 > +++ b/support/misc/xstat.c 2019-06-24 21:32:29.098777436 +0200 > @@ -47,6 +47,8 @@ > statx_copy(statbuf, &stxbuf); > return 0; > } > + if (errno == EINVAL) > + errno = ENOSYS; > if (errno == ENOSYS) > statx_supported = 0; > } else > > > Bug: https://bugs.gentoo.org/688644 > > At the moment I have no clue whether this is kernel/glibc or > nfs-utils related; if the patch is safe to apply... Well, sounds like nfs-utils started using statx in 2.4.1. And just the fact that varying the kernel version makes it sound like there was a kernel bug causing an EINVAL return in this case, and that bug got fixed. One way to confirm might be running mount under strace and looking for that EINVAL return. I might also try looking through the kernel logs for nfs or the stat code to see if there's a mention of this (didn't see it on a quick look.) Or try bisecting kernel versions to find the one where this was fixed. --b. > > Any help is appreciated. Thanks! > > > -- > Regards, > Thomas Deutschmann / Gentoo Linux Developer > C4DD 695F A713 8F24 2AA1 5638 5849 7EE5 1D5D 74A5 >