From: Doug Nazar <nazard@nazar.ca>
To: linux-nfs@vger.kernel.org
Cc: "J. Bruce Fields" <bfields@redhat.com>,
Thomas Deutschmann <whissi@gentoo.org>,
Steve Dickson <steved@redhat.com>
Subject: Re: nfs-utils: v3 mounts broken due to statx() returning EINVAL
Date: Tue, 26 Nov 2019 02:22:40 -0500 [thread overview]
Message-ID: <dd522611-f8eb-bb94-9ec6-09a6725e8cca@nazar.ca> (raw)
In-Reply-To: <20191011170709.GE19318@fieldses.org>
On Fri, Oct 11, 2019 at 17:07:09PM +0000, Bruce Fields wrote:
>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 <nfs-utils-2.4.1 or
>> 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.
Just to provide an update on this issue, it was tracked down to glibc's
statx emulation not supporting AT_STATX_DONT_SYNC and returning EINVAL.
So on a kernel without statx support, but a new glibc with statx
support, nfs-utils will always fail to stat any paths.
Either this or a similar fix is required to support older kernels.
Doug
next prev parent reply other threads:[~2019-11-26 7:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-08 20:23 nfs-utils: v3 mounts broken due to statx() returning EINVAL Thomas Deutschmann
2019-10-11 17:07 ` J. Bruce Fields
2019-11-26 7:22 ` Doug Nazar [this message]
2019-11-26 15:34 ` J. Bruce Fields
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dd522611-f8eb-bb94-9ec6-09a6725e8cca@nazar.ca \
--to=nazard@nazar.ca \
--cc=bfields@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.com \
--cc=whissi@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).