Displaying 2 results from an estimated 2 matches for "flush_config".
2020 Mar 17
0
[nbdkit PATCH 4/4] RFC tests: Add test to cover unusual .can_flush return
...#define NBDKIT_API_VERSION 2
+
+#include <nbdkit-plugin.h>
+
+/* level abuses our knowledge of internal nbdkit values:
+ * -1: force error during connect
+ * 0: no flush, no FUA
+ * 1: flush works, FUA is emulated
+ * 2: flush works, FUA is native
+ */
+static int level;
+
+static int
+flush_config (const char *key, const char *value)
+{
+ if (strcmp (key, "level") == 0)
+ return nbdkit_parse_int (key, value, &level);
+ nbdkit_error ("unknown parameter '%s'", key);
+ return -1;
+}
+
+/* Implements both .can_flush and .can_fua */
+static int
+flush_level (...
2020 Mar 17
9
[nbdkit PATCH 0/4] Fix testsuite hang with nbd-stadalone
Either patch 1 or patch 2 in isolation is sufficient to fix the
problem that Rich forwarded on from an archlinux tester (name so I can
credit them?). But both patches should be applied, as well as
backported to appropriate stable branches, to maximize cross-version
interoperability of nbdkit vs. plugins. Patch 3 will let us detect
future similar bugs much faster. I want patch 4 to ensure that