Displaying 7 results from an estimated 7 matches for "9df5001d".
2019 Aug 13
3
[nbdkit PATCH 0/2] errno cleanup patches
I ran into these while trying to prepare patches to add
NBD_CMD_FLAG_FAST_ZERO, which will expose a new NBD_ENOTSUP wire
value.
Eric Blake (2):
plugins: Don't lose original error when emulating FUA
plugins: Permit ENOTSUP as synonym for EOPNOTSUPP
docs/nbdkit-filter.pod | 11 ++++++-----
docs/nbdkit-plugin.pod | 12 +++++++-----
plugins/file/file.c | 16 +++++++++++-----
2019 Jul 31
0
[nbdkit PATCH 4/8] Revert "RHEL 5: Define O_CLOEXEC and SOCK_CLOEXEC."
...+ b/plugins/example2/example2.c
@@ -48,10 +48,6 @@
#include <nbdkit-plugin.h>
-#ifndef O_CLOEXEC
-#define O_CLOEXEC 0
-#endif
-
static char *filename = NULL;
/* A debug flag which can be set on the command line using
diff --git a/plugins/file/file.c b/plugins/file/file.c
index 52d330f7..9df5001d 100644
--- a/plugins/file/file.c
+++ b/plugins/file/file.c
@@ -61,10 +61,6 @@
#include "cleanup.h"
#include "isaligned.h"
-#ifndef O_CLOEXEC
-#define O_CLOEXEC 0
-#endif
-
#ifndef HAVE_FDATASYNC
#define fdatasync fsync
#endif
diff --git a/plugins/streaming/streaming.c b/pl...
2019 Aug 02
0
[nbdkit PATCH v2 04/17] Revert "RHEL 5: Define O_CLOEXEC and SOCK_CLOEXEC."
...+ b/plugins/example2/example2.c
@@ -48,10 +48,6 @@
#include <nbdkit-plugin.h>
-#ifndef O_CLOEXEC
-#define O_CLOEXEC 0
-#endif
-
static char *filename = NULL;
/* A debug flag which can be set on the command line using
diff --git a/plugins/file/file.c b/plugins/file/file.c
index 52d330f7..9df5001d 100644
--- a/plugins/file/file.c
+++ b/plugins/file/file.c
@@ -61,10 +61,6 @@
#include "cleanup.h"
#include "isaligned.h"
-#ifndef O_CLOEXEC
-#define O_CLOEXEC 0
-#endif
-
#ifndef HAVE_FDATASYNC
#define fdatasync fsync
#endif
diff --git a/plugins/split/split.c b/plugins/sp...
2019 Aug 13
0
[nbdkit PATCH 2/2] plugins: Permit ENOTSUP as synonym for EOPNOTSUPP
...y
+C<nbdkit_set_error> or C<errno>), then C<.pwrite> will be used
+instead.
The callback must write the whole C<count> bytes if it can. The NBD
protocol doesn't allow partial writes (instead, these would be
diff --git a/plugins/file/file.c b/plugins/file/file.c
index 9df5001d..a9d6491a 100644
--- a/plugins/file/file.c
+++ b/plugins/file/file.c
@@ -73,6 +73,12 @@ static pthread_mutex_t lseek_lock = PTHREAD_MUTEX_INITIALIZER;
/* to enable: -D file.zero=1 */
int file_debug_zero;
+static bool
+file_is_enotsup (int err)
+{
+ return err == ENOTSUP || err == EOPNOTSUPP;
+}...
2019 Aug 02
0
[nbdkit PATCH v2 10/17] plugins: Add .fork_safe field
...truct nbdkit_plugin plugin = {
.pwrite = ext2_pwrite,
.flush = ext2_flush,
.errno_is_preserved = 1,
+ .fork_safe = 1, /* ext2fs does not appear to use fork() */
};
NBDKIT_REGISTER_PLUGIN(plugin)
diff --git a/plugins/file/file.c b/plugins/file/file.c
index 9df5001d..d71c2379 100644
--- a/plugins/file/file.c
+++ b/plugins/file/file.c
@@ -667,6 +667,7 @@ static struct nbdkit_plugin plugin = {
.cache = file_cache,
#endif
.errno_is_preserved = 1,
+ .fork_safe = 1, /* no use of fork() */
};
NBDKIT_REGISTER_PLUGIN(plugin)
diff --git a...
2019 Jul 31
13
[nbdkit PATCH 0/8] fd leak safety
There's enough here to need a review; some of it probably needs
backporting to stable-1.12.
This probably breaks tests on Haiku or other platforms that have not
been as on-the-ball about atomic CLOEXEC; feel free to report issues
that arise, and I'll help come up with workarounds (even if we end up
leaving a rare fd leak on less-capable systems).
Meanwhile, I'm still working on my
2019 Aug 02
23
[nbdkit PATCH v2 00/17] fd leak safety
This is a major rewrite compared to my v1 series, where I've tried
a lot harder to ensure that we still accommodate building on Haiku
(although I have not actually yet fired up a Haiku VM to try it
for myself). I also managed to make the sh plugin fully parallel,
on capable platforms.
See also my question on patch 10 on whether I've picked the best
naming convention.
Eric Blake (17):