From a587fa65f9e716ffdb01912795811726c70dc6b1 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 18 Jul 2019 13:05:05 +0000 Subject: [PATCH] fdio: Handle ENOTTY from copy_file_range It may be returned by the RHEL7 kernel on XFS, see: https://bugzilla.redhat.com/show_bug.cgi?id=1688067 --- glnx-fdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glnx-fdio.c b/glnx-fdio.c index 7b734ff..6308e35 100644 --- a/libglnx/glnx-fdio.c +++ b/libglnx/glnx-fdio.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -770,7 +771,7 @@ glnx_regfile_copy_bytes (int fdf, int fdt, off_t max_bytes) have_cfr = 0; try_cfr = false; } - else if (errno == EXDEV) + else if (G_IN_SET(errno, EXDEV, ENOTTY)) /* We won't try cfr again for this run, but let's be * conservative and not mark it as available/unavailable until * we know for sure. -- 2.21.0