summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-11-13 09:08:39 -0800
committerZorro Lang <zlang@kernel.org>2023-11-16 15:37:54 +0800
commit848c6a882a6faab9d2545a26ad5070a62f7a7bd1 (patch)
tree83a3b52336e8ef97ec16ad32563a1951d6fadc3e /m4
parent59372e8d3f961eb20d911e715777af06de921891 (diff)
generic: test reads racing with slow reflink operations
XFS has a rather slow reflink operation. While a reflink operation is running, other programs cannot read the contents of the source file, which is causing latency spikes. Catherine Hoang wrote a patch to permit reads, since the source file contents do not change. This is a functionality test for that patch. [zlang@ adds `_supported_fs generic`] Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Catherine Hoang <catherine.hoang@oracle.com> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'm4')
-rw-r--r--m4/package_libcdev.m413
1 files changed, 13 insertions, 0 deletions
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index 7f731044..0f4b8063 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -174,3 +174,16 @@ AC_DEFUN([AC_HAVE_FIEXCHANGE],
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_fiexchange)
])
+
+# Check if we have FICLONE
+AC_DEFUN([AC_HAVE_FICLONE],
+ [ AC_MSG_CHECKING([for FICLONE])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/ioctl.h>
+#include <linux/fs.h>
+ ]], [[
+ ioctl(-1, FICLONE, -1);
+ ]])],[have_ficlone=yes
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
+ AC_SUBST(have_ficlone)
+ ])