nfs-utils: Disable statx if using glibc emulation
PATCH 1/1 nfs-utils: Disable statx if using glibc emulation
nfs-utils 2.4.1, moves from "stat" to "statx
with AT_STATX_DONT_SYNC" in parts of the code.
statx is supported in Linux kernel v4.11 and above. For all older kernels glibc emulates statx, and it doesn't support AT_STATX_DONT_SYNC and will return EINVAL.
When server uses nfs-utils 2.4.1 on kernel v4.10 and older, mount.nfs4 would fail with error "reason given by server: No such file or directory".
Since Linux v4.4 and v4.9 are LTS, its more likely that people would use above combination.
This issue has been fixed in nfs-utils 2.4.3 and
above. Backporting fix to 2.4.1.
--- ...sable-statx-if-using-glibc-emulation.patch | 34 +++++++++++++++++++ .../nfs-utils/nfs-utils_2.4.1.bb | 1 + 2 files changed, 35 insertions(+) create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Disable-statx-if-using-glibc-emulation.patch
meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Disable-statx-if-using-glibc-emulation.patch new file +34 -0
@@ -0,0 +1,34 @@ +From ff3ad88c233ecd87f7983ad13836323f944540ec Mon Sep 17 00:00:00 2001 +From: Doug Nazar <[email protected]> +Date: Mon, 9 Dec 2019 10:53:37 -0500 +Subject: [PATCH] Disable statx if using glibc emulation + +On older kernels without statx, glibc with statx support will attempt +to emulate the call. However it doesn't support AT_STATX_DONT_SYNC and +will return EINVAL. This causes all xstat/xlstat calls to fail. + +Upstream Status: Backport + +Signed-off-by: Doug Nazar <[email protected]> +Signed-off-by: Steve Dickson <[email protected]> +--- + support/misc/xstat.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/support/misc/xstat.c b/support/misc/xstat.c +index 661e29e4..a438fbcc 100644 +--- a/support/misc/xstat.c ++++ b/support/misc/xstat.c +@@ -51,6 +51,9 @@ statx_do_stat(int fd, const char *pathname, struct stat *statbuf, int flags) + statx_copy(statbuf, &stxbuf); + return 0; + } ++ /* glibc emulation doesn't support AT_STATX_DONT_SYNC */ ++ if (errno == EINVAL) ++ errno = ENOSYS; + if (errno == ENOSYS) + statx_supported = 0; + } else +-- +2.19.1 +
meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb +1 -0
@@ -33,6 +33,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \ file://0001-Don-t-build-tools-with-CC_FOR_BUILD.patch \ file://0001-Fix-include-order-between-config.h-and-stat.h.patch \ + file://0001-Disable-statx-if-using-glibc-emulation.patch \ " SRC_URI_append_libc-glibc = " file://0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch" SRC_URI_append_libc-musl = " file://nfs-utils-musl-res_querydomain.patch"
Signature · 1 line
2.18.1
✗ patchtest: failure for nfs-utils: Disable statx if using glibc emulation
== Series Details ==
Series: nfs-utils: Disable statx if using glibc emulation
Revision: 1
URL : https://patchwork.openembedded.org/series/23317/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Upstream-Status is in incorrect format [test_upstream_status_presence_format]
Suggested fix Fix Upstream-Status format in 0001-Disable-statx-if-using-glibc-emulation.patch Current Upstream Status: Backport Standard format Upstream-Status: <Valid status> Valid status Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe