Displaying 2 results from an estimated 2 matches for "a8a6253".
2018 Jul 30
3
[PATCH v2] file: Normalize errno value for ENODEV
...EOPNOTSUPP to trigger
fallback.
- ENODEV should be ignored in file_trim.
Tested only on Fedora 28 and RHEL 7.5.
---
plugins/file/file.c | 33 ++++++++++++++++++++++++---------
1 file changed, 24 insertions(+), 9 deletions(-)
diff --git a/plugins/file/file.c b/plugins/file/file.c
index a7c07fb..a8a6253 100644
--- a/plugins/file/file.c
+++ b/plugins/file/file.c
@@ -50,6 +50,21 @@
static char *filename = NULL;
+#if defined(FALLOC_FL_PUNCH_HOLE) || defined(FALLOC_FL_ZERO_RANGE)
+static int
+do_fallocate(int fd, int mode, off_t offset, off_t len)
+{
+ int r = -1;
+ r = fallocate (fd, mode, off...
2018 Jul 30
3
[PATCH v2] file: Add missing include for FALLOC_FL_*
...s
Tested on Fedora 28 and RHEL 7.5.
---
v2:
- Include <linux/falloc.h> only on Linux
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-July/msg00083.html
plugins/file/file.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/plugins/file/file.c b/plugins/file/file.c
index a8a6253..0345115 100644
--- a/plugins/file/file.c
+++ b/plugins/file/file.c
@@ -42,6 +42,10 @@
#include <sys/stat.h>
#include <errno.h>
+#if defined(__linux__)
+#include <linux/falloc.h> /* For FALLOC_FL_* on RHEL, glibc < 2.18 */
+#endif
+
#include <nbdkit-plugin.h>
#i...