All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Disable statx if using glibc emulation
@ 2019-12-05 10:27 Doug Nazar
  2019-12-09 15:56 ` Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: Doug Nazar @ 2019-12-05 10:27 UTC (permalink / raw)
  To: linux-nfs; +Cc: Steve Dickson, Doug Nazar

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.

Signed-off-by: Doug Nazar <nazard@nazar.ca>
---
 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.24.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Disable statx if using glibc emulation
  2019-12-05 10:27 [PATCH] Disable statx if using glibc emulation Doug Nazar
@ 2019-12-09 15:56 ` Steve Dickson
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2019-12-09 15:56 UTC (permalink / raw)
  To: Doug Nazar, linux-nfs



On 12/5/19 5:27 AM, Doug Nazar wrote:
> 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.
> 
> Signed-off-by: Doug Nazar <nazard@nazar.ca>
Committed... (tag: nfs-utils-2-4-3-rc3)

steved.

> ---
>  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
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-09 15:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 10:27 [PATCH] Disable statx if using glibc emulation Doug Nazar
2019-12-09 15:56 ` Steve Dickson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.